if you set raw mode on the stdin stream, then you'll get a "data" event for each keystroke using the normal stream API.
On Wed, Jun 27, 2012 at 5:06 AM, Sebi <[email protected]>wrote: > Hello, > In older versions of Node you could track keystrokes the user made > with the following: > ... > process.stdin.on('keypress',function(char,key) { > if(key && key.ctrl && key.name == "d") { > ... > } > } > ... > > In the new Version of Node the migrationwiki says the following: > "process.stdin.on('keypress') will not be emitted by default, as it's > an internal API." > > How do I enable the emitting of those events, or is there another way > to keep track of keystrokes? > > Hope in future this will be come back! > > > Regards Seb > > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
