I need to capture system keys in Firefox. The need is to block them (Alt + Tab, Ctrl + Esc, WinKeys and all other special keys of sitemas as linux, windows, mac). I’ve tried various methods, but to no avail. I can capture simple keys like F11, Alt + F11 etc.
Could someone help me?
PS: also need to disable and restrict access to local files to upload and download boxes, able only to form buttons, but to Gmail for example is complicated, but will create another topic after resolving this.
Your solution definitely is to use js-ctypes. You will likely have to hack hard too, because no platform makes it easy to disable these regular keys. I know on Windows, with the keyboard hook, I never did it, but while reading about this subject I saw I needed extra code to bypass the security on the system. It’s just not a user friendly feature. But I get it, you might need it for something like say “blocking students from switching windows or something during a computerized test”. On Mac I had to add extra code to request Accesibility API. I didn’t read about it on Linux but I worked a bit with their APIs (GTK/X11/XKCB) and it for sure will be easiest of the three. Linux doesn’t really bother you about being user friendly.
So it’s not impossible, it is very possible. Read here to learn about js-ctypes -