# input_key

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/input-keys.c#L417
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-input_key/

```c
int input_key(struct screen *s, struct bufferevent *bev, key_code key)
```

## Parameters

- `s` (`struct screen *`)
- `bev` (`struct bufferevent *`)
- `key` (`key_code`)

## Called by

- [`input_key_pane`](/en/tmux/3.2a/reference/c-function-input_key_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/input-keys.c#L404)
- [`popup_key_cb`](/en/tmux/3.2a/reference/c-function-popup-c-popup_key_cb/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/popup.c#L265)

## Calls

- [`input_key_get`](/en/tmux/3.2a/reference/c-function-input-keys-c-input_key_get/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/input-keys.c#L471)
- [`input_key_write`](/en/tmux/3.2a/reference/c-function-input-keys-c-input_key_write/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/input-keys.c#L431)
- [`log_debug`](/en/tmux/3.2a/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/input-keys.c#L479)
- [`options_get_number`](/en/tmux/3.2a/reference/c-function-options_get_number/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/input-keys.c#L437)
- [`utf8_to_data`](/en/tmux/3.2a/reference/c-function-utf8_to_data/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/input-keys.c#L458)
- [`xsnprintf`](/en/tmux/3.2a/reference/c-function-xsnprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/input-keys.c#L546)

## Referenced by

- [`server_client_push_stderr`](/en/tmux/3.2a/reference/c-function-server_client_push_stderr/) (function)

## Referenced declarations

- [`input_key_entry.data`](/en/tmux/3.2a/reference/c-struct-input_key_entry-data/) (attribute)
- [`utf8_data.data`](/en/tmux/3.2a/reference/c-struct-utf8_data-data/) (attribute)
- [`global_options`](/en/tmux/3.2a/reference/c-variable-global_options/) (attribute)
- [`key_code`](/en/tmux/3.2a/reference/c-typedef-key_code/) (typealias)
- [`KEYC_BSPACE`](/en/tmux/3.2a/reference/c-enum-tmux-h-241271275060253221275056143052225065321046366375-keyc_bspace/) (constant)
- [`KEYC_CTRL`](/en/tmux/3.2a/reference/c-define-tmux-h-keyc_ctrl/) (constant)
- [`KEYC_CURSOR`](/en/tmux/3.2a/reference/c-define-tmux-h-keyc_cursor/) (constant)
- [`KEYC_IMPLIED_META`](/en/tmux/3.2a/reference/c-define-tmux-h-keyc_implied_meta/) (constant)
- [`KEYC_IS_MOUSE`](/en/tmux/3.2a/reference/c-define-tmux-h-keyc_is_mouse/) (constant)
- [`KEYC_IS_UNICODE`](/en/tmux/3.2a/reference/c-define-tmux-h-keyc_is_unicode/) (constant)
- [`KEYC_KEYPAD`](/en/tmux/3.2a/reference/c-define-tmux-h-keyc_keypad/) (constant)
- [`KEYC_LITERAL`](/en/tmux/3.2a/reference/c-define-tmux-h-keyc_literal/) (constant)
- [`KEYC_MASK_FLAGS`](/en/tmux/3.2a/reference/c-define-tmux-h-keyc_mask_flags/) (constant)
- [`KEYC_MASK_KEY`](/en/tmux/3.2a/reference/c-define-tmux-h-keyc_mask_key/) (constant)
- [`KEYC_MASK_MODIFIERS`](/en/tmux/3.2a/reference/c-define-tmux-h-keyc_mask_modifiers/) (constant)
- [`KEYC_META`](/en/tmux/3.2a/reference/c-define-tmux-h-keyc_meta/) (constant)
- [`KEYC_SHIFT`](/en/tmux/3.2a/reference/c-define-tmux-h-keyc_shift/) (constant)
- [`screen.mode`](/en/tmux/3.2a/reference/c-struct-screen-mode/) (attribute)
- [`MODE_KCURSOR`](/en/tmux/3.2a/reference/c-define-tmux-h-mode_kcursor/) (constant)
- [`MODE_KEXTENDED`](/en/tmux/3.2a/reference/c-define-tmux-h-mode_kextended/) (constant)
- [`MODE_KKEYPAD`](/en/tmux/3.2a/reference/c-define-tmux-h-mode_kkeypad/) (constant)
- [`screen`](/en/tmux/3.2a/reference/c-struct-screen/) (struct)
- [`utf8_data.size`](/en/tmux/3.2a/reference/c-struct-utf8_data-size/) (attribute)
