Created
February 28, 2017 11:06
-
-
Save xavierroy/93464768021c8ccc126286f0fe77a874 to your computer and use it in GitHub Desktop.
Script to attach a keypress to a javascript code
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
$(document).keypress(function(e) | |
{ | |
if(e.charCode == 63) // 63 is for the ? key | |
{ | |
// add js code here | |
} | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment