Improve support for keys in KeystrokesHandler
📝 Provide a description of the improvement
Currently, the KeystrokesHandler detects modifier keys, alphanumeric keys a-z A-Z 0-9, and is even said to support some special characters. But there are certain problems to it:
- problem 1: the special characters are not actually detected properly, because they are detected via comparing
keyCode, but the list of supported special characters has been generated usingcharCodeAtwhich gives completely different values which are not being detected (=charCode is 61 while its keyCode is 187), - problem 2: checking only for keyCodes isn't optimal as well, if we planned to check of uppercase letters, or even better, the uppercase special characters (like #$%^& or _+:? in qwerty keyboards) - the keystrokes are returning the very same keyCode for, example given,
+and=. - problem 3: the numpad keyCodes for the same characters like all digits, but also
-,+etc. are also different, while the keystrokes for digits only detects the non-numpad digit keys.
📃 Other details
I understand the keystrokes handler is used mostly for key shortcuts like Ctrl+B, Shift+C etc., but this will probably become a limitation, while this is a fairly easy fix. If not, then there' still a minimum set of problems to be addressed, like problem 1 of bad detection.
If you feel this is more of a bugfix issue, please let me know.
If you'd like to see this improvement implemented, add a 👍 reaction to this post.
There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.
We've closed your issue due to inactivity. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it).