Debian Codegraph @

lynx_help/keystrokes/bashlike_edit_help.html

raw
1 <!-- $LynxId: bashlike_edit_help.html,v 1.23 2025/07/30 23:38:53 tom Exp $ -->
2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
3 <html>
4 <head>
5 <meta name="generator" content=
6 "HTML Tidy for HTML5 for Linux version 5.6.0">
7 <title>Lynx Line Editor Bash-Like Key Binding</title>
8 <link rel="author" href="mailto:[email protected]">
9 <link rel="Sibling" title="Default Binding" href=
10 "edit_help.html">
11 <link rel="Sibling" title="Alternative Binding" href=
12 "alt_edit_help.html">
13 <meta http-equiv="Content-Type" content=
14 "text/html; charset=us-ascii">
15 <meta name="description" content=
16 "Describes the bash-like line editor bindings for Lynx. This is one of the alternate bindings normally compiled-in">
17 </head>
18 <body>
19 <div class="nav">
20 <ul>
21 <li><a href="#overview">Overview</a></li>
22
23 <li><a href="#bash_bindings">Bash-like bindings</a></li>
24
25 <li><a href="#examples">Try it yourself</a></li>
26
27 <li><a href="#emacs_bindings">Emacs-like commands</a></li>
28
29 <li><a href="#special_keys">Comments on special keys</a></li>
30
31 <li><a href="#notes">Notes</a></li>
32
33 <li><a href="#miscellaneous">Additional details</a></li>
34 </ul>
35 </div>
36
37 <h2><a name="overview" id="overview">Overview</a></h2>
38
39 <p><strong>Lynx</strong> invokes a built-in <a href=
40 "edit_help.html">Line Editor</a> for entering strings in response
41 to prompts, in forms, and for email messages if an external
42 editor has not been defined. Alternative key bindings are
43 normally available (unless <strong>Lynx</strong> was configured
44 with <code>--disable-alt-bindings</code>). If available, they may
45 be selected via the &ldquo;o&rdquo;ptions menu, or by editing
46 lineedit_mode in the &ldquo;.lynxrc&rdquo; file.</p>
47
48 <p>You can always see the current set of key-bindings in
49 <strong>Lynx</strong> by opening the special URL <a href=
50 "LYNXEDITMAP:">LYNXEDITMAP:</a>. This page is provided for those
51 not using Lynx.</p>
52
53 <p><strong><em>Note:</em></strong> setting emacs/vi keys ON has
54 no direct effect on line-editor bindings.</p>
55
56 <h2><a name="bash_bindings" id="bash_bindings">Bash-like
57 bindings</a></h2>
58
59 <p>This is the <em>Bash-like Binding</em> keymap.</p>
60
61 <pre>
62 ENTER Input complete - Enter, RETURN
63 TAB Completion / Next - TAB, Do (<em><a href=
64 "#note_2">see note 2</a></em>)
65 ABORT Cancel / Undo Change - Ctrl-g, Ctrl-_
66 ERASE Erase the line - M-k, Ctrl-x k
67
68 BACK Cursor back char - Left-Arrow, Ctrl-b
69 FORW Cursor forward char - Right-Arrow, Ctrl-f
70 BACKW Cursor back word - M-b, Ctrl-r
71 FORWW Cursor forward word - M-f, Ctrl-s (<em><a href=
72 "#note_5">see note 5</a></em>)
73 BOL Go to begin of line - Ctrl-a, Home, Find
74 EOL Go to end of line - Ctrl-e, End, Select (<em><a href="#note_4">see note 4</a></em>)
75
76 DELP Delete prev char - Backspace
77 DELN Delete next char - Ctrl-d, Delete, Remove (<em><a href="#note_1">see note 1</a></em>)
78 DELPW Delete prev word - Ctrl-w, M-Backspace, M-Delete (<em><a href="#note_3">see note 3</a></em>)
79 DELNW Delete next word - M-d
80 DELBL Delete to beg of line - Ctrl-u
81 DELEL Delete to end of line - Ctrl-k (<em><a href=
82 "#note_4">see note 4</a></em>)
83
84 UPPER Upper case the line - M-u
85 LOWER Lower case the line - M-l
86
87 LKCMD Invoke cmd prompt - Ctrl-v [FORM] (<em><a href=
88 "#note_6">see note 6</a></em>)
89 SWMAP Switch input keymap - Ctrl-^ (if compiled in)
90
91 <a name="TASpecial" id=
92 "TASpecial">Special commands for use in textarea fields</a> [FORM]:
93
94 PASS! Textarea external edit - Ctrl-e Ctrl-e, Ctrl-x e (<em><a href="#note_4">see note 4</a></em>)
95 PASS! Insert file in textarea - Ctrl-x i
96 PASS! Grow textarea - Ctrl-x g
97 </pre>
98 <h2><a name="examples" id="examples">Try it yourself</a></h2>
99
100 <p>Here is a little textarea for practice:</p>
101
102 <form action="">
103 <p>
104 <textarea name="practice" cols="40" rows=
105 "5">This text cannot be submitted. Normally lines like
106 these would be part of a form that is filled out and
107 then submitted. You can move around here and delete
108 or add text as you like, using the Line-Editor keys.
109 </textarea><input type="reset" value="[reset content]">
110 </p>
111 </form>
112
113 <h2><a name="emacs_bindings" id="emacs_bindings">Emacs-like
114 commands</a></h2>
115
116 <pre>
117 TPOS Transpose characters - Ctrl-t
118 SETMARK Set mark at current position in line - Ctrl-@
119 XPMARK Exchange current position with mark - Ctrl-x Ctrl-x
120 KILLREG Kill region between mark and position - Ctrl-x Ctrl-w (<em><a href="#note_3">see note 3</a></em>)
121 YANK Insert text last killed (with KILLREG) - Ctrl-y
122 </pre>
123 <h2><a name="special_keys" id="special_keys">Special keys</a></h2>
124
125 <p>See the <em><a href="edit_help.html#special_keys">Lynx Line
126 Editor</a></em> page for an explanation of terminology and
127 key-names.</p>
128
129 <h2><a name="notes" id="notes">Notes</a></h2>
130
131 <ol>
132 <li id="note_1">"next" means the character "under" a box or
133 underline style cursor; it means "to the immediate right of" an
134 I-beam (between characters) type cursor.</li>
135
136 <li id="note_2">For entering strings in response to prompts
137 (that is, when not editing form text fields), some keys have
138 different actions: TAB tries to complete input based on
139 previous response; Up-Arrow and Down-Arrow may offer previous
140 response and next response, respectively, from recall buffer
141 for some prompts.</li>
142
143 <li id="note_3">Ctrl-w can only be used for editing functions
144 if its default KEYMAP to REFRESH is changed. This can be done
145 in the lynx.cfg file, for example with the line
146 "KEYMAP:^W:DO_NOTHING". This also applies for other keys: as
147 long as the key's action is mapped to REFRESH, either with an
148 explicit KEYMAP in lynx.cfg or by default, the key's Line
149 Editor binding is disabled.</li>
150
151 <li id="note_4">These keys invoke special behavior when pressed
152 twice in a row: Ctrl-e Ctrl-e calls the external editor for
153 changing the text in a textarea (if available). Ctrl-k Ctrl-k
154 will move to the next link, so that all lines in a textarea can
155 be conveniently cleared by repeating Ctrl-k.</li>
156
157 <li id="note_5">Key is likely unavailable for
158 <strong>Lynx</strong>, because it is interpreted by operating
159 system, comm program, or curses library, or swallowed as part
160 of escape sequence recognition. Binding is provided for the
161 benefit of those where this does not apply.</li>
162
163 <li id="note_6">where <strong>[FORM]</strong> is marked,
164 indicates that the binding is effective only in form text
165 fields. It is ignored by Line Editor elsewhere.</li>
166 </ol>
167
168 <p>When a text input field, including a textarea line, is
169 selected, the Line Editor functions get a first grab at the keys
170 entered. If a key has no function defined in the Line Editor
171 binding, it can either be ignored, or passed on for normal key
172 command handling, where modifiers like Ctrl-x or Meta currently
173 have no effect (see the <a href="LYNXKEYMAP:">Key Map Page</a>
174 accessible with the key <kbd>K</kbd> for current
175 information).</p>
176
177 <h2><a name="miscellaneous" id="miscellaneous">Additional
178 details</a></h2>
179
180 <p>Here are some additional details on other keys, for the
181 curious (very much subject to change)</p>
182
183 <pre>
184 Normal key action when used in form fields, subject to remapping
185 with KEYMAP: [FORM (except Up-Arrow, Down-Arrow)]
186 Ctrl-l (<em><a href="#note_3">see note 3</a></em>)
187 Ctrl-o, Ctrl-z, Ctrl-\, Ctrl-] (<em><a href=
188 "#note_5">see note 5</a></em>)
189 Ctrl-n [emacskey], Ctrl-p [emacskey]
190 Up-Arrow, Down-Arrow (<em><a href=
191 "#note_2">see note 2</a></em>)
192 Page-Up, Page-Down, F1, Back-Tab
193
194 Normal key command with Meta modifier ignored when used in form fields,
195 subject to remapping with KEYMAP: [FORM (except Up-Arrow, Down-Arrow)]
196 M-Ctrl-l (<em><a href=
197 "#note_3">see note 3</a></em>) M-Ctrl-o <a href="#no_meta">[!]</a>,
198 M-Ctrl-z, M-Ctrl-\, M-Ctrl-] (<em><a href=
199 "#note_5">see note 5</a></em>)
200 M-Ctrl-u, M-/, M-n
201 M-Up-Arrow <a href=
202 "#no_meta">[!]</a>, M-Down-Arrow <a href=
203 "#no_meta">[!]</a> (<em><a href="#note_2">see note 2</a></em>)
204 M-Page-Up <a href=
205 "#no_meta">[!]</a>, M-Page-Down <a href=
206 "#no_meta">[!]</a>, M-Home, M-End
207
208 Passed as specific command:
209 lynx action duplicates by default
210 ----------- ---------------------
211 M-Ctrl-d NEXT_LINK Down-Arrow
212 M-Ctrl-e EDITTEXTAREA Ctrl-e Ctrl-e
213 M-Ctrl-k LPOS_NEXT_LINK (none, Down-Arrow suggested)
214 M-e EDITTEXTAREA Ctrl-e Ctrl-e
215 M-g GROWTEXTAREA (none, Ctrl-v $ suggested?)
216 M-i INSERTFILE (none, Ctrl-v # suggested?)
217 M-&lt; HOME M-Home
218 M-&gt; END M-End
219 M-F1 DWIMHELP F1
220 M-Find WHEREIS Ctrl-v /
221 M-Select NEXT Ctrl-v n
222
223 Duplicates function of other key(s):
224 edit action duplicates
225 ----------- ----------
226 M-Ctrl-b BACKW M-b, Ctrl-r
227 M-Ctrl-f FORWW M-f
228 M-Ctrl-n FORWW M-f
229 M-Ctrl-p BACKW M-b, Ctrl-r
230 M-Ctrl-r BACKW M-b, Ctrl-r
231 M-a BOL Ctrl-a, Home, ...
232
233 Modifier ignored, and duplicates function of other key(s):
234 edit action duplicates
235 ----------- ----------
236 M-Ctrl-a BOL Ctrl-a, Home, ...
237 M-Ctrl-g ABORT Ctrl-g, ...
238 M-TAB TAB Ctrl-i <a href=
239 "#no_meta">[!]</a>
240 M-Ctrl-j ENTER Ctrl-m, Ctrl-j, Enter / RETURN
241 M-RETURN ENTER Ctrl-m, Ctrl-j, Enter / RETURN
242 M-Ctrl-y YANK Ctrl-y <a href=
243 "#no_meta">[!]</a>
244 M-Ctrl-^ SWMAP Ctrl-^ <a href=
245 "#no_meta">[!]</a> (if compiled in)
246 M-Right-Arrow FORW Right-Arrow <a href=
247 "#no_meta">[!]</a>, Ctrl-f
248 M-Left-Arrow BACK Left-Arrow <a href=
249 "#no_meta">[!]</a>, Ctrl-b
250 M-Do TAB Ctrl-i <a href=
251 "#no_meta">[!]</a>
252
253 Key completely ignored:
254 Ctrl-q, Insert
255 M-Ctrl-q, M-Ctrl-s, M-Ctrl-t, M-Ctrl-v, M-ESC (<em><a href="#note_5">see note 5</a></em>)
256 M-Ctrl-@, M-Ctrl-_, M-Remove, M-Insert <a href=
257 "#no_meta">[!]</a>
258
259 Meta + other (mostly, printable character) keys:
260 Modifier ignored, or sequence swallowed (<em><a href=
261 "#note_5">see note 5</a></em>).
262 M-@, M-E...M-Z, M-\, M-^, M-_ attempt to interpret
263 as 7-bit escape representation for character in 8-bit
264 control (C1) range if appropriate according to
265 Display Character Set.
266
267 [emacskey] Normal key action subject to emacs_keys setting.
268
269 <a name="no_meta" id=
270 "no_meta">[!]</a> Action of key with Meta modifier follows action of key without
271 Meta. If you manage to enter the Meta key while Line-Editor
272 Binding is not set to Bash-Like, and the unmodified binding
273 is different from that listed here, M-&lt;<var>key</var>&gt; will act
274 like &lt;<var>key</var>&gt;.
275 </pre>
276 </body>
277 </html>