jQuery: Catch Keyboard Events

Lot of jQuery projects relies on keyboard/mouse event like pressing “p” for previous and “n” for next also using the arrows. Because this is important, I have managed a code to get the keyboard character on 3 events: – Keypress – Keyup – Keydown I have created a function to return the key as below: [...]