# tmux.Server.ListKeys

- **Module:** tmux.Server
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-go/blob/52968a3181c1c9e6d1b26c565d4b170968ae61c0/tmux/server_keys.go#L149
- **Page:** https://libtmux.org/en/go/latest/reference/tmux-server-listkeys/

```
tmux.Server.ListKeys(ctx: context.Context, request: ListKeysRequest) -> ([]string, error)
```

ListKeys returns an owned snapshot of raw tmux key-binding lines. Format requires tmux 3.7 and follows [UnsupportedPolicy]. tmux 3.7 through 3.7c send a table's sole matching binding to client status and leave stdout empty; this method preserves that upstream and Python behavior. Listing failures remain errors.

On an unused socket, tmux starts an empty server to answer. With the default
exit-empty setting, that server exits at once and leaves its socket file.
