# tmux_key:listing/2

- **Package:** libtmux_erlang
- **Language:** Erlang
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-erlang/blob/d1b6308440cf9eb8f6647e7ae434bce60e849368/apps/libtmux_erlang/src/tmux_key.erl#L140
- **Page:** https://libtmux.org/en/erlang/latest/reference/tmux_key-listing-2/

```
listing/2
-spec listing(tmux_server:t(), listing_options()) ->
                 {ok, binary()} | {error, map()}.
```

Read native [list-keys](/en/tmux/latest/manual/list-keys/) presentation output, optionally filtering by table and key through `t:listing_options/0`. Returns the command's stdout unchanged; spacing, quoting and included metadata follow that daemon. This is a text view, with no decoded-row, exact-note or configuration-round-trip guarantee.

tmux 3.4 can escape dollar signs in this output. tmux 3.7c can send a single
matching entry to its status-message path, producing empty stdout without an
attached target client. Empty presentation output does not prove absence.
The [key-table guide](keys.md) demonstrates a table with multiple bindings.

The baseline command has no custom format option on tmux 3.3. Deliberate
newer-server formatting is available through `tmux_command:raw/2`. Performs
I/O; missing tables, invalid key spellings and backend errors remain errors.

## Parameters

- `Server` (`tmux_server:t()`)
- `Options` (`listing_options()`)

## tmux command

The tmux commands behind `listing/2`.

- [`list-keys`](/en/tmux/latest/manual/list-keys/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_list_keys_entry`](/en/tmux/latest/reference/c-variable-cmd_list_keys_entry/) (attribute)
- [`cmd_list_keys_exec`](/en/tmux/latest/reference/c-function-cmd-list-keys-c-cmd_list_keys_exec/) (function)

## Guides

Pages that discuss `listing/2`.

- [Install application keybindings](/en/erlang/latest/guides/keys/)
