This shows you the differences between two versions of the page.
| — |
commands:bind [2010-01-23 19:47] (current) asciiphil created |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== bind ====== | ||
| + | |||
| + | ===== Default Keybindings ===== | ||
| + | |||
| + | None. | ||
| + | |||
| + | ===== Syntax ===== | ||
| + | |||
| + | * '' | ||
| + | |||
| + | ===== Description ===== | ||
| + | |||
| + | Bind a command to a key. By default, most of the commands provided by | ||
| + | screen are bound to one or more keys as indicated in the [[man: | ||
| + | Bindings]] section, e.g. the command to create a new window is bound to | ||
| + | "'' | ||
| + | key bindings and to define new bindings. | ||
| + | single character, a two-character sequence of the form "'' | ||
| + | "'' | ||
| + | code of the character), or a backslash followed by a second character, | ||
| + | such as "'' | ||
| + | like. If no further argument is given, any previously established binding | ||
| + | for this key is removed. | ||
| + | command. | ||
| + | |||
| + | If a command class is specified via the '' | ||
| + | for the specified class. | ||
| + | activate a class. | ||
| + | keys or multi-character bindings. | ||
| + | |||
| + | ===== Examples ===== | ||
| + | |||
| + | < | ||
| + | bind ’ ’ windows | ||
| + | bind ^k | ||
| + | bind k | ||
| + | bind K kill | ||
| + | bind ^f screen telnet foobar | ||
| + | bind \033 screen -ln -t root -h 1000 9 su | ||
| + | </ | ||
| + | |||
| + | binds the space key to the command that displays a list of windows (so | ||
| + | that the command usually invoked by "'' | ||
| + | would also be available as "'' | ||
| + | the default kill binding from "'' | ||
| + | is then bound to the '' | ||
| + | C-f''" | ||
| + | (c.f. [[man: | ||
| + | a non-login window with a.k.a. " | ||
| + | and a scrollback buffer of 1000 lines (c.f. '' | ||
| + | |||
| + | < | ||
| + | bind -c demo1 0 select 10 | ||
| + | bind -c demo1 1 select 11 | ||
| + | bind -c demo1 2 select 12 | ||
| + | bindkey " | ||
| + | </ | ||
| + | |||
| + | makes "'' | ||
| + | |||
| + | < | ||
| + | bind -c demo2 0 select 10 | ||
| + | bind -c demo2 1 select 11 | ||
| + | bind -c demo2 2 select 12 | ||
| + | bind - command -c demo2 | ||
| + | </ | ||
| + | |||
| + | makes "'' | ||
| + | |||
| + | |||
| + | ===== See Also ===== | ||
| + | |||
| + | * [[: | ||