# tty_keys_add

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

```c
static void tty_keys_add(struct tty *, const char *, key_code)
```

## Parameters

- `tty` (`struct tty *`)
- `s` (`const char *`)
- `key` (`key_code`)

## Called by

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

## Calls

- [`key_string_lookup_key`](/en/tmux/3.7c/reference/c-function-key_string_lookup_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty-keys.c#L440)
- [`log_debug`](/en/tmux/3.7c/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty-keys.c#L442)
- [`tty_keys_add1`](/en/tmux/3.7c/reference/c-function-tty-keys-c-tty_keys_add1/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty-keys.c#L443)

## Other function references

- [`tty_keys_find`](/en/tmux/3.7c/reference/c-function-tty-keys-c-tty_keys_find/) (function)

## Referenced declarations

- [`tty_key.key`](/en/tmux/3.7c/reference/c-struct-tty_key-key/) (attribute)
- [`key_code`](/en/tmux/3.7c/reference/c-typedef-key_code/) (typealias)
- [`tty.key_tree`](/en/tmux/3.7c/reference/c-struct-tty-key_tree/) (attribute)
- [`tty`](/en/tmux/3.7c/reference/c-struct-tty/) (struct)
