newline should also be treated as "enter" key.
authorTom Hughes <tom.hughes@palm.com>
Thu, 3 Mar 2011 01:37:38 +0000 (19:37 -0600)
committerRyan Dahl <ry@tinyclouds.org>
Thu, 3 Mar 2011 05:00:06 +0000 (21:00 -0800)
lib/tty_posix.js

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