Prevent Windows management keys in jQuery

I am considering game replication in HTML5 and as part of this. I want to prevent accidental Windows control key presses.

It is not disabled using preventDefaults ();

Is there a way to suppress a key message outside the application?

+4
source share
1 answer

I'm not sure if this is possible at all. There are several libraries and scripts that try to execute at least part of this, and they should work for other keys. Whether they will work for the Windows key or not, I can not tell you:

Bypass

  • Place the keys that you intend to use for the user in your game elsewhere. For instance. JKLI for moving and AS for action.
  • Show them the image of a screwdriver and tell them to remove their Windows key
  • Google seems to be introducing gamepad support in Chrome browser
+1
source

Source: https://habr.com/ru/post/1386638/


All Articles