# status_prompt_key

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1429
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-status_prompt_key/

```c
int status_prompt_key(struct client *c, key_code key)
```

## Parameters

- `c` (`struct client *`)
- `key` (`key_code`)

## Called by

- [`server_client_handle_key`](/en/tmux/latest/reference/c-function-server_client_handle_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1487)

## Calls

- [`key_string_lookup_key`](/en/tmux/latest/reference/c-function-key_string_lookup_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1439)
- [`options_get_number`](/en/tmux/latest/reference/c-function-options_get_number/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1472)
- [`options_get_string`](/en/tmux/latest/reference/c-function-options_get_string/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1559)
- [`status_prompt_add_history`](/en/tmux/latest/reference/c-function-status-c-status_prompt_add_history/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1666)
- [`status_prompt_backward_word`](/en/tmux/latest/reference/c-function-status-c-status_prompt_backward_word/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1618)
- [`status_prompt_clear`](/en/tmux/latest/reference/c-function-status_prompt_clear/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1441)
- [`status_prompt_down_history`](/en/tmux/latest/reference/c-function-status-c-status_prompt_down_history/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1637)
- [`status_prompt_end_word`](/en/tmux/latest/reference/c-function-status-c-status_prompt_end_word/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1604)
- [`status_prompt_forward_word`](/en/tmux/latest/reference/c-function-status-c-status_prompt_forward_word/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1601)
- [`status_prompt_in_list`](/en/tmux/latest/reference/c-function-status-c-status_prompt_in_list/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1568)
- [`status_prompt_keypad_key`](/en/tmux/latest/reference/c-function-status-c-status_prompt_keypad_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1447)
- [`status_prompt_paste`](/en/tmux/latest/reference/c-function-status-c-status_prompt_paste/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1646)
- [`status_prompt_replace_complete`](/en/tmux/latest/reference/c-function-status-c-status_prompt_replace_complete/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1515)
- [`status_prompt_space`](/en/tmux/latest/reference/c-function-status-c-status_prompt_space/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1565)
- [`status_prompt_translate_key`](/en/tmux/latest/reference/c-function-status-c-status_prompt_translate_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1474)
- [`status_prompt_up_history`](/en/tmux/latest/reference/c-function-status-c-status_prompt_up_history/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1627)
- [`utf8_copy`](/en/tmux/latest/reference/c-function-utf8_copy/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1654)
- [`utf8_fromcstr`](/en/tmux/latest/reference/c-function-utf8_fromcstr/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1632)
- [`utf8_set`](/en/tmux/latest/reference/c-function-utf8_set/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1712)
- [`utf8_strlen`](/en/tmux/latest/reference/c-function-utf8_strlen/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1444)
- [`utf8_to_data`](/en/tmux/latest/reference/c-function-utf8_to_data/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1716)
- [`utf8_tocstr`](/en/tmux/latest/reference/c-function-utf8_tocstr/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1452)
- [`xasprintf`](/en/tmux/latest/reference/c-function-xasprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1751)
- [`xcalloc`](/en/tmux/latest/reference/c-function-xcalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1584)
- [`xreallocarray`](/en/tmux/latest/reference/c-function-xreallocarray/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1720)

## Referenced by

- [`status_prompt_set`](/en/tmux/latest/reference/c-function-status_prompt_set/) (function)

## Referenced declarations

- [`client`](/en/tmux/latest/reference/c-struct-client/) (struct)
- [`CLIENT_REDRAWSTATUS`](/en/tmux/latest/reference/c-define-tmux-h-client_redrawstatus/) (constant)
- [`client.flags`](/en/tmux/latest/reference/c-struct-client-flags/) (attribute)
- [`key_code`](/en/tmux/latest/reference/c-typedef-key_code/) (typealias)
- [`KEYC_BSPACE`](/en/tmux/latest/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_bspace/) (constant)
- [`KEYC_CTRL`](/en/tmux/latest/reference/c-define-tmux-h-keyc_ctrl/) (constant)
- [`KEYC_DC`](/en/tmux/latest/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_dc/) (constant)
- [`KEYC_DOWN`](/en/tmux/latest/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_down/) (constant)
- [`KEYC_END`](/en/tmux/latest/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_end/) (constant)
- [`KEYC_HOME`](/en/tmux/latest/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_home/) (constant)
- [`KEYC_IS_UNICODE`](/en/tmux/latest/reference/c-define-tmux-h-keyc_is_unicode/) (constant)
- [`KEYC_LEFT`](/en/tmux/latest/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_left/) (constant)
- [`KEYC_MASK_FLAGS`](/en/tmux/latest/reference/c-define-tmux-h-keyc_mask_flags/) (constant)
- [`KEYC_MASK_KEY`](/en/tmux/latest/reference/c-define-tmux-h-keyc_mask_key/) (constant)
- [`KEYC_META`](/en/tmux/latest/reference/c-define-tmux-h-keyc_meta/) (constant)
- [`KEYC_RIGHT`](/en/tmux/latest/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_right/) (constant)
- [`KEYC_UP`](/en/tmux/latest/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_up/) (constant)
- [`KEYC_VI`](/en/tmux/latest/reference/c-define-tmux-h-keyc_vi/) (constant)
- [`MODEKEY_VI`](/en/tmux/latest/reference/c-define-tmux-h-modekey_vi/) (constant)
- [`session.options`](/en/tmux/latest/reference/c-struct-session-options/) (attribute)
- [`PROMPT_BSPACE_EXIT`](/en/tmux/latest/reference/c-define-tmux-h-prompt_bspace_exit/) (constant)
- [`client.prompt_buffer`](/en/tmux/latest/reference/c-struct-client-prompt_buffer/) (attribute)
- [`client.prompt_data`](/en/tmux/latest/reference/c-struct-client-prompt_data/) (attribute)
- [`client.prompt_flags`](/en/tmux/latest/reference/c-struct-client-prompt_flags/) (attribute)
- [`client.prompt_hindex`](/en/tmux/latest/reference/c-struct-client-prompt_hindex/) (attribute)
- [`PROMPT_INCREMENTAL`](/en/tmux/latest/reference/c-define-tmux-h-prompt_incremental/) (constant)
- [`client.prompt_index`](/en/tmux/latest/reference/c-struct-client-prompt_index/) (attribute)
- [`client.prompt_inputcb`](/en/tmux/latest/reference/c-struct-client-prompt_inputcb/) (attribute)
- [`PROMPT_KEY`](/en/tmux/latest/reference/c-define-tmux-h-prompt_key/) (constant)
- [`client.prompt_last`](/en/tmux/latest/reference/c-struct-client-prompt_last/) (attribute)
- [`PROMPT_NUMERIC`](/en/tmux/latest/reference/c-define-tmux-h-prompt_numeric/) (constant)
- [`PROMPT_QUOTENEXT`](/en/tmux/latest/reference/c-define-tmux-h-prompt_quotenext/) (constant)
- [`client.prompt_saved`](/en/tmux/latest/reference/c-struct-client-prompt_saved/) (attribute)
- [`PROMPT_SINGLE`](/en/tmux/latest/reference/c-define-tmux-h-prompt_single/) (constant)
- [`client.prompt_type`](/en/tmux/latest/reference/c-struct-client-prompt_type/) (attribute)
- [`client.session`](/en/tmux/latest/reference/c-struct-client-session/) (attribute)
- [`utf8_data.size`](/en/tmux/latest/reference/c-struct-utf8_data-size/) (attribute)
- [`utf8_data.width`](/en/tmux/latest/reference/c-struct-utf8_data-width/) (attribute)
