[Gambas-user] How to Disable KeyPress events in some controls (gb.web.gui)

Benoit Minisini benoit.minisini at gambas-basic.org
Tue May 24 19:48:17 CEST 2022


Le 24/05/2022 à 18:34, Safiur Rahman a écrit :
> Hi Benoit
> 
> Is there any means to disable KeyPress events in some controls (like 
> WebTextBox, WebTextArea) while keeping this for menu shortcuts, buttons 
> and WebListBox etc.
> 
> 1) All KeyPress events when logged in error.log become very bulky
> 2) Passwords should not be displayed.
> 3) KeyPress not necessary on typing A-Z 0-9 in WebTextBox, WebTextArea
> /
> /

In commit 
https://gitlab.com/gambas/gambas/-/commit/b518e8cf5a8591b8aa614595c66e1d763d0ff098, 
I implement the following solution :

Now keyboard events are sent from the browser to the server only if 
there is an explicit KeyPress event handler to handle it.

It's done by maintaining on the client side a list of the control 
identifiers that must send keyboard events.

It should handle your requests the best way I think.

Regards,

-- 
Benoît Minisini.


More information about the User mailing list