## Overview

Lynx invokes a built-in Line Editor 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 Lynx was configured with `--disable-alt-bindings`). If available, they may be selected via the “o”ptions menu, or by editing lineedit_mode in the “.lynxrc” file.

Two such alternative key bindings, which may be available on your system, are the

- Alternative Binding keymap and the
- Bash-like Binding keymap.

You can always see the current set of key-bindings in Lynx by opening the special URL LYNXEDITMAP:. This page is provided for those not using Lynx.

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

## Regular Keymap

This is the Default Binding keymap:

         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 (see note 1)
         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) (see note 2)
         SWMAP  Switch input keymap   -  Ctrl-^ (if compiled in)

## Editing Keymap

These are special commands for use only in textarea fields (see note 3):

              Textarea external edit  - Ctrl-X e
              Insert file in textarea - Ctrl-X i
              Grow textarea           - Ctrl-X g

## Emacs-like commands

        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 (see note 3)
        YANK    Insert text last killed (with KILLREG) -  Ctrl-y

## Try it yourself

Here is a little textarea for practice:

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.

## Special keys

`Ctrl-key means Control+`key`. `Ctrl-x` key means first Control+`x`, then `key`. M-key means Meta+`key`, where Meta is a modifier that can be entered in a variety of ways:`

- First ESC, then the `key`. 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).
- Alt+`key`. 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.
- Ctrl-x `key`. Actually, currently the same internal table is used for Meta and the Ctrl-x prefix. Therefore all M-`key` combinations can also be typed as Ctrl-x `key`, and vice versa.

A few key names may be less familiar now than when Lynx was first written: Find, Select and Remove. The XTerm FAQ shows some typical keypad layouts of emulators for VT220 and other DEC terminals.

The VT220 did not have a “backspace” key but Lynx's default bindings mention it. Both ASCII `BS` (backspace) and `DEL` are bound by default to the same functions. `DEL` (occasionally referred to as `RUBOUT`) is not the same as `Delete`: the former is a single character while the latter is usually a sequence of characters.

## Notes

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.
2. Follow Ctrl-V with any recognized key command, to "escape" from a text input field.
3. For other key combinations using Ctrl-X as a prefix key, see the Help page for the Bash-Like Binding.