Another update from ingydotnet^djgoku

This commit is contained in:
Ingy döt Net 2015-11-18 06:14:39 +00:00
parent 91df62d461
commit 948b86eafa
7604 changed files with 108452 additions and 22726 deletions

View file

@ -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);
}
});

View file

@ -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);