donlego Posted August 20, 2019 Share Posted August 20, 2019 hello in vcl mode i use if ((ssCtrl in Shift) and (key = Ord('s'))) then button1.click; how to do it on unigui , pres ctrl+S trigering browser save Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 20, 2019 Share Posted August 20, 2019 22 minutes ago, donlego said: pres ctrl+S trigering browser save Hello, Please see this demo: \FMSoft\Framework\uniGUI\Demos\Desktop\MonitoredKeys 1. MainForm.MonitoredKeys.Keys -> add this: 2. MainForm -> OnKeyDown event: procedure TMainForm.UniFormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin case Key of 83 : // 's' if ssCtrl in Shift then UniButton1.Click; end; end; Quote Link to comment Share on other sites More sharing options...
donlego Posted August 20, 2019 Author Share Posted August 20, 2019 If i want to add ctrl +s and ctrl +p On keyend and onkey start What value should i add ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 20, 2019 Share Posted August 20, 2019 For Сtrl+P, all these steps, but "code" = 80 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 20, 2019 Share Posted August 20, 2019 1 minute ago, donlego said: If i want to add ctrl +s and ctrl +p On keyend and onkey start What value should i add ? Yes sorry, for both you can set: KeyStart = 80 KeyEnd = 83 Quote Link to comment Share on other sites More sharing options...
donlego Posted August 20, 2019 Author Share Posted August 20, 2019 it trigering ctrl+s default browser too Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 20, 2019 Share Posted August 20, 2019 11 minutes ago, donlego said: it trigering ctrl+s default browser too Have you set HandleBrowser to False? Quote Link to comment Share on other sites More sharing options...
donlego Posted August 20, 2019 Author Share Posted August 20, 2019 yes i set it to false unigui ver 1506, xe 7 , test on firefox & chrome Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 20, 2019 Share Posted August 20, 2019 Make a simple testcase if possible. Quote Link to comment Share on other sites More sharing options...
donlego Posted August 20, 2019 Author Share Posted August 20, 2019 10 minutes ago, Sherzod said: Make a simple testcase if possible. hotkey.rar Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 20, 2019 Share Posted August 20, 2019 1 hour ago, donlego said: hotkey.rar It seems you mistakenly swapped values: KeyStart and KeyEnd. Please check. Quote Link to comment Share on other sites More sharing options...
donlego Posted August 21, 2019 Author Share Posted August 21, 2019 14 hours ago, Sherzod said: It seems you mistakenly swapped values: KeyStart and KeyEnd. Please check. same result , it trigering browser hotkey Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 21, 2019 Share Posted August 21, 2019 2 hours ago, donlego said: same result , it trigering browser hotkey MainForm.MonitoredKeys.Enabled=True Quote Link to comment Share on other sites More sharing options...
donlego Posted August 21, 2019 Author Share Posted August 21, 2019 13 minutes ago, Sherzod said: MainForm.MonitoredKeys.Enabled=True it work , thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.