I want to make my question clear. Please dont confuse it with determining the key press. I dont want the user to press any key. On the contrary, I want to run a script which
For security reasons, some browsers (not sure if all), prevent you from firing keydown-events. Please refer to this article for more info.
A quote from the article:
Safari/Chrome makes the keyCode and charCode properties read-only, so it is not possible to simulate specific keys when manually firing events.