Created
January 5, 2010 00:48
-
-
Save alohasoftworks/269040 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| var recording; | |
| var outString = ''; | |
| $(document).keyup(function(event) { | |
| if (event.keyCode == 192) | |
| { | |
| recording = true; | |
| } | |
| else if (recording) | |
| { | |
| if (event.keyCode == 13) | |
| { | |
| alert(outString); | |
| recording = false; | |
| outString = ''; | |
| } | |
| else | |
| { | |
| outString += String.fromCharCode(event.keyCode); | |
| } | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment