# tmux.Server.BindKey

- **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#L70
- **Page:** https://libtmux.org/reference/go/tmux-server-bindkey/

```
tmux.Server.BindKey(ctx: context.Context, request: BindKeyRequest) -> error
```

BindKey binds Key to Command in a tmux key table. An empty Command creates a no-op binding on tmux 3.3 or newer; tmux 3.2a reports its upstream error. It mutates the table; cancellation does not prove that tmux did not bind Key.
