Skip to content

Commit cf7b680

Browse files
thughesry
authored andcommitted
newline should also be treated as "enter" key.
1 parent 452df69 commit cf7b680

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/tty_posix.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ ReadStream.prototype._emitKey = function(s) {
120120
}
121121
}
122122

123-
if (s === '\r') {
123+
if (s === '\r' || s === '\n') {
124124
// enter
125125
key.name = 'enter';
126126

0 commit comments

Comments
 (0)