diff options
author | Ray <rayw.public@gmail.com> | 2022-02-08 01:40:05 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-07 17:40:05 +0000 |
commit | a0668572c7f66c21946074625648fec1a42c060d (patch) | |
tree | c950cf2e14d3c7ad5a37adb851e8646868855a96 /doc/api/readline.md | |
parent | 42ad4137aadda69c51e1df48eee9bc2e5cebca5c (diff) | |
download | node-new-a0668572c7f66c21946074625648fec1a42c060d.tar.gz |
readline: bind keystroke `ctrl`+`6` to redo
1. Any keystroke emits `0x1E` will do redo action.
2. Fix bug of undo/redo.
3. More detailed document.
4. Unit tests.
PR-URL: https://github.com/nodejs/node/pull/41662
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api/readline.md')
-rw-r--r-- | doc/api/readline.md | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/doc/api/readline.md b/doc/api/readline.md index b720190794..c0407a7717 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -1374,7 +1374,18 @@ const { createInterface } = require('readline'); <tr> <td><kbd>Ctrl</kbd>+<kbd>-</kbd></td> <td>Undo previous change</td> - <td>Any keystroke emits key code <code>0x1F</code> would do this action.</td> + <td>Any keystroke that emits key code <code>0x1F</code> will do this action. + In many terminals, for example <code>xterm</code>, + this is bound to <kbd>Ctrl</kbd>+<kbd>-</kbd>.</td> + <td></td> + </tr> + <tr> + <td><kbd>Ctrl</kbd>+<kbd>6</kbd></td> + <td>Redo previous change</td> + <td>Many terminals don't have a default redo keystroke. + We choose key code <code>0x1E</code> to perform redo. + In <code>xterm</code>, it is bound to <kbd>Ctrl</kbd>+<kbd>6</kbd> + by default.</td> <td></td> </tr> <tr> |