# tty_keys_mouse

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty-keys.c#L1186
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-tty-keys-c-tty_keys_mouse/

```c
static int tty_keys_mouse(struct tty *, const char *, size_t, size_t *, struct mouse_event *)
```

## Parameters

- `tty` (`struct tty *`)
- `buf` (`const char *`)
- `len` (`size_t`)
- `size` (`size_t *`)
- `m` (`struct mouse_event *`)

## Called by

- [`tty_keys_next`](/en/tmux/latest/reference/c-function-tty_keys_next/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty-keys.c#L835)

## Calls

- [`log_debug`](/en/tmux/latest/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty-keys.c#L1238)

## Referenced declarations

- [`mouse_event.b`](/en/tmux/latest/reference/c-struct-mouse_event-b/) (attribute)
- [`tty.client`](/en/tmux/latest/reference/c-struct-tty-client/) (attribute)
- [`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_event`](/en/tmux/latest/reference/c-struct-mouse_event/) (struct)
- [`tty.mouse_last_b`](/en/tmux/latest/reference/c-struct-tty-mouse_last_b/) (attribute)
- [`tty.mouse_last_x`](/en/tmux/latest/reference/c-struct-tty-mouse_last_x/) (attribute)
- [`tty.mouse_last_y`](/en/tmux/latest/reference/c-struct-tty-mouse_last_y/) (attribute)
- [`MOUSE_PARAM_BTN_OFF`](/en/tmux/latest/reference/c-define-tmux-h-mouse_param_btn_off/) (constant)
- [`MOUSE_PARAM_POS_OFF`](/en/tmux/latest/reference/c-define-tmux-h-mouse_param_pos_off/) (constant)
- [`MOUSE_WHEEL`](/en/tmux/latest/reference/c-define-tmux-h-mouse_wheel/) (constant)
- [`client.name`](/en/tmux/latest/reference/c-struct-client-name/) (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)
- [`tty`](/en/tmux/latest/reference/c-struct-tty/) (struct)
- [`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)
