Next: , Up: Key Binding


14.1 The bind command

— Command: bind [-c class] key [command [args]]

(none)
Bind a command to a key. The key 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 argument can also be quoted, if you like. If no further argument is given, any previously established binding for this key is removed. The command argument can be any command (see Command Index).

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 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.