# window_tree_key

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1232
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-window-tree-c-window_tree_key/

```c
static void window_tree_key(struct window_mode_entry *, struct client *, struct session *, struct winlink *, key_code, struct mouse_event *)
```

## Parameters

- `wme` (`struct window_mode_entry *`)
- `c` (`struct client *`)
- `s` (`struct session *`)
- `wl` (`struct winlink *`)
- `key` (`key_code`)
- `m` (`struct mouse_event *`)

## Called by

- [`window_tree_menu`](/en/tmux/3.7c/reference/c-function-window-tree-c-window_tree_menu/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L787)

## Calls

- [`mode_tree_build`](/en/tmux/3.7c/reference/c-function-mode_tree_build/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1276)
- [`mode_tree_count_tagged`](/en/tmux/3.7c/reference/c-function-mode_tree_count_tagged/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1313)
- [`mode_tree_draw`](/en/tmux/3.7c/reference/c-function-mode_tree_draw/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1347)
- [`mode_tree_expand`](/en/tmux/3.7c/reference/c-function-mode_tree_expand/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1268)
- [`mode_tree_get_current`](/en/tmux/3.7c/reference/c-function-mode_tree_get_current/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1247)
- [`mode_tree_key`](/en/tmux/3.7c/reference/c-function-mode_tree_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1248)
- [`mode_tree_run_command`](/en/tmux/3.7c/reference/c-function-mode_tree_run_command/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1339)
- [`mode_tree_set_current`](/en/tmux/3.7c/reference/c-function-mode_tree_set_current/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1270)
- [`server_clear_marked`](/en/tmux/3.7c/reference/c-function-server_clear_marked/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1279)
- [`server_set_marked`](/en/tmux/3.7c/reference/c-function-server_set_marked/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1275)
- [`status_prompt_set`](/en/tmux/3.7c/reference/c-function-status_prompt_set/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1306)
- [`window_pane_reset_mode`](/en/tmux/3.7c/reference/c-function-window_pane_reset_mode/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1345)
- [`window_tree_get_target`](/en/tmux/3.7c/reference/c-function-window-tree-c-window_tree_get_target/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1337)
- [`window_tree_mouse`](/en/tmux/3.7c/reference/c-function-window-tree-c-window_tree_mouse/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1256)
- [`window_tree_pull_item`](/en/tmux/3.7c/reference/c-function-window-tree-c-window_tree_pull_item/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1274)
- [`xasprintf`](/en/tmux/3.7c/reference/c-function-xasprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1290)

## Other function references

- [`window_pane_index`](/en/tmux/3.7c/reference/c-function-window_pane_index/) (function)
- [`window_tree_command_callback`](/en/tmux/3.7c/reference/c-function-window-tree-c-window_tree_command_callback/) (function)
- [`window_tree_command_free`](/en/tmux/3.7c/reference/c-function-window-tree-c-window_tree_command_free/) (function)
- [`window_tree_kill_current_callback`](/en/tmux/3.7c/reference/c-function-window-tree-c-window_tree_kill_current_callback/) (function)
- [`window_tree_kill_tagged_callback`](/en/tmux/3.7c/reference/c-function-window-tree-c-window_tree_kill_tagged_callback/) (function)

## Referenced by

- [`window_tree_mode`](/en/tmux/3.7c/reference/c-variable-window_tree_mode/) (attribute)

## Referenced declarations

- [`__unused`](/en/tmux/3.7c/reference/c-define-compat-h-__unused/) (constant)
- [`client`](/en/tmux/3.7c/reference/c-struct-client/) (struct)
- [`window_tree_modedata.command`](/en/tmux/3.7c/reference/c-struct-window_tree_modedata-command/) (attribute)
- [`window_mode_entry.data`](/en/tmux/3.7c/reference/c-struct-window_mode_entry-data/) (attribute)
- [`window_tree_modedata.data`](/en/tmux/3.7c/reference/c-struct-window_tree_modedata-data/) (attribute)
- [`window_pane.flags`](/en/tmux/3.7c/reference/c-struct-window_pane-flags/) (attribute)
- [`window_tree_modedata.fs`](/en/tmux/3.7c/reference/c-struct-window_tree_modedata-fs/) (attribute)
- [`cmd_find_state.idx`](/en/tmux/3.7c/reference/c-struct-cmd_find_state-idx/) (attribute)
- [`winlink.idx`](/en/tmux/3.7c/reference/c-struct-winlink-idx/) (attribute)
- [`key_code`](/en/tmux/3.7c/reference/c-typedef-key_code/) (typealias)
- [`KEYC_IS_MOUSE`](/en/tmux/3.7c/reference/c-define-tmux-h-keyc_is_mouse/) (constant)
- [`mouse_event`](/en/tmux/3.7c/reference/c-struct-mouse_event/) (struct)
- [`session.name`](/en/tmux/3.7c/reference/c-struct-session-name/) (attribute)
- [`window_tree_modedata.offset`](/en/tmux/3.7c/reference/c-struct-window_tree_modedata-offset/) (attribute)
- [`PANE_REDRAW`](/en/tmux/3.7c/reference/c-define-tmux-h-pane_redraw/) (constant)
- [`window_tree_modedata.prompt_flags`](/en/tmux/3.7c/reference/c-struct-window_tree_modedata-prompt_flags/) (attribute)
- [`PROMPT_NOFORMAT`](/en/tmux/3.7c/reference/c-define-tmux-h-prompt_noformat/) (constant)
- [`PROMPT_SINGLE`](/en/tmux/3.7c/reference/c-define-tmux-h-prompt_single/) (constant)
- [`PROMPT_TYPE_COMMAND`](/en/tmux/3.7c/reference/c-enum-prompt_type-prompt_type_command/) (constant)
- [`window_tree_modedata.references`](/en/tmux/3.7c/reference/c-struct-window_tree_modedata-references/) (attribute)
- [`cmd_find_state.s`](/en/tmux/3.7c/reference/c-struct-cmd_find_state-s/) (attribute)
- [`session`](/en/tmux/3.7c/reference/c-struct-session/) (struct)
- [`window_tree_itemdata.type`](/en/tmux/3.7c/reference/c-struct-window_tree_itemdata-type/) (attribute)
- [`window_mode_entry`](/en/tmux/3.7c/reference/c-struct-window_mode_entry/) (struct)
- [`WINDOW_TREE_NONE`](/en/tmux/3.7c/reference/c-enum-window_tree_type-window_tree_none/) (constant)
- [`WINDOW_TREE_PANE`](/en/tmux/3.7c/reference/c-enum-window_tree_type-window_tree_pane/) (constant)
- [`WINDOW_TREE_SESSION`](/en/tmux/3.7c/reference/c-enum-window_tree_type-window_tree_session/) (constant)
- [`WINDOW_TREE_WINDOW`](/en/tmux/3.7c/reference/c-enum-window_tree_type-window_tree_window/) (constant)
- [`winlink`](/en/tmux/3.7c/reference/c-struct-winlink/) (struct)
- [`cmd_find_state.wl`](/en/tmux/3.7c/reference/c-struct-cmd_find_state-wl/) (attribute)
- [`window_mode_entry.wp`](/en/tmux/3.7c/reference/c-struct-window_mode_entry-wp/) (attribute)
