# sort_get_key_bindings_table

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/sort.c#L651
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-sort_get_key_bindings_table/

```c
struct key_binding ** sort_get_key_bindings_table(struct key_table *table, u_int *n, struct sort_criteria *sort_crit)
```

## Parameters

- `table` (`struct key_table *`)
- `n` (`u_int *`)
- `sort_crit` (`struct sort_criteria *`)

## Called by

- [`cmd_list_keys_exec`](/en/tmux/latest/reference/c-function-cmd-list-keys-c-cmd_list_keys_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-keys.c#L214)
- [`cmd_list_keys_get_root_and_prefix`](/en/tmux/latest/reference/c-function-cmd-list-keys-c-cmd_list_keys_get_root_and_prefix/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-keys.c#L107)

## Calls

- [`key_bindings_first`](/en/tmux/latest/reference/c-function-key_bindings_first/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/sort.c#L659)
- [`key_bindings_next`](/en/tmux/latest/reference/c-function-key_bindings_next/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/sort.c#L666)
- [`sort_qsort`](/en/tmux/latest/reference/c-function-sort-c-sort_qsort/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/sort.c#L669)
- [`xreallocarray`](/en/tmux/latest/reference/c-function-xreallocarray/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/sort.c#L663)

## Other function references

- [`sort_key_binding_cmp`](/en/tmux/latest/reference/c-function-sort-c-sort_key_binding_cmp/) (function)

## Referenced declarations

- [`key_binding`](/en/tmux/latest/reference/c-struct-key_binding/) (struct)
- [`key_table`](/en/tmux/latest/reference/c-struct-key_table/) (struct)
- [`sort_criteria`](/en/tmux/latest/reference/c-struct-sort_criteria/) (struct)
