Browse Source

newline should also be treated as "enter" key.

v0.7.4-release
Tom Hughes 14 years ago
committed by Ryan Dahl
parent
commit
cf7b680db9
  1. 2
      lib/tty_posix.js

2
lib/tty_posix.js

@ -120,7 +120,7 @@ ReadStream.prototype._emitKey = function(s) {
}
}
if (s === '\r') {
if (s === '\r' || s === '\n') {
// enter
key.name = 'enter';

Loading…
Cancel
Save