You may disagree with some of the default bindings (I know I do). The
bind
command allows you to redefine them to suit your
preferences.
bind
syntax.
bind
.
bindkey
syntax.
bind
command
By default, most suitable commands are bound to one or more keys
(see section Default Key Bindings; for instance, the command to create a
new window is bound to C-c and c. The bind
command
can be used to redefine the key bindings and to define new bindings.
bind
commandSome examples:
bind ' ' windows bind ^f screen telnet foobar bind \033 screen -ln -t root -h 1000 9 su
would bind the space key to the command that displays a list of windows (so that the command usually invoked by C-a C-w would also be available as C-a space), bind C-f to the command "create a window with a TELNET connection to foobar", and bind ESC to the command that creates an non-login window with title `root' in slot #9, with a super-user shell and a scrollbackbuffer of 1000 lines.
escape
except that it is useful for multiuser sessions only.
In a multiuser session
escape
changes the command character of the calling user, where
defescape
changes the default command characters for users that
will be added later.
Screen
), or the
escape
.screenrc directive.
If the `-d' option is given, bindkey modifies the default table, `-m' changes the copy mode table and with neither option the user table is selected. The argument `string' is the sequence of characters to which an action is bound. This can either be a fixed tring or a termcap keyboard capability name (selectable with the `-k' option).
Some keys on a VT100 terminal can send a different string if application mode is turned on (e.g. the cursor keys). Such keys have two entries in the translation table. You can select the application mode entry by specifying the `-a' option.
The `-t' option tells screen not to do intercharacter timing. One cannot turn off the timing if a termcap capabilty is used.
`cmd' can be any of screen's commands with an arbitrary number of `args'. If `cmd' is omitted the keybinding is removed from the table.
Here are some examples of keyboard bindings:
bindkey -d
Show all of the default key bindings. The application mode entries are marked with [A].
bindkey -k k1 select 1
Make the "F1" key switch to window one.
bindkey -t foo stuff barfoo
Make `foo' an abrevation of the word `barfoo'. Timeout is disabled so that users can type slowly.
bindkey "\024" mapdefault
This keybinding makes `C-t' an escape character for keybindings. If you did the above `stuff barfoo' binding, you can enter the word `foo' by typing `C-t foo'. If you want to insert a `C-t' you have to press the key twice (i.e. escape the escape binding).
bindkey -k F1 command
Make the F11 (not F1!) key an alternative screen escape (besides `C-a').