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