# KEYC_IS_MOUSE

- **Language:** C
- **Kind:** constant
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tmux.h#L209
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-define-tmux-h-keyc_is_mouse/

```c
#define KEYC_IS_MOUSE(key) (((key) & KEYC_MASK_KEY) == KEYC_MOUSE || \
 (((key) & KEYC_MASK_TYPE) >= KEYC_SHIFT_TYPE(KEYC_TYPE_MOUSEMOVE) && \
  ((key) & KEYC_MASK_TYPE) <= KEYC_SHIFT_TYPE(KEYC_TYPE_TRIPLECLICK)))
```

## Referenced by

- [`cmd_copy_mode_exec`](/en/tmux/3.7c/reference/c-function-cmd-copy-mode-c-cmd_copy_mode_exec/) (function)
- [`input_key`](/en/tmux/3.7c/reference/c-function-input_key/) (function)
- [`input_key_pane`](/en/tmux/3.7c/reference/c-function-input_key_pane/) (function)
- [`menu_key_cb`](/en/tmux/3.7c/reference/c-function-menu_key_cb/) (function)
- [`mode_tree_key`](/en/tmux/3.7c/reference/c-function-mode_tree_key/) (function)
- [`popup_key_cb`](/en/tmux/3.7c/reference/c-function-popup-c-popup_key_cb/) (function)
- [`server_client_key_callback`](/en/tmux/3.7c/reference/c-function-server-client-c-server_client_key_callback/) (function)
- [`window_pane_key`](/en/tmux/3.7c/reference/c-function-window_pane_key/) (function)
- [`window_tree_key`](/en/tmux/3.7c/reference/c-function-window-tree-c-window_tree_key/) (function)

## Referenced declarations

- [`KEYC_MASK_KEY`](/en/tmux/3.7c/reference/c-define-tmux-h-keyc_mask_key/) (constant)
- [`KEYC_MASK_TYPE`](/en/tmux/3.7c/reference/c-define-tmux-h-keyc_mask_type/) (constant)
- [`KEYC_MOUSE`](/en/tmux/3.7c/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_mouse/) (constant)
- [`KEYC_SHIFT_TYPE`](/en/tmux/3.7c/reference/c-define-tmux-h-keyc_shift_type/) (constant)
- [`KEYC_TYPE_MOUSEMOVE`](/en/tmux/3.7c/reference/c-enum-key_code_type-keyc_type_mousemove/) (constant)
- [`KEYC_TYPE_TRIPLECLICK`](/en/tmux/3.7c/reference/c-enum-key_code_type-keyc_type_tripleclick/) (constant)
