Guest User

Untitled

a guest
Jul 20th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. > require('tty').setRawMode(true);
  2. true
  3. > process.stdin.on('data', function(buf) { console.log(buf.toString('ascii').replace(/\x1b/g, 'ESC ') + "\n"); });
  4. { fd: 0,
  5. type: null,
  6. allowHalfOpen: false,
  7. _readWatcher: { socket: [Circular], callback: [Function: onReadable] },
  8. readable: true,
  9. _writeQueue: [],
  10. _writeQueueEncoding: [],
  11. _writeQueueFD: [],
  12. _writeQueueCallbacks: [],
  13. _writeWatcher: { socket: [Circular], callback: [Function: onWritable] },
  14. writable: true,
  15. _writeImpl: [Function],
  16. _readImpl: [Function],
  17. _shutdownImpl: [Function],
  18. _events: { data: [ [Function], [Function] ] } }
  19. > process.stdin.resume();process.stdin.resume();
  20.  
  21. ESC f
  22.  
  23. > process.stdin.ESC be();
  24.  
  25. ESC
  26.  
  27. > ESC d
Add Comment
Please, Sign In to add comment