I donβt know if you can trigger keystrokes, but perhaps if you explain what exactly you are trying to achieve, can you find a solution?
For example, if you want to call ctrl-p to open the print dialog, you can do this using window.print();
If you want to run actions in your own code, you can simply call the code directly, rather than trigger a keystroke.
I donβt think there is a way to call the file | save as ( ctrl-s ) using JavaScript.
source share