# 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/5f808882015a975a65acc7f9da5b3ff0d5cbdc91/tmux/server_keys.go#L149
- **Page:** https://libtmux.org/reference/go/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.
