On this page
libtmux::Server::bind_key
- 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 >
-
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 commandcannot be told apart from the tablemybound to the keytable— 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-keyreports an unknown one — including an empty one — so there is nothing for this to add, and nothing here repeats it.repeatableis tmux's-r, letting the key repeat without the prefix being pressed again.
0 declared, 0 inherited