# sort_get_key_bindings

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

```c
struct key_binding ** sort_get_key_bindings(u_int *n, struct sort_criteria *sort_crit)
```

## Parameters

- `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#L218)

## 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#L632)
- [`key_bindings_first_table`](/en/tmux/latest/reference/c-function-key_bindings_first_table/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/sort.c#L630)
- [`key_bindings_next`](/en/tmux/latest/reference/c-function-key_bindings_next/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/sort.c#L639)
- [`key_bindings_next_table`](/en/tmux/latest/reference/c-function-key_bindings_next_table/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/sort.c#L641)
- [`sort_qsort`](/en/tmux/latest/reference/c-function-sort-c-sort_qsort/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/sort.c#L644)
- [`xreallocarray`](/en/tmux/latest/reference/c-function-xreallocarray/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/sort.c#L636)

## 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)
- [`sort_criteria`](/en/tmux/latest/reference/c-struct-sort_criteria/) (struct)
