# tty_keys_add

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty-keys.c#L420
- **Page:** https://libtmux.org/en/tmux/3.2a/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.2a/reference/c-function-tty_keys_build/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty-keys.c#L500)

## Calls

- [`key_string_lookup_key`](/en/tmux/3.2a/reference/c-function-key_string_lookup_key/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty-keys.c#L426)
- [`log_debug`](/en/tmux/3.2a/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty-keys.c#L428)
- [`tty_keys_add1`](/en/tmux/3.2a/reference/c-function-tty-keys-c-tty_keys_add1/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty-keys.c#L429)

## Other function references

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

## Referenced declarations

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