I want to simulate keypresses in Javascript. There are no listener for those key presses. For example: The function will trigger key '32' (spacebar) and this should result in scrolling of page like pressing normal spacebar.
I tried keypress trigger from Simulating a Keypress Event from Javascript Console but it didn't worked.
Edit
Key presses are not limited to spacebar only. It can be combined keys like alt+Ctrl+D
and the browser should respond to them like keypresses from physical keyboard.