Another update from ingydotnet^djgoku
This commit is contained in:
parent
91df62d461
commit
948b86eafa
7604 changed files with 108452 additions and 22726 deletions
|
|
@ -4,9 +4,7 @@ keypress(process.stdin);
|
|||
|
||||
process.stdin.on('keypress', function (ch, key) {
|
||||
if (key && (key.name === 'y' || key.name === 'n')) {
|
||||
var reply = key.name === 'y';
|
||||
console.log('Reply:', reply);
|
||||
// ...do something with 'reply'...
|
||||
console.log('Reply:' + key.name);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
document.body.addEventListener('keyup', function (e) {
|
||||
var key = String.fromCharCode(e.keyCode).toLowerCase();
|
||||
if (key === 'y' || key === 'n') {
|
||||
console.log('response is: ' + key);
|
||||
}
|
||||
}, false);
|
||||
Loading…
Add table
Add a link
Reference in a new issue