Currently, I see which keys are pressed using JavaScript using a library that relies on KeyDown/ events KeyUp. Although this works great when keys are pressed / released inside the page, events do not fire when the key goes out of the page (i.e. when it has no focus).
Thus, you can press a key Enterwhen the page has focus (the event will fire, everything will be fine), but when it releases it, when the page does not have focus, the event does not fire, what are the results of my inability to find out if the key is pressed or not.
Regarding the library used, refer to:
http://www.n-son.com/scripts/keyLib/keyLib.js
Is it possible to find out when the key is released, when the page has no focus? Or is there perhaps a common function to check if a key is pressed at a specific time?
source
share