libtmux Reference MCP Search
On this page

libtmux::Server::bind_key

View as Markdown

Module
libtmux
Declared in
Server
Package
libtmux-cxx
Source
include/libtmux/server.hpp
bind_key ( table : std::string_view , key : std::string_view , command : const std::vector< std::string > & , repeatable : bool = false ) expected< void, CommandFailure >
methodreadonly [source]
methodreadonly [source]
bind_key

Bind a key in a key table, and take a binding away again.

The command is argv, not a string, so nothing here has to be quoted for tmux to take it apart again correctly.

A table name containing whitespace is refused. tmux accepts one and then prints it unquoted in list-keys, where -T my table X command cannot be told apart from the table my bound to the key table — so a name that survives being listed is required, the same way a target refuses a name that cannot survive being parsed.

Key names are tmux's to check: unlike send-keys, bind-key reports an unknown one — including an empty one — so there is nothing for this to add, and nothing here repeats it.

repeatable is tmux's -r, letting the key repeat without the prefix being pressed again.

0 declared, 0 inherited

Esc

Type to search.