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
If a command class is specified via the -c option, the
key is bound for the specified class. Use the command
command to activate a class. Command classes can be used
to create multiple command keys or multi-character bindings.
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 superuser shell and a scrollback buffer of 1000 lines.
bind -c demo1 0 select 10 bind -c demo1 1 select 11 bind -c demo1 2 select 12 bindkey "^B" command -c demo1
makes C-b 0 select window 10, C-b 1 window 11, etc.
bind -c demo2 0 select 10 bind -c demo2 1 select 11 bind -c demo2 2 select 12 bind - command -c demo2
makes C-a - 0 select window 10, C-a - 1 window 11, etc.
meta command)
to y (similar to the `-e' option).
Each argument is either a single character, a two-character
sequence of the form `^x' (meaning C-x), a backslash followed
by an octal number (specifying the ASCII code of the character), or a
backslash followed by a second character, such as `\^' or
`\\'. The default is `^Aa', but `"' is recommended by
one of the authors.
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.
bind command, See section Bindkey.
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 inter-character timing. One cannot turn off the timing if a termcap capability is used.
`cmd' can be any of screen's commands with an arbitrary number of `args'. If `cmd' is omitted the key-binding 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 abbreviation of the word `barfoo'. Timeout is disabled so that users can type slowly.
bindkey "\024" mapdefault
This key-binding makes `C-t' an escape character for key-bindings. 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').
Go to the first, previous, next, last section, table of contents.