Skip to content

Instantly share code, notes, and snippets.

@stenvdb
Created March 19, 2012 14:29
Show Gist options
  • Select an option

  • Save stenvdb/2114280 to your computer and use it in GitHub Desktop.

Select an option

Save stenvdb/2114280 to your computer and use it in GitHub Desktop.
JavaScript: if keycode is character
var c= String.fromCharCode(event.keyCode);
var isWordcharacter = c.match(/\w/);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment