File: bashlike_edit_help.html

package info (click to toggle)
lynx 2.8.9dev11-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 16,556 kB
  • ctags: 12,873
  • sloc: ansic: 133,772; sh: 3,560; makefile: 1,139; perl: 995; yacc: 743
file content (253 lines) | stat: -rw-r--r-- 10,738 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
<!-- $LynxId: bashlike_edit_help.html,v 1.10 2014/01/08 00:50:05 tom Exp $ -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">

<html>
<head>
  <meta name="generator" content=
  "HTML Tidy for Linux (vers 25 March 2009), see www.w3.org">

  <title>Lynx Line Editor Bash-Like Key Binding</title>
  <link rev="made" href="mailto:lynx-dev@nongnu.org">
  <link rel="Sibling" title="Default Binding" href=
  "edit_help.html">
  <link rel="Sibling" title="Alternative Binding" href=
  "alt_edit_help.html">
  <meta http-equiv="Content-Type" content=
  "text/html; charset=us-ascii">
  <meta name="description" content=
  "Describes the bash-like line editor bindings for Lynx. This is one of the alternate bindings normally compiled-in">
  </head>

<body>
  <h2>Overview</h2>

  <p>Lynx invokes a built-in <a href="edit_help.html">Line
  Editor</a> for entering strings in response to prompts, in forms,
  and for email messages if an external editor has not been
  defined. Several sets of key-bindings can be offered by
  configuring with --enable-alt-bindings or by adding them in
  LYEditmap.c before compiling Lynx. If available, they may be
  selected via the 'o'ptions menu, or by editing lineedit_mode in
  the '.lynxrc' file.</p>

  <p>Note: setting emacs/vi keys ON has no direct effect on
  line-editor bindings.</p>

  <p>This summarizes the <em>Bash-like Binding</em> keymap.</p>

  <h2>Basic commands</h2>
  <pre>
     ENTER  Input complete        -  Enter, RETURN
     TAB    Completion / Next     -  TAB, Do (<em>see note 2</em>)
     ABORT  Cancel / Undo Change  -  C-g, C-_
     ERASE  Erase the line        -  M-k, C-x k

     BACK   Cursor back     char  -  Left-Arrow,  C-b
     FORW   Cursor forward  char  -  Right-Arrow, C-f
     BACKW  Cursor back     word  -  M-b, C-r
     FORWW  Cursor forward  word  -  M-f, C-s (<em>see note 5</em>)
     BOL    Go to begin of  line  -  C-a, Home, Find
     EOL    Go to end   of  line  -  C-e, End,  Select (<em>see note 4</em>)

     DELP   Delete prev     char  -  C-h, Backspace, Rubout
     DELN   Delete next     char  -  C-d, Delete, Remove (<em>see note 1</em>)
     DELPW  Delete prev     word  -  C-w, M-Backspace, M-Delete (?) (<em>see note 3</em>)
     DELNW  Delete next     word  -  M-d
     DELBL  Delete to beg of line -  C-u
     DELEL  Delete to end of line -  C-k (<em>see note 4</em>)

     UPPER  Upper case the line   -  M-u
     LOWER  Lower case the line   -  M-l

     LKCMD  Invoke cmd prompt     -  C-v [FORM]
     SWMAP  Switch input keymap   -  C-^ (if compiled in)

<a name="TASpecial" id=
"TASpecial">Special commands for use in textarea fields</a> [FORM]:

     PASS!  Textarea external edit  - C-e C-e, C-x e (<em>see note 4</em>)
     PASS!  Insert file in textarea - C-x i
     PASS!  Grow textarea           - C-x g
</pre>

  <h2>Try it yourself</h2>

  <p>Here is a little textarea for practice:</p>

  <form action="">
    <p>
    <textarea name="practice" cols="40" rows="5">
This text cannot be submitted.  Normally lines like
these would be part of a form that is filled out and
then submitted.  You can move around here and delete
or add text as you like, using the Line-Editor keys.
</textarea><input type="reset" value="[reset content]"></p>
  </form>

  <h2>Advanced emacs-like commands</h2>
  <pre>

    TPOS    Transpose characters                   -  C-t
    SETMARK Set mark at current position in line   -  C-@
    XPMARK  Exchange current position with mark    -  C-x C-x
    KILLREG Kill region between mark and position  -  C-x C-w (<em>see note 3</em>)
    YANK    Insert text last killed (with KILLREG) -  C-y
</pre>

  <h2>Comments on special keys</h2>

  <p><samp><dfn>C-</dfn><strong>key</strong> means
  Control+<strong><kbd>key</kbd></strong>.
  <dfn><code>C-x</code></dfn> <strong>key</strong> means first
  Control+<kbd>x</kbd>, then <strong><kbd>key</kbd></strong>.
  <dfn>M-</dfn>key means Meta+<strong><kbd>key</kbd></strong>,
  where Meta is a modifier that can be entered in a variety of
  ways:</samp></p>

  <ul>
    <li>First ESC, then the <strong><kbd>key</kbd></strong>. This
    doesn't work with all systems or on all connections, and if it
    does may not work for some keys (because the ESC character is
    also part of code sequences for "normal" function keys).</li>

    <li>Alt+<strong><kbd>key</kbd></strong>. This works if the
    terminal, console, or comm program is set up to interpret Alt
    as a modifier to send ESC. The Linux console acts like that by
    default for most keys; Kermit can be set up to do it, xterm can
    be for some keys, and so on. But the same caveats as for the
    previous item apply. This Alt mapping may also be possible,
    independent of the ESC character, for some keys in Lynx for
    DOS/i386 or for Win32.</li>

    <li>C-x <strong><kbd>key</kbd></strong>. Actually, currently
    the same internal table is used for Meta and the C-x prefix.
    Therefore all M-<strong><kbd>key</kbd></strong> combinations
    can also be typed as C-x <strong><kbd>key</kbd></strong>, and
    vice versa.</li>
  </ul>

  <h2>Notes</h2>

  <ol>
    <li>"next" means the character "under" a box or underline style
    cursor; it means "to the immediate right of" an I-beam (between
    characters) type cursor.</li>

    <li>For entering strings in response to prompts (that is, when
    not editing form text fields), some keys have different
    actions: TAB tries to complete input based on previous
    response; Up-Arrow and Down-Arrow may offer previous response
    and next response, respectively, from recall buffer for some
    prompts.</li>

    <li>C-w can only be used for editing functions if its default
    KEYMAP to REFRESH is changed. This can be done in the lynx.cfg
    file, for example with the line "KEYMAP:^W:DO_NOTHING". This
    also applies for other keys: as long as the key's action is
    mapped to REFRESH, either with an explicit KEYMAP in lynx.cfg
    or by default, the key's Line Editor binding is disabled.</li>

    <li>These keys invoke special behavior when pressed twice in a
    row: C-e C-e calls the external editor for changing the text in
    a textarea (if available). C-k C-k will move to the next link,
    so that all lines in a textarea can be conveniently cleared by
    repeating C-k.</li>

    <li>Key is likely unavailable for Lynx, because it is
    interpreted by operating system, comm program, or curses
    library, or swallowed as part of escape sequence recognition.
    Binding is provided for the benefit of those where this doesn't
    apply.</li>

    <li>where <strong>[FORM]</strong> is marked, indicates that the
    binding is effective only in form text fields. It is ignored by
    Line Editor elsewhere.</li>
  </ol>

  <p>When a text input field, including a textarea line, is
  selected, the Line Editor functions get a first grab at the keys
  entered. If a key has no function defined in the Line Editor
  binding, it can either be ignored, or passed on for normal key
  command handling, where modifiers like C-x or Meta currently have
  no effect (see the <a href="LYNXKEYMAP:">Key Map Page</a>
  accessible with the key <kbd>K</kbd> for current
  information).</p>

  <h2>Additional details on other keys, for the curious (very much
  subject to change)</h2>
  <pre>
Normal key action when used in form fields, subject to remapping
with KEYMAP: [FORM (except Up-Arrow, Down-Arrow)]
            C-l (<em>see note 3</em>) C-o, C-z [5], C-\ [5], C-] [5] (<em>see note 5</em>)
            C-n [emacskey], C-p [emacskey]
            Up-Arrow, Down-Arrow (<em>see note 2</em>)
            Page-Up, Page-Down, F1, Back-Tab

Normal key command with Meta modifier ignored when used in form fields,
subject to remapping with KEYMAP: [FORM (except Up-Arrow, Down-Arrow)]
            M-C-l (<em>see note 3</em>) M-C-o [!], M-C-z [5], M-C-\ [5], M-C-] [5] (<em>see note 5</em>)
            M-C-u, M-/, M-n
            M-Up-Arrow [!], M-Down-Arrow [!] (<em>see note 2</em>)
            M-Page-Up [!], M-Page-Down [!], M-Home, M-End

Passed as specific command:
                     lynx action    duplicates by default
                     -----------    ---------------------
            M-C-d    NEXT_LINK      Down-Arrow
            M-C-e    EDITTEXTAREA   C-e C-e
            M-C-k    LPOS_NEXT_LINK (none, Down-Arrow suggested)
            M-e      EDITTEXTAREA   C-e C-e
            M-g      GROWTEXTAREA   (none, C-v $ suggested?)
            M-i      INSERTFILE     (none, C-v # suggested?)
            M-&lt;      HOME           M-Home
            M-&gt;      END            M-End
            M-F1     DWIMHELP       F1
            M-Find   WHEREIS        C-v /
            M-Select NEXT           C-v n

Duplicates function of other key(s):
                     edit action    duplicates
                     -----------    ----------
            M-C-b    BACKW          M-b, C-r
            M-C-f    FORWW          M-f
            M-C-n    FORWW          M-f
            M-C-p    BACKW          M-b, C-r
            M-C-r    BACKW          M-b, C-r
            M-a      BOL            C-a, Home, ...

Modifier ignored, and duplicates function of other key(s):
                     edit action    duplicates
                     -----------    ----------
            M-C-a    BOL            C-a, Home, ...
            M-C-g    ABORT          C-g, ...
            M-TAB    TAB            C-i [!]
            M-C-j    ENTER          C-m, C-j, Enter / RETURN
            M-RETURN ENTER          C-m, C-j, Enter / RETURN
            M-C-y    YANK           C-y [!]
            M-C-^    SWMAP          C-^ [!] (if compiled in)
       M-Right-Arrow FORW           Right-Arrow [!], C-f
        M-Left-Arrow BACK           Left-Arrow [!],  C-b
            M-Do     TAB            C-i [!]

Key completely ignored:
            C-q, Insert
            M-C-q, M-C-s [5], M-C-t, M-C-v, M-ESC (<em>see note 5</em>)
            M-C-@, M-C-_, M-Remove, M-Insert [!]

Meta + other (mostly, printable character) keys:
              Modifier ignored, or sequence swallowed (<em>see note 5</em>).
            M-@, M-E...M-Z, M-\, M-^, M-_ attempt to interpret
              as 7-bit escape representation for character in 8-bit
              control (C1) range if appropriate according to
              Display Character Set.

[emacskey] Normal key action subject to emacs_keys setting.

[!] Action of key with Meta modifier follows action of key without
    Meta.  If you manage to enter the Meta key while Line-Editor
    Binding is not set to Bash-Like, and the unmodified binding
    is different from that listed here, M-&lt;<var>key</var>&gt; will act
    like &lt;<var>key</var>&gt;.
</pre>
</body>
</html>