Skip to content

Binding

A binding maps a key press on to an action.

See bindings in the guide for details.

Binding class

The configuration of a key binding.

action instance-attribute

action: str

Action to bind to.

description instance-attribute class-attribute

description: str = ''

Description of action.

key instance-attribute

key: str

Key to bind. This can also be a comma-separated list of keys to map multiple keys to a single action.

key_display instance-attribute class-attribute

key_display: str | None = None

How the key should be shown in footer.

priority instance-attribute class-attribute

priority: bool = False

Enable priority binding for this key.

show instance-attribute class-attribute

show: bool = True

Show the action in Footer, or False to hide.

BindingError class

Bases: Exception

A binding related error.

InvalidBinding class

Bases: Exception

Binding key is in an invalid format.

NoBinding class

Bases: Exception

A binding was not found.