# server.Server.key_bindings

- **Module:** server.Server
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/server.rs#L1135
- **Page:** https://libtmux.org/en/rs/latest/reference/server-server-key_bindings/

```
server.Server.key_bindings(self, table: Option<&str>) -> Result<Vec<String>, Error>
```

List key bindings as tmux prints them.

Each line is a complete `bind-key` command in tmux's own quoting, which
this crate deliberately does not re-parse: the same value is rendered
bare, double quoted, or single quoted depending on content, and a table
name is printed bare, spaces and all. [`Self::typed_key_bindings`]
reads the same bindings as fields on tmux 3.7 and later.

On tmux 3.7 through 3.7c, a `table` holding exactly one binding lists
empty: those releases send a one-line listing to the message log.

# Errors

Returns an error when tmux refuses the listing.
