Last active
June 26, 2019 02:02
-
-
Save ckundo/ea17ba9cb2317c801e3ba67b5a36f229 to your computer and use it in GitHub Desktop.
js event dispatcher for keyboard triggers in XD
This file contains 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
const ev = new KeyboardEvent("keydown", { key: "w" }); // replace "w" with the keyboard trigger value | |
document.querySelector("#root-1").dispatchEvent(ev); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment