Skip to content

Instantly share code, notes, and snippets.

@Nolski
Last active April 14, 2017 22:30
Show Gist options
  • Save Nolski/32218255bd58b2afc644007c3a1fde3b to your computer and use it in GitHub Desktop.
Save Nolski/32218255bd58b2afc644007c3a1fde3b to your computer and use it in GitHub Desktop.
var code;
if(/^[a-zA-Z()]$/.test(event.key)) {
code = event.key.toUpperCase().charCodeAt(0);
} else {
code = event.which();
}
press(keydown(code));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment