Created
October 30, 2012 03:08
-
-
Save groundwater/3978101 to your computer and use it in GitHub Desktop.
Capture a Single Key Press Event
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
process.openStdin() | |
process.stdin.setRawMode(true) | |
process.stdin.on('data',function(key){ | |
console.log(key.toString()) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment