# server_client_key_callback

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1172
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-server-client-c-server_client_key_callback/

```c
static enum cmd_retval server_client_key_callback(struct cmdq_item *item, void *data)
```

## Parameters

- `item` (`struct cmdq_item *`)
- `data` (`void *`)

## Calls

- [`cmd_find_from_client`](/en/tmux/3.7c/reference/c-function-cmd_find_from_client/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1227)
- [`cmdq_get_client`](/en/tmux/3.7c/reference/c-function-cmdq_get_client/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1174)
- [`fatal`](/en/tmux/3.7c/reference/c-function-fatal/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1199)
- [`key_bindings_dispatch`](/en/tmux/3.7c/reference/c-function-key_bindings_dispatch/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1357)
- [`key_bindings_get`](/en/tmux/3.7c/reference/c-function-key_bindings_get/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1285)
- [`key_bindings_get_table`](/en/tmux/3.7c/reference/c-function-key_bindings_get_table/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1254)
- [`key_bindings_unref_table`](/en/tmux/3.7c/reference/c-function-key_bindings_unref_table/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1358)
- [`log_debug`](/en/tmux/3.7c/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1279)
- [`options_get_number`](/en/tmux/3.7c/reference/c-function-options_get_number/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1291)
- [`options_set_number`](/en/tmux/3.7c/reference/c-function-options_set_number/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1415)
- [`server_client_check_mouse`](/en/tmux/3.7c/reference/c-function-server-client-c-server_client_check_mouse/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1207)
- [`server_client_is_bracket_paste`](/en/tmux/3.7c/reference/c-function-server-client-c-server_client_is_bracket_paste/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1235)
- [`server_client_is_default_key_table`](/en/tmux/3.7c/reference/c-function-server-client-c-server_client_is_default_key_table/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1250)
- [`server_client_repeat_time`](/en/tmux/3.7c/reference/c-function-server-client-c-server_client_repeat_time/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1341)
- [`server_client_set_key_table`](/en/tmux/3.7c/reference/c-function-server_client_set_key_table/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1270)
- [`server_client_update_latest`](/en/tmux/3.7c/reference/c-function-server-client-c-server_client_update_latest/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1435)
- [`server_destroy_pane`](/en/tmux/3.7c/reference/c-function-server_destroy_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1416)
- [`server_status_client`](/en/tmux/3.7c/reference/c-function-server_status_client/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1271)
- [`session_update_activity`](/en/tmux/3.7c/reference/c-function-session_update_activity/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1200)
- [`window_pane_key`](/en/tmux/3.7c/reference/c-function-window_pane_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1422)
- [`window_pane_paste`](/en/tmux/3.7c/reference/c-function-window_pane_paste/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1429)

## Other function references

- [`cmd_find_from_mouse`](/en/tmux/3.7c/reference/c-function-cmd_find_from_mouse/) (function)
- [`server_client_is_assume_paste`](/en/tmux/3.7c/reference/c-function-server-client-c-server_client_is_assume_paste/) (function)
- [`server_client_key_table_activity_diff`](/en/tmux/3.7c/reference/c-function-server-client-c-server_client_key_table_activity_diff/) (function)

## Referenced by

- [`server_client_handle_key`](/en/tmux/3.7c/reference/c-function-server_client_handle_key/) (function)

## Referenced declarations

- [`client.activity_time`](/en/tmux/3.7c/reference/c-struct-client-activity_time/) (attribute)
- [`CLIENT_READONLY`](/en/tmux/3.7c/reference/c-define-tmux-h-client_readonly/) (constant)
- [`CLIENT_REPEAT`](/en/tmux/3.7c/reference/c-define-tmux-h-client_repeat/) (constant)
- [`CLIENT_UNATTACHEDFLAGS`](/en/tmux/3.7c/reference/c-define-tmux-h-client_unattachedflags/) (constant)
- [`CMD_RETURN_NORMAL`](/en/tmux/3.7c/reference/c-enum-cmd_retval-cmd_return_normal/) (constant)
- [`cmd_retval`](/en/tmux/3.7c/reference/c-enum-cmd_retval/) (enum)
- [`cmdq_item`](/en/tmux/3.7c/reference/c-struct-cmdq_item/) (struct)
- [`session.curw`](/en/tmux/3.7c/reference/c-struct-session-curw/) (attribute)
- [`client.flags`](/en/tmux/3.7c/reference/c-struct-client-flags/) (attribute)
- [`cmd_find_state.flags`](/en/tmux/3.7c/reference/c-struct-cmd_find_state-flags/) (attribute)
- [`key_binding.flags`](/en/tmux/3.7c/reference/c-struct-key_binding-flags/) (attribute)
- [`window_pane.flags`](/en/tmux/3.7c/reference/c-struct-window_pane-flags/) (attribute)
- [`global_options`](/en/tmux/3.7c/reference/c-variable-global_options/) (attribute)
- [`window_pane.id`](/en/tmux/3.7c/reference/c-struct-window_pane-id/) (attribute)
- [`key_binding.key`](/en/tmux/3.7c/reference/c-struct-key_binding-key/) (attribute)
- [`key_event.key`](/en/tmux/3.7c/reference/c-struct-key_event-key/) (attribute)
- [`mouse_event.key`](/en/tmux/3.7c/reference/c-struct-mouse_event-key/) (attribute)
- [`KEY_BINDING_REPEAT`](/en/tmux/3.7c/reference/c-define-tmux-h-key_binding_repeat/) (constant)
- [`window_mode.key_table`](/en/tmux/3.7c/reference/c-struct-window_mode-key_table/) (attribute)
- [`KEYC_ANY`](/en/tmux/3.7c/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_any/) (constant)
- [`KEYC_DOUBLECLICK`](/en/tmux/3.7c/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_doubleclick/) (constant)
- [`KEYC_DRAGGING`](/en/tmux/3.7c/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_dragging/) (constant)
- [`KEYC_FOCUS_IN`](/en/tmux/3.7c/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_focus_in/) (constant)
- [`KEYC_FOCUS_OUT`](/en/tmux/3.7c/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_focus_out/) (constant)
- [`KEYC_IS_MOUSE`](/en/tmux/3.7c/reference/c-define-tmux-h-keyc_is_mouse/) (constant)
- [`KEYC_IS_PASTE`](/en/tmux/3.7c/reference/c-define-tmux-h-keyc_is_paste/) (constant)
- [`KEYC_MASK_KEY`](/en/tmux/3.7c/reference/c-define-tmux-h-keyc_mask_key/) (constant)
- [`KEYC_MASK_MODIFIERS`](/en/tmux/3.7c/reference/c-define-tmux-h-keyc_mask_modifiers/) (constant)
- [`KEYC_MOUSE`](/en/tmux/3.7c/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_mouse/) (constant)
- [`KEYC_MOUSEMOVE_BORDER`](/en/tmux/3.7c/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_mousemove_border/) (constant)
- [`KEYC_MOUSEMOVE_PANE`](/en/tmux/3.7c/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_mousemove_pane/) (constant)
- [`KEYC_MOUSEMOVE_STATUS`](/en/tmux/3.7c/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_mousemove_status/) (constant)
- [`KEYC_MOUSEMOVE_STATUS_DEFAULT`](/en/tmux/3.7c/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_mousemove_status_default/) (constant)
- [`KEYC_MOUSEMOVE_STATUS_LEFT`](/en/tmux/3.7c/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_mousemove_status_left/) (constant)
- [`KEYC_MOUSEMOVE_STATUS_RIGHT`](/en/tmux/3.7c/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_mousemove_status_right/) (constant)
- [`KEYC_NONE`](/en/tmux/3.7c/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_none/) (constant)
- [`KEYC_SENT`](/en/tmux/3.7c/reference/c-define-tmux-h-keyc_sent/) (constant)
- [`KEYC_UNKNOWN`](/en/tmux/3.7c/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_unknown/) (constant)
- [`client.keytable`](/en/tmux/3.7c/reference/c-struct-client-keytable/) (attribute)
- [`client.last_activity_time`](/en/tmux/3.7c/reference/c-struct-client-last_activity_time/) (attribute)
- [`client.last_key`](/en/tmux/3.7c/reference/c-struct-client-last_key/) (attribute)
- [`window_mode_entry.mode`](/en/tmux/3.7c/reference/c-struct-window_mode_entry-mode/) (attribute)
- [`window_pane.modes`](/en/tmux/3.7c/reference/c-struct-window_pane-modes/) (attribute)
- [`tty.mouse_drag_update`](/en/tmux/3.7c/reference/c-struct-tty-mouse_drag_update/) (attribute)
- [`key_table.name`](/en/tmux/3.7c/reference/c-struct-key_table-name/) (attribute)
- [`session.options`](/en/tmux/3.7c/reference/c-struct-session-options/) (attribute)
- [`window_pane.options`](/en/tmux/3.7c/reference/c-struct-window_pane-options/) (attribute)
- [`PANE_EXITED`](/en/tmux/3.7c/reference/c-define-tmux-h-pane_exited/) (constant)
- [`key_table.references`](/en/tmux/3.7c/reference/c-struct-key_table-references/) (attribute)
- [`client.repeat_timer`](/en/tmux/3.7c/reference/c-struct-client-repeat_timer/) (attribute)
- [`cmd_find_state.s`](/en/tmux/3.7c/reference/c-struct-cmd_find_state-s/) (attribute)
- [`client.session`](/en/tmux/3.7c/reference/c-struct-client-session/) (attribute)
- [`client.tty`](/en/tmux/3.7c/reference/c-struct-client-tty/) (attribute)
- [`mouse_event.valid`](/en/tmux/3.7c/reference/c-struct-mouse_event-valid/) (attribute)
- [`cmd_find_state.wl`](/en/tmux/3.7c/reference/c-struct-cmd_find_state-wl/) (attribute)
- [`cmd_find_state.wp`](/en/tmux/3.7c/reference/c-struct-cmd_find_state-wp/) (attribute)
