Last active
December 20, 2015 17:59
-
-
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
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
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