herculanojs Posted October 15, 2016 Share Posted October 15, 2016 I have great difficulty in understanding this process. I need to disable the browser function keys (F1..F12) Using the option in MainModule (monitoredkeys) got the result. But some things do not work as expected. When active keys monitoring mainmodule, onkeydow the forms stop working. If active KeyenabledAll, onkeydown works, but editing components not, like the Edit. All that is entered simply is not shown. How should I use it? How the operation of properties? MonitoredKeys.rar Link to comment Share on other sites More sharing options...
Sherzod Posted October 16, 2016 Share Posted October 16, 2016 Hi, Try: 1. MainForm -> MonitoredKeys -> Enabled = True 2. MainForm -> MonitoredKeys -> Keys -> in All items set HandleBrowser to False 3. UniMainModule -> MonitoredKeys -> Keys -> in All items set HandleBrowser to False Best regards. Link to comment Share on other sites More sharing options...
herculanojs Posted October 16, 2016 Author Share Posted October 16, 2016 tanks brother Link to comment Share on other sites More sharing options...
herculanojs Posted October 16, 2016 Author Share Posted October 16, 2016 From what I understand, whenever I turn on monitoring keys, the form onkeydown for work. Link to comment Share on other sites More sharing options...
herculanojs Posted October 16, 2016 Author Share Posted October 16, 2016 I believe you have not understood the real functionality of it, or there is a problem in this method. Because for example I want the browser is prevented from utilizasr for example the standard keys F3 or F5. However I want to be able to onkeydow for example check if the user used a key that I am monitoring and run something. Apparently, if I active monitoring, onkeydown response of the form disappears. Link to comment Share on other sites More sharing options...
Sherzod Posted October 16, 2016 Share Posted October 16, 2016 I'm sorry, maybe I did not understand your issue Because for example I want the browser is prevented from utilizasr for example the standard keys F3 or F5. this allows to prevent: 2. MainForm -> MonitoredKeys -> Keys -> in All items set HandleBrowser to False 3. UniMainModule -> MonitoredKeys -> Keys -> in All items set HandleBrowser to False Link to comment Share on other sites More sharing options...
herculanojs Posted October 16, 2016 Author Share Posted October 16, 2016 Not at all, you've helped a lot just because give me attention. This is much more important than the solution itself, since there is worse than not find a solution, is not having anyone even resposanda our longings. 1 Link to comment Share on other sites More sharing options...
herculanojs Posted October 16, 2016 Author Share Posted October 16, 2016 What I need is the browser to disable the keys especias F1..F12, but want the onKeyDown event of the form to continue to function. This does not happen when I activate monitoredkey property either in form or in mainmodule. Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted October 19, 2016 Administrators Share Posted October 19, 2016 object UniMainModule: TUniMainModule OldCreateOrder = False MonitoredKeys.Enabled = True MonitoredKeys.Keys = < item KeyStart = 112 KeyEnd = 123 HandleBrowser = False end item KeyStart = 1 KeyEnd = 111 end item KeyStart = 124 KeyEnd = 255 end> Height = 384 Width = 582 end You need 3 groups of keys for that. In F1..F12 group just unset HandleBrowser. Link to comment Share on other sites More sharing options...
herculanojs Posted October 19, 2016 Author Share Posted October 19, 2016 very tanks Link to comment Share on other sites More sharing options...
M477H13U Posted June 28, 2018 Share Posted June 28, 2018 Hello there UniGUI Developpers ! (: I handle perfectly my F1..F12 keys with MainModule and MainForm ... except when I have my focus in component : For instance, when I am on the login page, on edits, if I press F1, the help of Chrome is fired .. how may I prevent browser event when I got the focus in components ? Link to comment Share on other sites More sharing options...
Sherzod Posted June 28, 2018 Share Posted June 28, 2018 Hello, Maybe like this: For example, UniLoginForm1 -> Script: document.addEventListener('keydown', function(event) { if (event.key == 'F1') { event.cancelBubble = true; event.returnValue = false; event.keyCode = false; return false; } }); Link to comment Share on other sites More sharing options...
M477H13U Posted June 28, 2018 Share Posted June 28, 2018 First of all, thanks for the quick answer! (: Unfortunatelly, this is not what I am searching as I just want to cancel browser events as I have my own event linked to vk_F11 and other keys. Regards, Link to comment Share on other sites More sharing options...
Sherzod Posted June 28, 2018 Share Posted June 28, 2018 Sorry, Can you make a simple testcase for this?! Link to comment Share on other sites More sharing options...
M477H13U Posted June 28, 2018 Share Posted June 28, 2018 Nothing un-understandable, but here's my testCase TestMonitoredKeysInComponent.7z Regards, Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted June 28, 2018 Administrators Share Posted June 28, 2018 Hello there UniGUI Developpers ! (: I handle perfectly my F1..F12 keys with MainModule and MainForm ... except when I have my focus in component : For instance, when I am on the login page, on edits, if I press F1, the help of Chrome is fired .. how may I prevent browser event when I got the focus in components ? Have you tried using MonitoredKeys property? Sent from my SM-N950F using Tapatalk Link to comment Share on other sites More sharing options...
M477H13U Posted June 29, 2018 Share Posted June 29, 2018 Annnnnnd I made a test case for that ..... have you tried it ? (NB: Of course I use MonitoredKeys property) Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted June 29, 2018 Administrators Share Posted June 29, 2018 Annnnnnd I made a test case for that ..... have you tried it ? (NB: Of course I use MonitoredKeys property) Thanks we will test. Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted June 29, 2018 Administrators Share Posted June 29, 2018 You need to set Forms.KeyPreview property to True, so form will be able to monitor and handle all keys. Link to comment Share on other sites More sharing options...
M477H13U Posted July 2, 2018 Share Posted July 2, 2018 Wicked, thanks very much for your time ! (: Link to comment Share on other sites More sharing options...
SISBLU Software Posted August 5, 2020 Share Posted August 5, 2020 Hello. F3 in OPERA not WORK. Link to comment Share on other sites More sharing options...
Sherzod Posted August 6, 2020 Share Posted August 6, 2020 10 hours ago, Daha Software said: F3 in OPERA not WORK. Hello, First of all specify the version of the Opera. Link to comment Share on other sites More sharing options...
SISBLU Software Posted August 6, 2020 Share Posted August 6, 2020 Opera Desktop: Version: 69.0.3686.95 Link to comment Share on other sites More sharing options...
SISBLU Software Posted August 6, 2020 Share Posted August 6, 2020 I Update for Version: 70.0.3728.95 But not work either Link to comment Share on other sites More sharing options...
Sherzod Posted August 6, 2020 Share Posted August 6, 2020 4 minutes ago, Daha Software said: Opera Desktop: Version: 69.0.3686.95 For Windows? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now