Keybindings |
Description |
Notes |
Ctrl+Shift+Backspace |
Delete line left |
Doesn't work on Linux, Mac and Windows |
Ctrl+Shift+Delete |
Delete line right |
Doesn't work on Mac |
Ctrl+C |
Emit SIGINT or close the readline instance |
|
Ctrl+H |
Delete left |
|
Ctrl+D |
Delete right or close the readline instance in case the current line is empty / EOF |
Doesn't work on Windows |
Ctrl+U |
Delete from the current position to the line start |
|
Ctrl+K |
Delete from the current position to the end of line |
|
Ctrl+A |
Go to start of line |
|
Ctrl+E |
Go to end of line |
|
Ctrl+B |
Back one character |
|
Ctrl+F |
Forward one character |
|
Ctrl+L |
Clear screen |
|
Ctrl+N |
Next history item |
|
Ctrl+P |
Previous history item |
|
Ctrl+Z |
Moves running process into background. Type
fg and press Enter
to return. |
Doesn't work on Windows |
Ctrl+W or Ctrl
+Backspace |
Delete backward to a word boundary |
Ctrl+Backspace Doesn't
work on Linux, Mac and Windows |
Ctrl+Delete |
Delete forward to a word boundary |
Doesn't work on Mac |
Ctrl+Left arrow or
Meta+B |
Word left |
Ctrl+Left arrow Doesn't work
on Mac |
Ctrl+Right arrow or
Meta+F |
Word right |
Ctrl+Right arrow Doesn't work
on Mac |
Meta+D or Meta
+Delete |
Delete word right |
Meta+Delete Doesn't work
on windows |
Meta+Backspace |
Delete word left |
Doesn't work on Mac |
[EOF character]: https://en.wikipedia.org/wiki/End-of-file#EOF_character
[Readable]: stream.md#readable-streams
[TTY]: tty.md
[TTY keybindings]: #tty-keybindings
[Writable]: stream.md#writable-streams
[`'SIGCONT'`]: #event-sigcont
[`'SIGTSTP'`]: #event-sigtstp
[`'line'`]: #event-line
[`fs.ReadStream`]: fs.md#class-fsreadstream
[`process.stdin`]: process.md#processstdin
[`process.stdout`]: process.md#processstdout
[`rl.close()`]: #rlclose
[reading files]: #example-read-file-stream-line-by-line