# cmdq_add_message

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L561
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-cmd-queue-c-cmdq_add_message/

```c
static void cmdq_add_message(struct cmdq_item *item)
```

## Parameters

- `item` (`struct cmdq_item *`)

## Called by

- [`cmdq_fire_command`](/en/tmux/latest/reference/c-function-cmd-queue-c-cmdq_fire_command/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L611)

## Calls

- [`cmd_print`](/en/tmux/latest/reference/c-function-cmd_print/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L571)
- [`key_string_lookup_key`](/en/tmux/latest/reference/c-function-key_string_lookup_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L582)
- [`proc_get_peer_uid`](/en/tmux/latest/reference/c-function-proc_get_peer_uid/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L573)
- [`server_add_message`](/en/tmux/latest/reference/c-function-server_add_message/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L583)
- [`xasprintf`](/en/tmux/latest/reference/c-function-xasprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L576)
- [`xstrdup`](/en/tmux/latest/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L578)

## Referenced declarations

- [`cmdq_item.client`](/en/tmux/latest/reference/c-struct-cmdq_item-client/) (attribute)
- [`cmdq_item.cmd`](/en/tmux/latest/reference/c-struct-cmdq_item-cmd/) (attribute)
- [`cmdq_item`](/en/tmux/latest/reference/c-struct-cmdq_item/) (struct)
- [`cmdq_state.event`](/en/tmux/latest/reference/c-struct-cmdq_state-event/) (attribute)
- [`key_event.key`](/en/tmux/latest/reference/c-struct-key_event-key/) (attribute)
- [`KEYC_NONE`](/en/tmux/latest/reference/c-enum-tmux-h-332237342172367247102064023371112372044056265234-keyc_none/) (constant)
- [`client.name`](/en/tmux/latest/reference/c-struct-client-name/) (attribute)
- [`client.peer`](/en/tmux/latest/reference/c-struct-client-peer/) (attribute)
- [`client.session`](/en/tmux/latest/reference/c-struct-client-session/) (attribute)
- [`cmdq_item.state`](/en/tmux/latest/reference/c-struct-cmdq_item-state/) (attribute)
