bashlike_edit_help.html 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <!DOCTYPE html PUBLIC "-//IETF//DTD HTML 3.0//EN">
  2. <html>
  3. <head>
  4. <title>Lynx Line Editor Bash-Like Key Binding</title>
  5. <link rev="made" href="mailto:lynx-dev@nongnu.org">
  6. <link rel="Sibling" title="Default Binding" href="edit_help.html">
  7. <link rel="Sibling" title="Alternative Binding" href="alt_edit_help.html">
  8. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  9. </head>
  10. <body>
  11. <h1>+++BASH-LIKE BINDING+++</h1>
  12. Lynx invokes a built-in <em>Line Editor</em> for entering strings in
  13. response to prompts, in forms, and for email messages if an external editor
  14. has not been defined. Several sets of key-bindings can be offered
  15. by configuring with --enable-alt-bindings or by adding them in
  16. LYEditmap.c before compiling Lynx. If available,
  17. they may be selected via the 'o'ptions menu, or by editing lineedit_mode in
  18. the '.lynxrc' file.
  19. <p>Note: setting emacs/vi keys ON has no direct effect on line-editor bindings.
  20. <p>This is the <em>Bash-like Binding</em> keymap.</p>
  21. <h2>Basic commands</h2>
  22. <pre>
  23. ENTER Input complete - Enter, RETURN
  24. TAB Completion [2]/ Next - TAB, Do
  25. ABORT Cancel / Undo Change - C-g, C-_
  26. ERASE Erase the line - M-k, C-x k
  27. BACK Cursor back char - Left-Arrow, C-b
  28. FORW Cursor forward char - Right-Arrow, C-f
  29. BACKW Cursor back word - M-b, C-r
  30. FORWW Cursor forward word - M-f, C-s [5]
  31. BOL Go to begin of line - C-a, Home, Find
  32. EOL Go to end of line - C-e [4], End, Select
  33. DELP Delete prev char - C-h, Backspace, Rubout
  34. DELN Delete next [1] char - C-d, Delete, Remove
  35. DELPW Delete prev word - C-w [3], M-Backspace, M-Delete (?)
  36. DELNW Delete next word - M-d
  37. DELBL Delete to beg of line - C-u
  38. DELEL Delete to end of line - C-k [4]
  39. UPPER Upper case the line - M-u
  40. LOWER Lower case the line - M-l
  41. LKCMD Invoke cmd prompt - C-v [FORM]
  42. SWMAP Switch input keymap - C-^ (if compiled in)
  43. <A NAME="TASpecial">Special commands for use in textarea fields</A> [FORM]:
  44. PASS! Textarea external edit - C-e C-e [4], C-x e
  45. PASS! Insert file in textarea - C-x i
  46. PASS! Grow textarea - C-x g
  47. </pre>
  48. Here is a little textarea for practice:<BR>
  49. <FORM action=""><TEXTAREA name="practice" cols=40 ROWS=5>
  50. This text cannot be submitted. Normally lines like
  51. these would be part of a form that is filled out and
  52. then submitted. You can move around here and delete
  53. or add text as you like, using the Line-Editor keys.
  54. </TEXTAREA><INPUT TYPE=reset VALUE="[reset content]"></FORM>
  55. <pre>
  56. Advanced emacs-like commands:
  57. TPOS Transpose characters - C-t
  58. SETMARK Set mark at current position in line - C-@
  59. XPMARK Exchange current position with mark - C-x C-x
  60. KILLREG Kill region between mark and position - C-x C-w [3]
  61. YANK Insert text last killed (with KILLREG) - C-y
  62. </pre>
  63. <h2>Notes</h2>
  64. <P><samp>
  65. <DFN>C-</DFN><strong>key</strong> means Control+<strong><kbd>key</kbd></strong>. <DFN
  66. ><code>C-x </code></DFN><strong>key</strong> means first Control+<kbd>x</kbd>, then
  67. <strong><kbd>key</kbd></strong>.
  68. <DFN
  69. >M-</DFN>key means Meta+<strong><kbd>key</kbd></strong>, where Meta
  70. is a modifier that can be entered in a variety of ways:
  71. </samp></P><UL>
  72. <LI>First ESC, then the <strong><kbd>key</kbd></strong>.
  73. This doesn't work with all systems or on all connections, and if it
  74. does may not work for some keys (because the ESC character is also
  75. part of code sequences for "normal" function keys).
  76. <LI>Alt+<strong><kbd>key</kbd></strong>.
  77. This works if the terminal, console, or comm program is set up to
  78. interpret Alt as a modifier to send ESC. The Linux console acts
  79. like that by default for most keys; Kermit can be set up to do it,
  80. xterm can be for some keys, and so on. But the same caveats as for
  81. the previous item apply.
  82. This Alt mapping may also be possible, independent of the ESC character,
  83. for some keys in Lynx for DOS/i386 or for Win32.
  84. <LI>C-x <strong><kbd>key</kbd></strong>.
  85. Actually, currently the same internal table is used for Meta and the
  86. C-x prefix. Therefore all M-<strong><kbd>key</kbd></strong> combinations can
  87. also be typed as C-x <strong><kbd>key</kbd></strong>, and vice versa.
  88. </UL><pre>
  89. [1] "next" means the character "under" a box or underline style cursor; it
  90. means "to the immediate right of" an I-beam (between characters) type
  91. cursor.
  92. [2] For entering strings in response to prompts (that is, when not editing
  93. form text fields), some keys have different actions: TAB tries to
  94. complete input based on previous response; Up-Arrow and Down-Arrow
  95. may offer previous response and next response, respectively, from
  96. recall buffer for some prompts.
  97. [3] C-w can only be used for editing functions if its default KEYMAP
  98. to REFRESH is changed. This can be done in the lynx.cfg file,
  99. for example with the line "KEYMAP:^W:DO_NOTHING". This also applies
  100. for other keys: as long as the key's action is mapped to REFRESH,
  101. either with an explicit KEYMAP in lynx.cfg or by default, the
  102. key's Line Editor binding is disabled.
  103. [4] These keys invoke special behavior when pressed twice in a row:
  104. C-e C-e calls the external editor for changing the text in a
  105. textarea (if available). C-k C-k will move to the next link,
  106. so that all lines in a textarea can be conveniently cleared by
  107. repeating C-k.
  108. [5] Key is likely unavailable for Lynx, because it is interpreted by
  109. operating system, comm program, or curses library, or swallowed
  110. as part of escape sequence recognition. Binding is provided for
  111. the benefit of those where this doesn't apply.
  112. [FORM] In form text fields, only. Ignored by Line Editor elsewhere.
  113. More notes
  114. When a text input field, including a textarea line, is selected,
  115. the Line Editor functions get a first grab at the keys entered.
  116. If a key has no function defined in the Line Editor binding, it
  117. can either be ignored, or passed on for normal key command handling,
  118. where modifiers like C-x or Meta currently have no effect (see the
  119. <A HREF="LYNXKEYMAP:"
  120. >Key Map Page</A> accessible with the key <kbd>K</kbd> for current information).
  121. </pre>
  122. <h2>Additional details on other keys, for the curious
  123. (very much subject to change)</h2>
  124. <pre>
  125. Normal key action when used in form fields, subject to remapping
  126. with KEYMAP: [FORM (except Up-Arrow, Down-Arrow)]
  127. C-l [3], C-o, C-z [5], C-\ [5], C-] [5]
  128. C-n [emacskey], C-p [emacskey]
  129. Up-Arrow [2], Down-Arrow [2]
  130. Page-Up, Page-Down, F1, Back-Tab
  131. Normal key command with Meta modifier ignored when used in form fields,
  132. subject to remapping with KEYMAP: [FORM (except Up-Arrow, Down-Arrow)]
  133. M-C-l [3], M-C-o [!], M-C-z [5], M-C-\ [5], M-C-] [5]
  134. M-C-u, M-/, M-n
  135. M-Up-Arrow [2][!], M-Down-Arrow [2][!]
  136. M-Page-Up [!], M-Page-Down [!], M-Home, M-End
  137. Passed as specific command:
  138. lynx action duplicates by default
  139. ----------- ---------------------
  140. M-C-d NEXT_LINK Down-Arrow
  141. M-C-e EDITTEXTAREA C-e C-e
  142. M-C-k LPOS_NEXT_LINK (none, Down-Arrow suggested)
  143. M-e EDITTEXTAREA C-e C-e
  144. M-g GROWTEXTAREA (none, C-v $ suggested?)
  145. M-i INSERTFILE (none, C-v # suggested?)
  146. M-&lt; HOME M-Home
  147. M-&gt; END M-End
  148. M-F1 DWIMHELP F1
  149. M-Find WHEREIS C-v /
  150. M-Select NEXT C-v n
  151. Duplicates function of other key(s):
  152. edit action duplicates
  153. ----------- ----------
  154. M-C-b BACKW M-b, C-r
  155. M-C-f FORWW M-f
  156. M-C-n FORWW M-f
  157. M-C-p BACKW M-b, C-r
  158. M-C-r BACKW M-b, C-r
  159. M-a BOL C-a, Home, ...
  160. Modifier ignored, and duplicates function of other key(s):
  161. edit action duplicates
  162. ----------- ----------
  163. M-C-a BOL C-a, Home, ...
  164. M-C-g ABORT C-g, ...
  165. M-TAB TAB C-i [!]
  166. M-C-j ENTER C-m, C-j, Enter / RETURN
  167. M-RETURN ENTER C-m, C-j, Enter / RETURN
  168. M-C-y YANK C-y [!]
  169. M-C-^ SWMAP C-^ [!] (if compiled in)
  170. M-Right-Arrow FORW Right-Arrow [!], C-f
  171. M-Left-Arrow BACK Left-Arrow [!], C-b
  172. M-Do TAB C-i [!]
  173. Key completely ignored:
  174. C-q, Insert
  175. M-C-q, M-C-s [5], M-C-t, M-C-v, M-ESC
  176. M-C-@, M-C-_, M-Remove, M-Insert [!]
  177. Meta + other (mostly, printable character) keys:
  178. Modifier ignored, or sequence swallowed (see [5]).
  179. M-@, M-E...M-Z [5], M-\, M-^, M-_ attempt to interpret
  180. as 7-bit escape representation for character in 8-bit
  181. control (C1) range if appropriate according to
  182. Display Character Set.
  183. [emacskey] Normal key action subject to emacs_keys setting.
  184. [!] Action of key with Meta modifier follows action of key without
  185. Meta. If you manage to enter the Meta key while Line-Editor
  186. Binding is not set to Bash-Like, and the unmodified binding
  187. is different from that listed here, M-&lt;<var>key</var>&gt; will act
  188. like &lt;<var>key</var>&gt;.
  189. </pre>
  190. </body>
  191. </html>