I am creating a browser interface to the terminal. I need to catch both characters (alphanumeric, dotted, oblique, ...) and asymmetric keystrokes (arrows, F1-F12, ...). In addition, if the user holds a certain keystroke, it would be nice to get repeated keystrokes (the function should be called repeatedly until the key is released). The same applies to space, characters, ...
I want this to be as cross-browser as possible ( jQuery keypress does not work on this account). I also tried to use the fork jquery.hotkeys.js , but if I understand correctly, I can not grasp how special and symbolic keys only function (need to use keydown keydown for the former and for the latter).
Is there a JS library that will allow me to catch characters and special keys?
I hope I donโt miss something obvious. :)
UPDATE To clarify: I'm looking for a library that would hide information about browser implementation from me.
source share