Skip to content

Instantly share code, notes, and snippets.

@callblueday
Last active December 20, 2015 17:59
Show Gist options
  • Save callblueday/6172222 to your computer and use it in GitHub Desktop.
Save callblueday/6172222 to your computer and use it in GitHub Desktop.
getting the enter key to be handled on press in an input/textbox
goog.events.listen(element, goog.events.EventType.KEYPRESS, function(a) {
if(a.keycode === 13) {
doSomething();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment