title: Detect enter in keypress event node.js rawmode
body: <p>I am writing a simple commandline tool to allow commandline input to a node.js server.
  I am trying to make a buffer, so the user can press up and see the last command. To do that I have set</p>
  
  <pre><code>require('tty').setRawMode(true);
  </code></pre>
  
  <p>And detects all keypress with:</p>
  
  <pre><code>process.stdin.on('keypress', function (letter, key) {
      if (key &amp;&amp; key.ctrl &amp;&amp; key.name == 'c') {
          process.exit();
      } else if (key &amp;&amp; key.enter) {
          write(letter);
          msgFired(buffer[bufferPos]);
  
          bufferPos += 1;
          buffer[bufferPos] = "";
      } else {
          write(letter);
          buffer[bufferPos] += letter;
      }
  });
  </code></pre>
  
  <p>This does not detect enter-presses.</p>
  
  <p>Are there a way to detect when a whole line is fires (as when RawMode is false) alongside with the keypress event? If not, how I detect the enter-press?</p>