Keyboard Commands

The readline and history GNU libraries are integrated into the Tcl command interface. This allows you to use the following shortcuts (EMACS notation), for example:

Cursor position

<CTRL>-a Jumps to the beginning of the line
<CTRL>-e Jumps to the end of the line
<META>-b Jumps to the beginning of the previous word
<META>-f Jumps to the beginning of the next word

Line editing

<CTRL>-k Deletes the current line
<CTRL>-h
<backspace>
Deletes the previous character
<META>-<CTRL>-h
<META>-<backspace>
Deletes the previous word
<CTRL>-t Reverses the previous two characters
<META>-t Reverses the current and the previous word
<META>-r Restores line from the history
<CTRL>-_ Undoes last change

Command history

<CTRL>-p
<CURSOR_UP>
Previous command
<CTRL>-n
<CURSOR_DOWN>
Next Command
<CTRL>-r Incremental search backward
<CTRL>-s Incremental search forward (does not work on most terminals because <CTRL>-s will be interpreted as X-OFF)
<META>-< First command in the history
<META>-> Last command in the history

Additional commands

<CTRL>-l Delete contents of window
<META><number><command> Repeats <command> <number> times