I am using e.keyCode || e.which; to determine which key was pressed, but I am getting 65 for both a and A why is this happening and how can I detect the difference between the two?
e.keyCode || e.which;
just use e.which in jquery. They normalize this value for all browsers.
e.which
Additionally you can check for e.shiftKey.
e.shiftKey
2.1m questions
2.1m answers
60 comments
57.0k users