Created
February 12, 2019 12:38
-
-
Save daniel12fsp/2d7fa07be2b1feef5a980e2d79d3d6c3 to your computer and use it in GitHub Desktop.
Emulate keyboard event
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // evt = ArrowLeft + Shift | |
| const evt = new window.KeyboardEvent("keydown", { | |
| key: "ArrowLeft", | |
| shiftKey: true | |
| }); | |
| document.dispatchEvent(evt); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment