# LibTmux::Configuration::KeyBindings.bind

- **Module:** LibTmux::Configuration
- **Package:** LibTmux
- **Language:** Raku
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-raku/blob/0b5dd3d32e20f83a0069874e33eab0eb48f55962/lib/LibTmux/Configuration.rakumod#L544
- **Page:** https://libtmux.org/en/raku/latest/reference/libtmux-configuration-keybindings-bind/

```
method bind(Str:D $key, Invocation:D $command, Str:D :$table = 'prefix',
                Bool :$repeat = False, Str :$note --> Result:D)
```

Bind a key to one command, with optional repeatability and literal note.

Bind a key to one command, with optional repeatability and literal note.

## Parameters

- `$key` (`Str:D`)
- `$command` (`Invocation:D`)
- `$table?` (`Str:D`)
- `$repeat?` (`Bool`)
- `$note?` (`Str`)

## tmux command

The tmux commands behind `bind`.

- [`bind-key`](/en/tmux/latest/manual/bind-key/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_bind_key_entry`](/en/tmux/latest/reference/c-variable-cmd_bind_key_entry/) (attribute)
- [`cmd_bind_key_exec`](/en/tmux/latest/reference/c-function-cmd-bind-key-c-cmd_bind_key_exec/) (function)

## In other ports

Bind a key to a tmux command

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Server.bind_key`](/en/py/latest/reference/libtmux-server-bind_key/) (method) |
| Erlang | [`tmux_key:bind/3`](/en/erlang/latest/reference/tmux_key-bind-3/) (function) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | no equivalent on `Server` |
| Rust | [`server.Server.bind_key`](/en/rs/latest/reference/server-server-bind_key/) (method) |
| Go | [`tmux.Server.BindKey`](/en/go/latest/reference/tmux-server-bindkey/) (method) |
| Java | [`io.github.libtmux.Keys.bind`](/en/java/latest/reference/io-github-libtmux-keys-keys-bind/) (method) |
| C# | [`LibTmux.TmuxKeys.BindAsync`](/en/csharp/latest/reference/libtmux-tmuxkeys-bindasync/) (method) |
| C++ | [`libtmux::Server::bind_key`](/en/cxx/latest/reference/libtmux-server-bind_key/) (method) |
| Swift | no equivalent on `Server` |
| OCaml | No direct public OCaml equivalent is recorded for this operation. |
| Perl | No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands. |

No equivalent is recorded in Ruby, Lua, PowerShell, Julia, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.
