# popup_key_cb

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/popup.c#L561
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-popup-c-popup_key_cb/

```c
static int popup_key_cb(struct client *c, void *data, struct key_event *event)
```

## Parameters

- `c` (`struct client *`)
- `data` (`void *`)
- `event` (`struct key_event *`)

## Calls

- [`input_key`](/en/tmux/3.7c/reference/c-function-input_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/popup.c#L644)
- [`input_key_get_mouse`](/en/tmux/3.7c/reference/c-function-input_key_get_mouse/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/popup.c#L639)
- [`menu_add_items`](/en/tmux/3.7c/reference/c-function-menu_add_items/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/popup.c#L651)
- [`menu_create`](/en/tmux/3.7c/reference/c-function-menu_create/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/popup.c#L649)
- [`menu_key_cb`](/en/tmux/3.7c/reference/c-function-menu_key_cb/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/popup.c#L571)
- [`menu_prepare`](/en/tmux/3.7c/reference/c-function-menu_prepare/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/popup.c#L659)
- [`popup_handle_drag`](/en/tmux/3.7c/reference/c-function-popup-c-popup_handle_drag/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/popup.c#L584)
- [`server_client_clear_overlay`](/en/tmux/3.7c/reference/c-function-server_client_clear_overlay/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/popup.c#L575)
- [`server_redraw_client`](/en/tmux/3.7c/reference/c-function-server_redraw_client/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/popup.c#L577)

## Other function references

- [`job_get_event`](/en/tmux/3.7c/reference/c-function-job_get_event/) (function)
- [`popup_menu_done`](/en/tmux/3.7c/reference/c-function-popup-c-popup_menu_done/) (function)

## Referenced by

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

## Referenced declarations

- [`mouse_event.b`](/en/tmux/3.7c/reference/c-struct-mouse_event-b/) (attribute)
- [`popup_data.border_lines`](/en/tmux/3.7c/reference/c-struct-popup_data-border_lines/) (attribute)
- [`BOX_LINES_DEFAULT`](/en/tmux/3.7c/reference/c-enum-box_lines-box_lines_default/) (constant)
- [`BOX_LINES_NONE`](/en/tmux/3.7c/reference/c-enum-box_lines-box_lines_none/) (constant)
- [`client`](/en/tmux/3.7c/reference/c-struct-client/) (struct)
- [`CLIENT_REDRAWOVERLAY`](/en/tmux/3.7c/reference/c-define-tmux-h-client_redrawoverlay/) (constant)
- [`popup_data.close`](/en/tmux/3.7c/reference/c-struct-popup_data-close/) (attribute)
- [`popup_data.dragging`](/en/tmux/3.7c/reference/c-struct-popup_data-dragging/) (attribute)
- [`popup_data.dx`](/en/tmux/3.7c/reference/c-struct-popup_data-dx/) (attribute)
- [`popup_data.dy`](/en/tmux/3.7c/reference/c-struct-popup_data-dy/) (attribute)
- [`client.flags`](/en/tmux/3.7c/reference/c-struct-client-flags/) (attribute)
- [`popup_data.flags`](/en/tmux/3.7c/reference/c-struct-popup_data-flags/) (attribute)
- [`popup_data.job`](/en/tmux/3.7c/reference/c-struct-popup_data-job/) (attribute)
- [`key_event.key`](/en/tmux/3.7c/reference/c-struct-key_event-key/) (attribute)
- [`key_event`](/en/tmux/3.7c/reference/c-struct-key_event/) (struct)
- [`KEYC_CTRL`](/en/tmux/3.7c/reference/c-define-tmux-h-keyc_ctrl/) (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)
- [`mouse_event.lb`](/en/tmux/3.7c/reference/c-struct-mouse_event-lb/) (attribute)
- [`popup_data.lb`](/en/tmux/3.7c/reference/c-struct-popup_data-lb/) (attribute)
- [`mouse_event.lx`](/en/tmux/3.7c/reference/c-struct-mouse_event-lx/) (attribute)
- [`popup_data.lx`](/en/tmux/3.7c/reference/c-struct-popup_data-lx/) (attribute)
- [`mouse_event.ly`](/en/tmux/3.7c/reference/c-struct-mouse_event-ly/) (attribute)
- [`popup_data.ly`](/en/tmux/3.7c/reference/c-struct-popup_data-ly/) (attribute)
- [`popup_data.md`](/en/tmux/3.7c/reference/c-struct-popup_data-md/) (attribute)
- [`popup_data.menu`](/en/tmux/3.7c/reference/c-struct-popup_data-menu/) (attribute)
- [`MOUSE_BUTTON_1`](/en/tmux/3.7c/reference/c-define-tmux-h-mouse_button_1/) (constant)
- [`MOUSE_BUTTON_3`](/en/tmux/3.7c/reference/c-define-tmux-h-mouse_button_3/) (constant)
- [`MOUSE_BUTTONS`](/en/tmux/3.7c/reference/c-define-tmux-h-mouse_buttons/) (constant)
- [`MOUSE_DRAG`](/en/tmux/3.7c/reference/c-define-tmux-h-mouse_drag/) (constant)
- [`MOUSE_MASK_META`](/en/tmux/3.7c/reference/c-define-tmux-h-mouse_mask_meta/) (constant)
- [`MOUSE_MASK_MODIFIERS`](/en/tmux/3.7c/reference/c-define-tmux-h-mouse_mask_modifiers/) (constant)
- [`POPUP_CLOSEANYKEY`](/en/tmux/3.7c/reference/c-define-tmux-h-popup_closeanykey/) (constant)
- [`POPUP_CLOSEEXIT`](/en/tmux/3.7c/reference/c-define-tmux-h-popup_closeexit/) (constant)
- [`POPUP_CLOSEEXITZERO`](/en/tmux/3.7c/reference/c-define-tmux-h-popup_closeexitzero/) (constant)
- [`POPUP_INTERNAL`](/en/tmux/3.7c/reference/c-define-tmux-h-popup_internal/) (constant)
- [`popup_internal_menu_items`](/en/tmux/3.7c/reference/c-variable-popup-c-popup_internal_menu_items/) (attribute)
- [`popup_menu_items`](/en/tmux/3.7c/reference/c-variable-popup-c-popup_menu_items/) (attribute)
- [`popup_data.px`](/en/tmux/3.7c/reference/c-struct-popup_data-px/) (attribute)
- [`popup_data.py`](/en/tmux/3.7c/reference/c-struct-popup_data-py/) (attribute)
- [`popup_data.s`](/en/tmux/3.7c/reference/c-struct-popup_data-s/) (attribute)
- [`popup_data.sx`](/en/tmux/3.7c/reference/c-struct-popup_data-sx/) (attribute)
- [`popup_data.sy`](/en/tmux/3.7c/reference/c-struct-popup_data-sy/) (attribute)
- [`menu.width`](/en/tmux/3.7c/reference/c-struct-menu-width/) (attribute)
- [`mouse_event.x`](/en/tmux/3.7c/reference/c-struct-mouse_event-x/) (attribute)
- [`mouse_event.y`](/en/tmux/3.7c/reference/c-struct-mouse_event-y/) (attribute)
