herculanojs Posted October 15, 2016 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 Quote
Sherzod Posted October 16, 2016 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. Quote
herculanojs Posted October 16, 2016 Author Posted October 16, 2016 From what I understand, whenever I turn on monitoring keys, the form onkeydown for work. Quote
herculanojs Posted October 16, 2016 Author 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. Quote
Sherzod Posted October 16, 2016 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 Quote
herculanojs Posted October 16, 2016 Author 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 Quote
herculanojs Posted October 16, 2016 Author 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. Quote
Administrators Farshad Mohajeri Posted October 19, 2016 Administrators 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. Quote
M477H13U Posted June 28, 2018 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 ? Quote
Sherzod Posted June 28, 2018 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; } }); Quote
M477H13U Posted June 28, 2018 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, Quote
Sherzod Posted June 28, 2018 Posted June 28, 2018 Sorry, Can you make a simple testcase for this?! Quote
M477H13U Posted June 28, 2018 Posted June 28, 2018 Nothing un-understandable, but here's my testCase TestMonitoredKeysInComponent.7z Regards, Quote
Administrators Farshad Mohajeri Posted June 28, 2018 Administrators 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 Quote
M477H13U Posted June 29, 2018 Posted June 29, 2018 Annnnnnd I made a test case for that ..... have you tried it ? (NB: Of course I use MonitoredKeys property) Quote
Administrators Farshad Mohajeri Posted June 29, 2018 Administrators 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. Quote
Administrators Farshad Mohajeri Posted June 29, 2018 Administrators Posted June 29, 2018 You need to set Forms.KeyPreview property to True, so form will be able to monitor and handle all keys. Quote
Sherzod Posted August 6, 2020 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. Quote
SISBLU Software Posted August 6, 2020 Posted August 6, 2020 Opera Desktop: Version: 69.0.3686.95 Quote
SISBLU Software Posted August 6, 2020 Posted August 6, 2020 I Update for Version: 70.0.3728.95 But not work either Quote
Sherzod Posted August 6, 2020 Posted August 6, 2020 4 minutes ago, Daha Software said: Opera Desktop: Version: 69.0.3686.95 For Windows? Quote
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.