kbd
kbd module provides various utilities for keyboard. I wanted to have a node equivalent for printf, scanf, puts, gets for my students to whom I teach programming with node. kdb provides these functions in both synchrone and asynchrone mode. kdb also gives the opportunity to set/unset echo, set unset canonical mode.
This version is completely rewritten with "nan" (Native Abstraction for Node.js). Sorry for any bad english ;-)
var kbd = ;
// synchronously reads one line from keyboard var line = kbd;
// asynchronously reads one line from keyboard kbd
// synchronously reads one key from keyboard in non canonical mode without echo kbd; // no echo modekbd; // non canonical modevar char = kbd;kbd; // reestablish echo modekbd; // reestablish canonical mode
// asynchronously reads key from keyboard in non canonical mode without echo kbd; // no echo modekbd; // non canonical modekbd;