# cmd_list_keys_get_prefix

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L132
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-cmd-list-keys-c-cmd_list_keys_get_prefix/

```c
static char * cmd_list_keys_get_prefix(struct args *args, key_code *prefix)
```

## Parameters

- `args` (`struct args *`)
- `prefix` (`key_code *`)

## Called by

- [`cmd_list_keys_exec`](/en/tmux/3.2a/reference/c-function-cmd-list-keys-c-cmd_list_keys_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L179)

## Calls

- [`args_has`](/en/tmux/3.2a/reference/c-function-args_has/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L137)
- [`options_get_number`](/en/tmux/3.2a/reference/c-function-options_get_number/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L136)
- [`xasprintf`](/en/tmux/3.2a/reference/c-function-xasprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L139)
- [`xstrdup`](/en/tmux/3.2a/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L141)

## Other function references

- [`args_get`](/en/tmux/3.2a/reference/c-function-args_get/) (function)
- [`key_string_lookup_key`](/en/tmux/3.2a/reference/c-function-key_string_lookup_key/) (function)

## Referenced declarations

- [`args`](/en/tmux/3.2a/reference/c-struct-args/) (struct)
- [`global_s_options`](/en/tmux/3.2a/reference/c-variable-global_s_options/) (attribute)
- [`key_code`](/en/tmux/3.2a/reference/c-typedef-key_code/) (typealias)
- [`KEYC_NONE`](/en/tmux/3.2a/reference/c-define-tmux-h-keyc_none/) (constant)
