@@ -59,9 +59,11 @@ The `'close'` event is emitted when one of the following occur:
59
59
* The ` rl.close() ` method is called and the ` readline.Interface ` instance has
60
60
relinquished control over the ` input ` and ` output ` streams;
61
61
* The ` input ` stream receives its ` 'end' ` event;
62
- * The ` input ` stream receives ` <ctrl>-D ` to signal end-of-transmission (EOT);
63
- * The ` input ` stream receives ` <ctrl>-C ` to signal ` SIGINT ` and there is no
64
- ` 'SIGINT' ` event listener registered on the ` readline.Interface ` instance.
62
+ * The ` input ` stream receives <kbd >Ctrl</kbd >+<kbd >D</kbd > to signal
63
+ end-of-transmission (EOT);
64
+ * The ` input ` stream receives <kbd >Ctrl</kbd >+<kbd >C</kbd > to signal ` SIGINT `
65
+ and there is no ` 'SIGINT' ` event listener registered on the
66
+ ` readline.Interface ` instance.
65
67
66
68
The listener function is called without passing any arguments.
67
69
@@ -126,8 +128,8 @@ added: v0.7.5
126
128
-->
127
129
128
130
The ` 'SIGCONT' ` event is emitted when a Node.js process previously moved into
129
- the background using ` <ctrl>-Z ` (i.e. ` SIGTSTP ` ) is then brought back to the
130
- foreground using fg(1p).
131
+ the background using < kbd >Ctrl</ kbd >+< kbd >Z</ kbd > (i.e. ` SIGTSTP ` ) is then
132
+ brought back to the foreground using fg(1p).
131
133
132
134
If the ` input ` stream was paused * before* the ` SIGTSTP ` request, this event will
133
135
not be emitted.
@@ -149,9 +151,9 @@ added: v0.3.0
149
151
-->
150
152
151
153
The ` 'SIGINT' ` event is emitted whenever the ` input ` stream receives a
152
- ` <ctrl>-C ` input, known typically as ` SIGINT ` . If there are no ` 'SIGINT' ` event
153
- listeners registered when the ` input ` stream receives a ` SIGINT ` , the ` 'pause' `
154
- event will be emitted.
154
+ < kbd >Ctrl+C</ kbd > input, known typically as ` SIGINT ` . If there are no ` 'SIGINT' `
155
+ event listeners registered when the ` input ` stream receives a ` SIGINT ` , the
156
+ ` 'pause' ` event will be emitted.
155
157
156
158
The listener function is invoked without passing any arguments.
157
159
@@ -168,10 +170,10 @@ rl.on('SIGINT', () => {
168
170
added: v0.7.5
169
171
-->
170
172
171
- The ` 'SIGTSTP' ` event is emitted when the ` input ` stream receives a ` <ctrl>-Z `
172
- input, typically known as ` SIGTSTP ` . If there are no ` 'SIGTSTP' ` event listeners
173
- registered when the ` input ` stream receives a ` SIGTSTP ` , the Node.js process
174
- will be sent to the background.
173
+ The ` 'SIGTSTP' ` event is emitted when the ` input ` stream receives a
174
+ < kbd >Ctrl</ kbd >+< kbd >Z</ kbd > input, typically known as ` SIGTSTP ` . If there are
175
+ no ` 'SIGTSTP' ` event listeners registered when the ` input ` stream receives a
176
+ ` SIGTSTP ` , the Node.js process will be sent to the background.
175
177
176
178
When the program is resumed using fg(1p), the ` 'pause' ` and ` 'SIGCONT' ` events
177
179
will be emitted. These can be used to resume the ` input ` stream.
@@ -288,9 +290,9 @@ added: v0.1.98
288
290
289
291
* ` data ` {string}
290
292
* ` key ` {Object}
291
- * ` ctrl ` {boolean} ` true ` to indicate the ` <ctrl> ` key.
292
- * ` meta ` {boolean} ` true ` to indicate the ` < Meta> ` key.
293
- * ` shift ` {boolean} ` true ` to indicate the ` < Shift> ` key.
293
+ * ` ctrl ` {boolean} ` true ` to indicate the < kbd >Ctrl</ kbd > key.
294
+ * ` meta ` {boolean} ` true ` to indicate the < kbd > Meta</ kbd > key.
295
+ * ` shift ` {boolean} ` true ` to indicate the < kbd > Shift</ kbd > key.
294
296
* ` name ` {string} The name of the a key.
295
297
296
298
The ` rl.write() ` method will write either ` data ` or a key sequence identified
@@ -308,7 +310,7 @@ If the `readline.Interface` was created with `output` set to `null` or
308
310
309
311
``` js
310
312
rl .write (' Delete this!' );
311
- // Simulate Ctrl+u to delete the line written previously
313
+ // Simulate Ctrl+U to delete the line written previously
312
314
rl .write (null , { ctrl: true , name: ' u' });
313
315
```
314
316
@@ -751,117 +753,117 @@ const { createInterface } = require('readline');
751
753
<th>Notes</th>
752
754
</tr >
753
755
<tr >
754
- <td><code>ctrl</code> + <code>shift</code> + <code>backspace</code ></td>
756
+ <td><kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Backspace</kbd ></td>
755
757
<td>Delete line left</td>
756
758
<td>Doesn't work on Linux, Mac and Windows</td>
757
759
</tr >
758
760
<tr >
759
- <td><code>ctrl</code> + <code>shift</code> + <code>delete</code ></td>
761
+ <td><kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Delete</kbd ></td>
760
762
<td>Delete line right</td>
761
763
<td>Doesn't work on Mac</td>
762
764
</tr >
763
765
<tr >
764
- <td><code>ctrl</code> + <code>c</code ></td>
766
+ <td><kbd>Ctrl</kbd>+<kbd>C</kbd ></td>
765
767
<td>Emit <code>SIGINT</code> or close the readline instance</td>
766
768
<td></td>
767
769
</tr >
768
770
<tr >
769
- <td><code>ctrl</code> + <code>h</code ></td>
771
+ <td><kbd>Ctrl</kbd>+<kbd>H</kbd ></td>
770
772
<td>Delete left</td>
771
773
<td></td>
772
774
</tr >
773
775
<tr >
774
- <td><code>ctrl</code> + <code>d</code ></td>
776
+ <td><kbd>Ctrl</kbd>+<kbd>D</kbd ></td>
775
777
<td>Delete right or close the readline instance in case the current line is empty / EOF</td>
776
778
<td>Doesn't work on Windows</td>
777
779
</tr >
778
780
<tr >
779
- <td><code>ctrl</code> + <code>u</code ></td>
781
+ <td><kbd>Ctrl</kbd>+<kbd>U</kbd ></td>
780
782
<td>Delete from the current position to the line start</td>
781
783
<td></td>
782
784
</tr >
783
785
<tr >
784
- <td><code>ctrl</code> + <code>k</code ></td>
786
+ <td><kbd>Ctrl</kbd>+<kbd>K</kbd ></td>
785
787
<td>Delete from the current position to the end of line</td>
786
788
<td></td>
787
789
</tr >
788
790
<tr >
789
- <td><code>ctrl</code> + <code>a</code ></td>
791
+ <td><kbd>Ctrl</kbd>+<kbd>A</kbd ></td>
790
792
<td>Go to start of line</td>
791
793
<td></td>
792
794
</tr >
793
795
<tr >
794
- <td><code>ctrl</code> + <code>e</code ></td>
796
+ <td><kbd>Ctrl</kbd>+<kbd>E</kbd ></td>
795
797
<td>Go to to end of line</td>
796
798
<td></td>
797
799
</tr >
798
800
<tr >
799
- <td><code>ctrl</code> + <code>b</code ></td>
801
+ <td><kbd>Ctrl</kbd>+<kbd>B</kbd ></td>
800
802
<td>Back one character</td>
801
803
<td></td>
802
804
</tr >
803
805
<tr >
804
- <td><code>ctrl</code> + <code>f</code ></td>
806
+ <td><kbd>Ctrl</kbd>+<kbd>F</kbd ></td>
805
807
<td>Forward one character</td>
806
808
<td></td>
807
809
</tr >
808
810
<tr >
809
- <td><code>ctrl</code> + <code>l</code ></td>
811
+ <td><kbd>Ctrl</kbd>+<kbd>L</kbd ></td>
810
812
<td>Clear screen</td>
811
813
<td></td>
812
814
</tr >
813
815
<tr >
814
- <td><code>ctrl</code> + <code>n</code ></td>
816
+ <td><kbd>Ctrl</kbd>+<kbd>N</kbd ></td>
815
817
<td>Next history item</td>
816
818
<td></td>
817
819
</tr >
818
820
<tr >
819
- <td><code>ctrl</code> + <code>p</code ></td>
821
+ <td><kbd>Ctrl</kbd>+<kbd>P</kbd ></td>
820
822
<td>Previous history item</td>
821
823
<td></td>
822
824
</tr >
823
825
<tr >
824
- <td><code>ctrl</code> + <code>z</code ></td>
826
+ <td><kbd>Ctrl</kbd>+<kbd>Z</kbd ></td>
825
827
<td>Moves running process into background. Type
826
- <code>fg</code> and press <code>enter</code >
828
+ <code>fg</code> and press <kbd>Enter</kbd >
827
829
to return.</td>
828
830
<td>Doesn't work on Windows</td>
829
831
</tr >
830
832
<tr >
831
- <td><code>ctrl</code> + <code>w</code > or <code>ctrl</code >
832
- + <code>backspace</code ></td>
833
+ <td><kbd>Ctrl</kbd>+<kbd>W</kbd > or <kbd>Ctrl</kbd >
834
+ +< kbd >Backspace</ kbd ></td >
833
835
<td >Delete backward to a word boundary</td >
834
- <td><code>ctrl</code> + <code>backspace</code > Doesn't
836
+ <td ><kbd >Ctrl</ kbd >+< kbd >Backspace</ kbd > Doesn't
835
837
work on Linux, Mac and Windows</td >
836
838
</tr >
837
839
<tr >
838
- <td><code>ctrl</code> + <code>delete</code ></td>
840
+ <td><kbd>Ctrl</kbd>+<kbd>Delete</kbd ></td>
839
841
<td>Delete forward to a word boundary</td>
840
842
<td>Doesn't work on Mac</td>
841
843
</tr >
842
844
<tr >
843
- <td><code>ctrl</code> + <code>left</code > or
844
- <code>meta</code> + <code>b</code ></td>
845
+ <td><kbd>Ctrl</kbd>+<kbd>Left arrow</kbd > or
846
+ <kbd>Meta</kbd>+<kbd>B</kbd ></td>
845
847
<td>Word left</td>
846
- <td><code>ctrl</code> + <code>left</code > Doesn't work
848
+ <td><kbd>Ctrl</kbd>+<kbd>Left arrow</kbd > Doesn't work
847
849
on Mac</td>
848
850
</tr >
849
851
<tr >
850
- <td><code>ctrl</code> + <code>right</code > or
851
- <code>meta</code> + <code>f</code ></td>
852
+ <td><kbd>Ctrl</kbd>+<kbd>Right arrow</kbd > or
853
+ <kbd>Meta</kbd>+<kbd>F</kbd ></td>
852
854
<td>Word right</td>
853
- <td><code>ctrl</code> + <code>right</code > Doesn't work
855
+ <td><kbd>Ctrl</kbd>+<kbd>Right arrow</kbd > Doesn't work
854
856
on Mac</td>
855
857
</tr >
856
858
<tr >
857
- <td><code>meta</code> + <code>d</code > or <code>meta</code >
858
- + <code>delete</code ></td>
859
+ <td><kbd>Meta</kbd>+<kbd>D</kbd > or <kbd>Meta</kbd >
860
+ +< kbd >Delete</ kbd ></td >
859
861
<td >Delete word right</td >
860
- <td><code>meta</code> + <code>delete</code > Doesn't work
862
+ <td ><kbd >Meta</ kbd >+< kbd >Delete</ kbd > Doesn't work
861
863
on windows</td >
862
864
</tr >
863
865
<tr >
864
- <td><code>meta</code> + <code>backspace</code ></td>
866
+ <td><kbd>Meta</kbd>+<kbd>Backspace</kbd ></td>
865
867
<td>Delete word left</td>
866
868
<td>Doesn't work on Mac</td>
867
869
</tr >
0 commit comments