Skip to content

Instantly share code, notes, and snippets.

@alohasoftworks
Created January 5, 2010 00:48
Show Gist options
  • Select an option

  • Save alohasoftworks/269040 to your computer and use it in GitHub Desktop.

Select an option

Save alohasoftworks/269040 to your computer and use it in GitHub Desktop.
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