# cmd_list_keys_exec

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

tmux command: [`list-commands`](/en/tmux/3.2a/manual/list-commands/)

tmux command: [`list-keys`](/en/tmux/3.2a/manual/list-keys/)

```c
static enum cmd_retval cmd_list_keys_exec(struct cmd *, struct cmdq_item *)
```

## Parameters

- `self` (`struct cmd *`)
- `item` (`struct cmdq_item *`)

## Calls

- [`args_escape`](/en/tmux/3.2a/reference/c-function-args_escape/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L226)
- [`args_get`](/en/tmux/3.2a/reference/c-function-args_get/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L171)
- [`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#L177)
- [`cmd_get_args`](/en/tmux/3.2a/reference/c-function-cmd_get_args/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L150)
- [`cmd_get_entry`](/en/tmux/3.2a/reference/c-function-cmd_get_entry/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L159)
- [`cmd_list_keys_commands`](/en/tmux/3.2a/reference/c-function-cmd-list-keys-c-cmd_list_keys_commands/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L160)
- [`cmd_list_keys_get_prefix`](/en/tmux/3.2a/reference/c-function-cmd-list-keys-c-cmd_list_keys_get_prefix/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L179)
- [`cmd_list_keys_get_width`](/en/tmux/3.2a/reference/c-function-cmd-list-keys-c-cmd_list_keys_get_width/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L180)
- [`cmd_list_keys_print_notes`](/en/tmux/3.2a/reference/c-function-cmd-list-keys-c-cmd_list_keys_print_notes/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L190)
- [`cmd_list_print`](/en/tmux/3.2a/reference/c-function-cmd_list_print/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L290)
- [`cmdq_error`](/en/tmux/3.2a/reference/c-function-cmdq_error/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L165)
- [`cmdq_print`](/en/tmux/3.2a/reference/c-function-cmdq_print/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L299)
- [`key_bindings_first`](/en/tmux/3.2a/reference/c-function-key_bindings_first/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L220)
- [`key_bindings_first_table`](/en/tmux/3.2a/reference/c-function-key_bindings_first_table/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L214)
- [`key_bindings_next`](/en/tmux/3.2a/reference/c-function-key_bindings_next/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L223)
- [`key_bindings_next_table`](/en/tmux/3.2a/reference/c-function-key_bindings_next_table/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L217)
- [`key_string_lookup_string`](/en/tmux/3.2a/reference/c-function-key_string_lookup_string/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L163)
- [`utf8_cstrwidth`](/en/tmux/3.2a/reference/c-function-utf8_cstrwidth/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L231)
- [`utf8_padcstr`](/en/tmux/3.2a/reference/c-function-utf8_padcstr/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L188)
- [`xmalloc`](/en/tmux/3.2a/reference/c-function-xmalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L245)
- [`xrealloc`](/en/tmux/3.2a/reference/c-function-xrealloc/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L274)
- [`xsnprintf`](/en/tmux/3.2a/reference/c-function-xsnprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L268)
- [`xstrdup`](/en/tmux/3.2a/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L200)

## Other function references

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

## Referenced by

- [`cmd_list_commands_entry`](/en/tmux/3.2a/reference/c-variable-cmd_list_commands_entry/) (attribute)
- [`cmd_list_keys_entry`](/en/tmux/3.2a/reference/c-variable-cmd_list_keys_entry/) (attribute)

## Referenced declarations

- [`args.argc`](/en/tmux/3.2a/reference/c-struct-args-argc/) (attribute)
- [`args.argv`](/en/tmux/3.2a/reference/c-struct-args-argv/) (attribute)
- [`cmd`](/en/tmux/3.2a/reference/c-struct-cmd/) (struct)
- [`cmd_list_commands_entry`](/en/tmux/3.2a/reference/c-variable-cmd_list_commands_entry/) (attribute)
- [`CMD_RETURN_ERROR`](/en/tmux/3.2a/reference/c-enum-cmd_retval-cmd_return_error/) (constant)
- [`CMD_RETURN_NORMAL`](/en/tmux/3.2a/reference/c-enum-cmd_retval-cmd_return_normal/) (constant)
- [`cmd_retval`](/en/tmux/3.2a/reference/c-enum-cmd_retval/) (enum)
- [`key_binding.cmdlist`](/en/tmux/3.2a/reference/c-struct-key_binding-cmdlist/) (attribute)
- [`cmdq_item`](/en/tmux/3.2a/reference/c-struct-cmdq_item/) (struct)
- [`key_binding.flags`](/en/tmux/3.2a/reference/c-struct-key_binding-flags/) (attribute)
- [`key_binding.key`](/en/tmux/3.2a/reference/c-struct-key_binding-key/) (attribute)
- [`KEY_BINDING_REPEAT`](/en/tmux/3.2a/reference/c-define-tmux-h-key_binding_repeat/) (constant)
- [`KEYC_MASK_KEY`](/en/tmux/3.2a/reference/c-define-tmux-h-keyc_mask_key/) (constant)
- [`KEYC_MASK_MODIFIERS`](/en/tmux/3.2a/reference/c-define-tmux-h-keyc_mask_modifiers/) (constant)
- [`KEYC_NONE`](/en/tmux/3.2a/reference/c-define-tmux-h-keyc_none/) (constant)
- [`KEYC_UNKNOWN`](/en/tmux/3.2a/reference/c-define-tmux-h-keyc_unknown/) (constant)
- [`key_table.name`](/en/tmux/3.2a/reference/c-struct-key_table-name/) (attribute)
