# cmd_list_keys_get_width

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

```c
static u_int cmd_list_keys_get_width(const char *tablename, key_code only)
```

## Parameters

- `tablename` (`const char *`)
- `only` (`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#L180)

## Calls

- [`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#L67)
- [`key_bindings_get_table`](/en/tmux/3.2a/reference/c-function-key_bindings_get_table/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-list-keys.c#L64)
- [`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#L73)
- [`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#L76)

## Other function references

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

## Referenced declarations

- [`key_binding.key`](/en/tmux/3.2a/reference/c-struct-key_binding-key/) (attribute)
- [`key_code`](/en/tmux/3.2a/reference/c-typedef-key_code/) (typealias)
- [`KEYC_IS_MOUSE`](/en/tmux/3.2a/reference/c-define-tmux-h-keyc_is_mouse/) (constant)
- [`KEYC_UNKNOWN`](/en/tmux/3.2a/reference/c-define-tmux-h-keyc_unknown/) (constant)
- [`key_binding.note`](/en/tmux/3.2a/reference/c-struct-key_binding-note/) (attribute)
