# server_client_check_mouse

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L717
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-server-client-c-server_client_check_mouse/

```c
static key_code server_client_check_mouse(struct client *, struct key_event *)
```

## Parameters

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

## Called by

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

## Calls

- [`log_debug`](/en/tmux/latest/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L733)
- [`log_get_level`](/en/tmux/latest/reference/c-function-log_get_level/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1071)
- [`server_client_check_mouse_in_pane`](/en/tmux/latest/reference/c-function-server-client-c-server_client_check_mouse_in_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L918)
- [`server_redraw_window_borders`](/en/tmux/latest/reference/c-function-server_redraw_window_borders/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1005)
- [`server_status_window`](/en/tmux/latest/reference/c-function-server_status_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1006)
- [`session_find_by_id`](/en/tmux/latest/reference/c-function-session_find_by_id/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L860)
- [`status_at_line`](/en/tmux/latest/reference/c-function-status_at_line/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L820)
- [`status_get_range`](/en/tmux/latest/reference/c-function-status_get_range/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L825)
- [`status_line_size`](/en/tmux/latest/reference/c-function-status_line_size/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L821)
- [`tty_window_offset`](/en/tmux/latest/reference/c-function-tty_window_offset/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L901)
- [`window_get_active_at`](/en/tmux/latest/reference/c-function-window_get_active_at/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L914)
- [`window_pane_border_status_get_range`](/en/tmux/latest/reference/c-function-window_pane_border_status_get_range/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L925)
- [`window_pane_find_by_id`](/en/tmux/latest/reference/c-function-window_pane_find_by_id/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L738)
- [`window_redraw_active_switch`](/en/tmux/latest/reference/c-function-window_redraw_active_switch/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1003)
- [`window_set_active_pane`](/en/tmux/latest/reference/c-function-window_set_active_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1004)
- [`winlink_find_by_index`](/en/tmux/latest/reference/c-function-winlink_find_by_index/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L850)

## Other function references

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

## Referenced declarations

- [`window.active`](/en/tmux/latest/reference/c-struct-window-active/) (attribute)
- [`style_range.argument`](/en/tmux/latest/reference/c-struct-style_range-argument/) (attribute)
- [`mouse_event.b`](/en/tmux/latest/reference/c-struct-mouse_event-b/) (attribute)
- [`client.click_button`](/en/tmux/latest/reference/c-struct-client-click_button/) (attribute)
- [`client.click_event`](/en/tmux/latest/reference/c-struct-client-click_event/) (attribute)
- [`client.click_loc`](/en/tmux/latest/reference/c-struct-client-click_loc/) (attribute)
- [`client.click_timer`](/en/tmux/latest/reference/c-struct-client-click_timer/) (attribute)
- [`client.click_wp`](/en/tmux/latest/reference/c-struct-client-click_wp/) (attribute)
- [`client`](/en/tmux/latest/reference/c-struct-client/) (struct)
- [`CLIENT_DOUBLECLICK`](/en/tmux/latest/reference/c-define-tmux-h-client_doubleclick/) (constant)
- [`CLIENT_TRIPLECLICK`](/en/tmux/latest/reference/c-define-tmux-h-client_tripleclick/) (constant)
- [`session.curw`](/en/tmux/latest/reference/c-struct-session-curw/) (attribute)
- [`client.flags`](/en/tmux/latest/reference/c-struct-client-flags/) (attribute)
- [`session.id`](/en/tmux/latest/reference/c-struct-session-id/) (attribute)
- [`window_pane.id`](/en/tmux/latest/reference/c-struct-window_pane-id/) (attribute)
- [`window.id`](/en/tmux/latest/reference/c-struct-window-id/) (attribute)
- [`mouse_event.ignore`](/en/tmux/latest/reference/c-struct-mouse_event-ignore/) (attribute)
- [`key_event.key`](/en/tmux/latest/reference/c-struct-key_event-key/) (attribute)
- [`key_code`](/en/tmux/latest/reference/c-typedef-key_code/) (typealias)
- [`key_event`](/en/tmux/latest/reference/c-struct-key_event/) (struct)
- [`KEYC_CLICK_TIMEOUT`](/en/tmux/latest/reference/c-define-tmux-h-keyc_click_timeout/) (constant)
- [`KEYC_CTRL`](/en/tmux/latest/reference/c-define-tmux-h-keyc_ctrl/) (constant)
- [`KEYC_DOUBLECLICK`](/en/tmux/latest/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_doubleclick/) (constant)
- [`KEYC_DRAGGING`](/en/tmux/latest/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_dragging/) (constant)
- [`KEYC_MAKE_MOUSE_KEY`](/en/tmux/latest/reference/c-define-tmux-h-keyc_make_mouse_key/) (constant)
- [`KEYC_META`](/en/tmux/latest/reference/c-define-tmux-h-keyc_meta/) (constant)
- [`KEYC_MOUSE_LOCATION_BORDER`](/en/tmux/latest/reference/c-enum-key_code_mouse_location-keyc_mouse_location_border/) (constant)
- [`KEYC_MOUSE_LOCATION_CONTROL0`](/en/tmux/latest/reference/c-enum-key_code_mouse_location-keyc_mouse_location_control0/) (constant)
- [`KEYC_MOUSE_LOCATION_NOWHERE`](/en/tmux/latest/reference/c-enum-key_code_mouse_location-keyc_mouse_location_nowhere/) (constant)
- [`KEYC_MOUSE_LOCATION_PANE`](/en/tmux/latest/reference/c-enum-key_code_mouse_location-keyc_mouse_location_pane/) (constant)
- [`KEYC_MOUSE_LOCATION_SCROLLBAR_DOWN`](/en/tmux/latest/reference/c-enum-key_code_mouse_location-keyc_mouse_location_scrollbar_down/) (constant)
- [`KEYC_MOUSE_LOCATION_SCROLLBAR_SLIDER`](/en/tmux/latest/reference/c-enum-key_code_mouse_location-keyc_mouse_location_scrollbar_slider/) (constant)
- [`KEYC_MOUSE_LOCATION_SCROLLBAR_UP`](/en/tmux/latest/reference/c-enum-key_code_mouse_location-keyc_mouse_location_scrollbar_up/) (constant)
- [`KEYC_MOUSE_LOCATION_STATUS`](/en/tmux/latest/reference/c-enum-key_code_mouse_location-keyc_mouse_location_status/) (constant)
- [`KEYC_MOUSE_LOCATION_STATUS_DEFAULT`](/en/tmux/latest/reference/c-enum-key_code_mouse_location-keyc_mouse_location_status_default/) (constant)
- [`KEYC_MOUSE_LOCATION_STATUS_LEFT`](/en/tmux/latest/reference/c-enum-key_code_mouse_location-keyc_mouse_location_status_left/) (constant)
- [`KEYC_MOUSE_LOCATION_STATUS_RIGHT`](/en/tmux/latest/reference/c-enum-key_code_mouse_location-keyc_mouse_location_status_right/) (constant)
- [`KEYC_MOUSEMOVE_PANE`](/en/tmux/latest/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_mousemove_pane/) (constant)
- [`KEYC_SHIFT`](/en/tmux/latest/reference/c-define-tmux-h-keyc_shift/) (constant)
- [`KEYC_TYPE_DOUBLECLICK`](/en/tmux/latest/reference/c-enum-key_code_type-keyc_type_doubleclick/) (constant)
- [`KEYC_TYPE_MOUSEDOWN`](/en/tmux/latest/reference/c-enum-key_code_type-keyc_type_mousedown/) (constant)
- [`KEYC_TYPE_MOUSEDRAG`](/en/tmux/latest/reference/c-enum-key_code_type-keyc_type_mousedrag/) (constant)
- [`KEYC_TYPE_MOUSEDRAGEND`](/en/tmux/latest/reference/c-enum-key_code_type-keyc_type_mousedragend/) (constant)
- [`KEYC_TYPE_MOUSEMOVE`](/en/tmux/latest/reference/c-enum-key_code_type-keyc_type_mousemove/) (constant)
- [`KEYC_TYPE_MOUSEUP`](/en/tmux/latest/reference/c-enum-key_code_type-keyc_type_mouseup/) (constant)
- [`KEYC_TYPE_NOTYPE`](/en/tmux/latest/reference/c-enum-key_code_type-keyc_type_notype/) (constant)
- [`KEYC_TYPE_SECONDCLICK`](/en/tmux/latest/reference/c-enum-key_code_type-keyc_type_secondclick/) (constant)
- [`KEYC_TYPE_TRIPLECLICK`](/en/tmux/latest/reference/c-enum-key_code_type-keyc_type_tripleclick/) (constant)
- [`KEYC_TYPE_WHEELDOWN`](/en/tmux/latest/reference/c-enum-key_code_type-keyc_type_wheeldown/) (constant)
- [`KEYC_TYPE_WHEELUP`](/en/tmux/latest/reference/c-enum-key_code_type-keyc_type_wheelup/) (constant)
- [`KEYC_UNKNOWN`](/en/tmux/latest/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_unknown/) (constant)
- [`mouse_event.lb`](/en/tmux/latest/reference/c-struct-mouse_event-lb/) (attribute)
- [`mouse_event.lx`](/en/tmux/latest/reference/c-struct-mouse_event-lx/) (attribute)
- [`mouse_event.ly`](/en/tmux/latest/reference/c-struct-mouse_event-ly/) (attribute)
- [`MOUSE_BUTTON_1`](/en/tmux/latest/reference/c-define-tmux-h-mouse_button_1/) (constant)
- [`MOUSE_BUTTON_10`](/en/tmux/latest/reference/c-define-tmux-h-mouse_button_10/) (constant)
- [`MOUSE_BUTTON_11`](/en/tmux/latest/reference/c-define-tmux-h-mouse_button_11/) (constant)
- [`MOUSE_BUTTON_2`](/en/tmux/latest/reference/c-define-tmux-h-mouse_button_2/) (constant)
- [`MOUSE_BUTTON_3`](/en/tmux/latest/reference/c-define-tmux-h-mouse_button_3/) (constant)
- [`MOUSE_BUTTON_6`](/en/tmux/latest/reference/c-define-tmux-h-mouse_button_6/) (constant)
- [`MOUSE_BUTTON_7`](/en/tmux/latest/reference/c-define-tmux-h-mouse_button_7/) (constant)
- [`MOUSE_BUTTON_8`](/en/tmux/latest/reference/c-define-tmux-h-mouse_button_8/) (constant)
- [`MOUSE_BUTTON_9`](/en/tmux/latest/reference/c-define-tmux-h-mouse_button_9/) (constant)
- [`MOUSE_BUTTONS`](/en/tmux/latest/reference/c-define-tmux-h-mouse_buttons/) (constant)
- [`MOUSE_DRAG`](/en/tmux/latest/reference/c-define-tmux-h-mouse_drag/) (constant)
- [`tty.mouse_drag_flag`](/en/tmux/latest/reference/c-struct-tty-mouse_drag_flag/) (attribute)
- [`tty.mouse_drag_release`](/en/tmux/latest/reference/c-struct-tty-mouse_drag_release/) (attribute)
- [`tty.mouse_drag_update`](/en/tmux/latest/reference/c-struct-tty-mouse_drag_update/) (attribute)
- [`tty.mouse_last_pane`](/en/tmux/latest/reference/c-struct-tty-mouse_last_pane/) (attribute)
- [`MOUSE_MASK_BUTTONS`](/en/tmux/latest/reference/c-define-tmux-h-mouse_mask_buttons/) (constant)
- [`MOUSE_MASK_CTRL`](/en/tmux/latest/reference/c-define-tmux-h-mouse_mask_ctrl/) (constant)
- [`MOUSE_MASK_META`](/en/tmux/latest/reference/c-define-tmux-h-mouse_mask_meta/) (constant)
- [`MOUSE_MASK_SHIFT`](/en/tmux/latest/reference/c-define-tmux-h-mouse_mask_shift/) (constant)
- [`MOUSE_RELEASE`](/en/tmux/latest/reference/c-define-tmux-h-mouse_release/) (constant)
- [`tty.mouse_scrolling_flag`](/en/tmux/latest/reference/c-struct-tty-mouse_scrolling_flag/) (attribute)
- [`tty.mouse_slider_mpos`](/en/tmux/latest/reference/c-struct-tty-mouse_slider_mpos/) (attribute)
- [`MOUSE_WHEEL`](/en/tmux/latest/reference/c-define-tmux-h-mouse_wheel/) (constant)
- [`MOUSE_WHEEL_UP`](/en/tmux/latest/reference/c-define-tmux-h-mouse_wheel_up/) (constant)
- [`client.name`](/en/tmux/latest/reference/c-struct-client-name/) (attribute)
- [`session.options`](/en/tmux/latest/reference/c-struct-session-options/) (attribute)
- [`mouse_event.ox`](/en/tmux/latest/reference/c-struct-mouse_event-ox/) (attribute)
- [`mouse_event.oy`](/en/tmux/latest/reference/c-struct-mouse_event-oy/) (attribute)
- [`mouse_event.s`](/en/tmux/latest/reference/c-struct-mouse_event-s/) (attribute)
- [`client.session`](/en/tmux/latest/reference/c-struct-client-session/) (attribute)
- [`mouse_event.sgr_b`](/en/tmux/latest/reference/c-struct-mouse_event-sgr_b/) (attribute)
- [`mouse_event.sgr_type`](/en/tmux/latest/reference/c-struct-mouse_event-sgr_type/) (attribute)
- [`mouse_event.statusat`](/en/tmux/latest/reference/c-struct-mouse_event-statusat/) (attribute)
- [`mouse_event.statuslines`](/en/tmux/latest/reference/c-struct-mouse_event-statuslines/) (attribute)
- [`STYLE_RANGE_CONTROL`](/en/tmux/latest/reference/c-enum-style_range_type-style_range_control/) (constant)
- [`STYLE_RANGE_LEFT`](/en/tmux/latest/reference/c-enum-style_range_type-style_range_left/) (constant)
- [`STYLE_RANGE_NONE`](/en/tmux/latest/reference/c-enum-style_range_type-style_range_none/) (constant)
- [`STYLE_RANGE_PANE`](/en/tmux/latest/reference/c-enum-style_range_type-style_range_pane/) (constant)
- [`STYLE_RANGE_RIGHT`](/en/tmux/latest/reference/c-enum-style_range_type-style_range_right/) (constant)
- [`STYLE_RANGE_SESSION`](/en/tmux/latest/reference/c-enum-style_range_type-style_range_session/) (constant)
- [`STYLE_RANGE_USER`](/en/tmux/latest/reference/c-enum-style_range_type-style_range_user/) (constant)
- [`STYLE_RANGE_WINDOW`](/en/tmux/latest/reference/c-enum-style_range_type-style_range_window/) (constant)
- [`window_pane.sx`](/en/tmux/latest/reference/c-struct-window_pane-sx/) (attribute)
- [`window_pane.sy`](/en/tmux/latest/reference/c-struct-window_pane-sy/) (attribute)
- [`client.tty`](/en/tmux/latest/reference/c-struct-client-tty/) (attribute)
- [`style_range.type`](/en/tmux/latest/reference/c-struct-style_range-type/) (attribute)
- [`mouse_event.w`](/en/tmux/latest/reference/c-struct-mouse_event-w/) (attribute)
- [`window_pane.window`](/en/tmux/latest/reference/c-struct-window_pane-window/) (attribute)
- [`winlink.window`](/en/tmux/latest/reference/c-struct-winlink-window/) (attribute)
- [`session.windows`](/en/tmux/latest/reference/c-struct-session-windows/) (attribute)
- [`mouse_event.wp`](/en/tmux/latest/reference/c-struct-mouse_event-wp/) (attribute)
- [`mouse_event.x`](/en/tmux/latest/reference/c-struct-mouse_event-x/) (attribute)
- [`mouse_event.y`](/en/tmux/latest/reference/c-struct-mouse_event-y/) (attribute)
