Core LibraryunreleasedAPI Reference

Choose documentation 2

latest

Current version

latest
English

Unreleased libtmux has not been released. Its API may change during development. This site's structure and URLs may change too.

function libtmux-lisp latest

libtmux:bind-key

Replace TABLE's KEY binding and return a COMMAND-OUTCOME. TABLE defaults to prefix. KEY, TABLE and optional NOTE are literal strings. REPEAT enables native key repetition. Supply exactly one of COMMAND argv or COMMAND-SOURCE, explicit tmux parser source. COMMAND argv owns each argument and preserves its token boundary; its first token must not contain =.

Source and package
Qualified name
libtmux:bind-key
Declared in
libtmux
Package
libtmux
Source
src/key-bindings.lisp
(bind-key client key &key (table "prefix") repeat note (command nil command-p) (command-source nil source-p) cancel-token timeout output-limit)

Public owner: libtmux

Description#

Tmux parses the binding immediately. Assignments/directives in COMMAND-SOURCE can change daemon environment before a later parse error. Aliases expand during binding in both forms and can also introduce parser side effects. Failure is not rollback. Ordinary stored command nodes run later on a key event with its native target context; this does not retain captured-handle authority.

Success acknowledges the binding and its hooks, not later key execution. Blocks under shared preflight/dispatch limits, acquires no observation and never retries. Native key/source errors and uncertain outcomes remain inspectable.

See also: libtmux:error-outcome, libtmux:list-keys, libtmux:send-keys, libtmux:unbind-key.

tmux command#

The tmux commands behind bind-key.

tmux C API#

The C declarations in tmux that implement these commands.

Guides#

Pages that discuss bind-key.

Esc

Type to search.

Reference previewOpen reference