# libtmux.Server.list_keys

- **Module:** libtmux.Server
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/036c521c4b83ce6e434eb50afe2a0d08a6a05e46/src/libtmux/server.py#L754
- **Page:** https://libtmux.org/reference/py/libtmux-server-list_keys/

```
libtmux.Server.list_keys(self, key_table: str | None = None, format_: str | None = None) -> list[str]
```

List key bindings via ``$ tmux list-keys``.

## Parameters

- `self`
- `key_table` (str | None) — Filter by key table (``-T`` flag).
- `format_` (str | None) — Custom output format applied to each line (``-F`` flag).
Requires tmux 3.7+; warns and is ignored on older tmux.

## Returns

list[str]
    Key binding lines.

## Example

```python
>>> result = server.list_keys()
>>> isinstance(result, list)
True
```
