Last active
September 17, 2019 16:48
-
-
Save Giagnus64/3c08e71c8afd329d9adc491ced0e14d8 to your computer and use it in GitHub Desktop.
Keyboard Event Listener
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
| // This event has different options | |
| const kbEvent = new KeyboardEvent('keypress', { | |
| key:"e" | |
| shiftKey:"true" | |
| }); | |
| //see how the event is called on document | |
| document.dispatchEvent(kbEvent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment