# key_bindings_dispatch

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/key-bindings.c#L691
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-key_bindings_dispatch/

```c
struct cmdq_item * key_bindings_dispatch(struct key_binding *bd, struct cmdq_item *item, struct client *c, struct key_event *event, struct cmd_find_state *fs)
```

## Parameters

- `bd` (`struct key_binding *`)
- `item` (`struct cmdq_item *`)
- `c` (`struct client *`)
- `event` (`struct key_event *`)
- `fs` (`struct cmd_find_state *`)

## Called by

- [`cmd_send_keys_inject_key`](/en/tmux/3.7c/reference/c-function-cmd-send-keys-c-cmd_send_keys_inject_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-send-keys.c#L98)
- [`server_client_key_callback`](/en/tmux/3.7c/reference/c-function-server-client-c-server_client_key_callback/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1357)

## Calls

- [`cmdq_append`](/en/tmux/3.7c/reference/c-function-cmdq_append/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/key-bindings.c#L715)
- [`cmdq_free_state`](/en/tmux/3.7c/reference/c-function-cmdq_free_state/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/key-bindings.c#L710)
- [`cmdq_get_command`](/en/tmux/3.7c/reference/c-function-cmdq_get_command/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/key-bindings.c#L709)
- [`cmdq_insert_after`](/en/tmux/3.7c/reference/c-function-cmdq_insert_after/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/key-bindings.c#L713)
- [`cmdq_new_state`](/en/tmux/3.7c/reference/c-function-cmdq_new_state/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/key-bindings.c#L708)

## Other function references

- [`cmd_list_all_have`](/en/tmux/3.7c/reference/c-function-cmd_list_all_have/) (function)
- [`key_bindings_read_only`](/en/tmux/3.7c/reference/c-function-key-bindings-c-key_bindings_read_only/) (function)

## Referenced declarations

- [`client`](/en/tmux/3.7c/reference/c-struct-client/) (struct)
- [`CLIENT_READONLY`](/en/tmux/3.7c/reference/c-define-tmux-h-client_readonly/) (constant)
- [`cmd_find_state`](/en/tmux/3.7c/reference/c-struct-cmd_find_state/) (struct)
- [`CMD_READONLY`](/en/tmux/3.7c/reference/c-define-tmux-h-cmd_readonly/) (constant)
- [`key_binding.cmdlist`](/en/tmux/3.7c/reference/c-struct-key_binding-cmdlist/) (attribute)
- [`cmdq_get_callback`](/en/tmux/3.7c/reference/c-define-tmux-h-cmdq_get_callback/) (constant)
- [`cmdq_item`](/en/tmux/3.7c/reference/c-struct-cmdq_item/) (struct)
- [`CMDQ_STATE_REPEAT`](/en/tmux/3.7c/reference/c-define-tmux-h-cmdq_state_repeat/) (constant)
- [`cmdq_state.event`](/en/tmux/3.7c/reference/c-struct-cmdq_state-event/) (attribute)
- [`client.flags`](/en/tmux/3.7c/reference/c-struct-client-flags/) (attribute)
- [`cmdq_state.flags`](/en/tmux/3.7c/reference/c-struct-cmdq_state-flags/) (attribute)
- [`key_binding.flags`](/en/tmux/3.7c/reference/c-struct-key_binding-flags/) (attribute)
- [`key_binding`](/en/tmux/3.7c/reference/c-struct-key_binding/) (struct)
- [`KEY_BINDING_REPEAT`](/en/tmux/3.7c/reference/c-define-tmux-h-key_binding_repeat/) (constant)
- [`key_event`](/en/tmux/3.7c/reference/c-struct-key_event/) (struct)
