How to determine which key is pressed in javascript?
You can handle the keydown and keyup events on the document and set a flag for each key.
keydown
keyup
document