Skip to content

Instantly share code, notes, and snippets.

@xavierroy
Created February 28, 2017 11:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xavierroy/93464768021c8ccc126286f0fe77a874 to your computer and use it in GitHub Desktop.
Save xavierroy/93464768021c8ccc126286f0fe77a874 to your computer and use it in GitHub Desktop.
Script to attach a keypress to a javascript code
$(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