I have been lucky to find String.fromCharCode()
. It has helped me significantly. However, I noticed it doesn't take into account the shift modifier. I know the event.shiftKey
property and use it, but right now I need to get the key value (eg: "A" or "a") which takes into account the shift key modifier. At first I used String.toLowerCase()
.. But I neglected to think of number keys, to give one example: "5" (without shift) and "%" (with shift). I need to differentiate between the two in my program. What's an easy way to get the key char value?