191 lines
7.3 KiB
HTML
191 lines
7.3 KiB
HTML
<!-- $LynxId: edit_help.html,v 1.30 2021/07/01 21:02:38 tom Exp $ -->
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
|
<html>
|
|
<head>
|
|
<meta name="generator" content=
|
|
"HTML Tidy for HTML5 for Linux version 5.6.0">
|
|
<title>Lynx Line Editor Default Key Binding</title>
|
|
<link rev="made" href="mailto:lynx-dev@nongnu.org">
|
|
<meta http-equiv="Content-Type" content=
|
|
"text/html; charset=us-ascii">
|
|
<meta name="description" content=
|
|
"Describes Lynx's built-in line-editor, when it is used, and the keys used for the default binding. There are alternate and special bindings.">
|
|
</head>
|
|
<body>
|
|
<div class="nav">
|
|
<ul>
|
|
<li><a href="#overview">Overview</a></li>
|
|
|
|
<li><a href="#regular_keymap">Regular Keymap</a></li>
|
|
|
|
<li><a href="#editing_keymap">Editing Keymap</a></li>
|
|
|
|
<li><a href="#examples">Try it yourself</a></li>
|
|
|
|
<li><a href="#notes">Notes</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<h2><a name="overview" id="overview">Overview</a></h2>
|
|
|
|
<p><strong>Lynx</strong> invokes a built-in <em>Line Editor</em>
|
|
for entering strings in response to prompts, in forms, and for
|
|
email messages if an external editor has not been defined.
|
|
Alternative key bindings are normally available (unless
|
|
<strong>Lynx</strong> was configured with
|
|
<code>--disable-alt-bindings</code>). If available, they may be
|
|
selected via the “o”ptions menu, or by editing
|
|
lineedit_mode in the “.lynxrc” file.</p>
|
|
|
|
<p>Two such alternative key bindings, which may be available on
|
|
your system, are the</p>
|
|
|
|
<ul>
|
|
<li><a href="alt_edit_help.html">Alternative Binding</a> keymap
|
|
and the</li>
|
|
|
|
<li><a href="bashlike_edit_help.html">Bash-like Binding</a>
|
|
keymap.</li>
|
|
</ul>
|
|
|
|
<p>You can always see the current set of key-bindings in
|
|
<strong>Lynx</strong> by opening the special URL <a href=
|
|
"LYNXEDITMAP:">LYNXEDITMAP:</a>. This page is provided for those
|
|
not using Lynx.</p>
|
|
|
|
<p><strong><em>Note:</em></strong> setting emacs/vi keys ON has
|
|
no effect on line-editor bindings.</p>
|
|
|
|
<h2><a name="regular_keymap" id="regular_keymap">Regular
|
|
Keymap</a></h2>
|
|
|
|
<p>This is the <em>Default Binding</em> keymap:</p>
|
|
|
|
<pre>
|
|
ENTER Input complete - RETURN
|
|
TAB Input complete - TAB, Do
|
|
ABORT Input cancelled - Ctrl-G, Ctrl-O, (Ctrl-C on some systems)
|
|
ERASE Erase the line - Ctrl-U
|
|
|
|
BACK Cursor back char - Left-Arrow
|
|
FORW Cursor forward char - Right-Arrow
|
|
BACKW Cursor back word - Ctrl-P
|
|
FORWW Cursor forward word - Ctrl-N
|
|
BOL Go to begin of line - Ctrl-A, Home, Find
|
|
EOL Go to end of line - Ctrl-E, End, Select
|
|
|
|
DELP Delete prev char - Backspace, Delete, Remove
|
|
DELN Delete next char - Ctrl-D, Ctrl-R (<em><a href=
|
|
"#note_1">see note 1</a></em>)
|
|
DELPW Delete prev word - Ctrl-B
|
|
DELNW Delete next word - Ctrl-F
|
|
DELEL Delete to end of line - Ctrl-_
|
|
|
|
UPPER Upper case the line - Ctrl-T
|
|
LOWER Lower case the line - Ctrl-K
|
|
|
|
LKCMD Invoke cmd prompt - Ctrl-V (in form text fields, only) (<em><a href="#note_2">see note 2</a></em>)
|
|
SWMAP Switch input keymap - Ctrl-^ (if compiled in)
|
|
</pre>
|
|
<h2><a name="editing_keymap" id="editing_keymap">Editing
|
|
Keymap</a></h2>
|
|
|
|
<p><a name="TASpecial" id="TASpecial">These are special commands
|
|
for use only in textarea fields</a> (<em><a href="#note_3">see
|
|
note 3</a></em>):</p>
|
|
|
|
<pre>
|
|
Textarea external edit - Ctrl-X e
|
|
Insert file in textarea - Ctrl-X i
|
|
Grow textarea - Ctrl-X g
|
|
</pre>
|
|
<h2><a name="emacs_bindings" id="emacs_bindings">Emacs-like
|
|
commands</a></h2>
|
|
|
|
<pre>
|
|
TPOS Transpose characters - Ctrl-t
|
|
SETMARK Set mark at current position in line - Ctrl-@
|
|
XPMARK Exchange current position with mark - Ctrl-x Ctrl-x
|
|
KILLREG Kill region between mark and position - Ctrl-x Ctrl-w (<em><a href="#note_3">see note 3</a></em>)
|
|
YANK Insert text last killed (with KILLREG) - Ctrl-y
|
|
</pre>
|
|
<h2><a name="examples" id="examples">Try it yourself</a></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><a name="special_keys" id="special_keys">Special keys</a></h2>
|
|
|
|
<p><samp><dfn>Ctrl-</dfn><strong>key</strong> means
|
|
Control+<strong><kbd>key</kbd></strong>.
|
|
<dfn><code>Ctrl-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
|
|
does not 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
|
|
<strong>Lynx</strong> for DOS/i386 or for Win32.</li>
|
|
|
|
<li>Ctrl-x <strong><kbd>key</kbd></strong>. Actually, currently
|
|
the same internal table is used for Meta and the Ctrl-x prefix.
|
|
Therefore all M-<strong><kbd>key</kbd></strong> combinations
|
|
can also be typed as Ctrl-x <strong><kbd>key</kbd></strong>,
|
|
and vice versa.</li>
|
|
</ul>
|
|
|
|
<p>A few key names may be less familiar now than when
|
|
<strong>Lynx</strong> was first written: <em>Find</em>,
|
|
<em>Select</em> and <em>Remove</em>. The <a href=
|
|
"https://invisible-island.net/xterm/xterm.faq.html#xterm_keypad">XTerm
|
|
FAQ</a> shows some typical keypad layouts of emulators for VT220
|
|
and other DEC terminals.</p>
|
|
|
|
<p>The VT220 did not have a “backspace” key but
|
|
<strong>Lynx</strong>'s default bindings mention it. Both ASCII
|
|
<samp>BS</samp> (backspace) and <samp>DEL</samp> are bound by
|
|
default to the same functions. <samp>DEL</samp> (occasionally
|
|
referred to as <samp>RUBOUT</samp>) is not the same as
|
|
<samp>Delete</samp>: the former is a single character while the
|
|
latter is usually a sequence of characters.</p>
|
|
|
|
<h2><a name="notes" id="notes">Notes</a></h2>
|
|
|
|
<ol>
|
|
<li id="note_1">"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 id="note_2">Follow Ctrl-V with any recognized key command,
|
|
to "escape" from a text input field.</li>
|
|
|
|
<li id="note_3">For other key combinations using Ctrl-X as a
|
|
prefix key, see the Help page for the <a rel="Sibling" title=
|
|
"Bash-Like Binding" href=
|
|
"bashlike_edit_help.html">Bash-Like</a> Binding.</li>
|
|
</ol>
|
|
</body>
|
|
</html>
|