# Using templates

The **Use prompt template** command's current binding is shown in **Settings > Hotkeys**. Its default is **Cmd+Shift+P** on macOS and **Ctrl+Shift+P** on Windows and Linux, and it can be rebound or disabled. Invoke it from the main UI or while another palette is topmost; a modal or pane overlay above it blocks the command. The picker lets you search, navigate with the arrow keys, and insert a saved prompt from the [library](./creating-and-editing.md) into the active agent or terminal input.

## The picker

The picker lists the active project's shared template pool plus global templates. With an empty search, templates use last-used ordering with one-second timestamp precision; templates used within the same second tie and then sort by name and ID. Search re-ranks results by title-match quality before the base order and preserves that base order only within equal match ranks. Each row shows the template name, its description (or a body preview), and its scope on the right.

Type to search across the name, description, body, and literal **Global/Project** scope kind; displayed project names are not searched. If another palette is topmost, the **Use prompt template** command retargets it to the template picker. A modal or pane overlay above the palette blocks the command.

| Key | Action |
|-----|--------|
| `↑ / ↓` | Move the selection |
| `Enter` | Insert the template into the active agent or terminal input |
| `Shift+Enter` | Insert and submit it |
| **Cmd+C (macOS) / Ctrl+Shift+C (Windows and Linux)** | Copy the rendered prompt when the picker input has no selected text; with selected text, Solo leaves the input's native selected-text behavior in place. |
| **Cmd+N (macOS) / Ctrl+N (Windows and Linux)** | Open the prompt-template library to manage templates. |
| `Esc` | Close the picker |

In the template list, the footer shows navigation, Enter, Shift+Enter, copy, and manage shortcuts. It does not show Esc, although Esc closes the picker. Solo records a template's last use with one-second precision; repeated uses within the same second share a timestamp. With no search, a newer timestamp moves the row up the picker, while same-second ties use name and ID. In the library, Last used moves the row only within its **Project** or **Global** group, and the project group remains before **Global**.

## Where the text goes

Templates target the agent or terminal input you most recently focused. Terminal-backed agent and terminal inputs must be running. Text is inserted like a paste, so multi-line prompts remain intact, and focus moves to that input so you can keep typing.

`Shift+Enter` submits the prompt after inserting it, as if you pressed Enter in the input yourself. If the target can't be submitted automatically, Solo inserts the text and lets you know.

If no agent or terminal input is available at all, Solo falls back to copying the rendered prompt to the clipboard and tells you so.

## Filling placeholders

Picking a template that contains [placeholders](./placeholders.md) opens a fill wizard before anything is inserted. The picker input becomes the value field for one placeholder at a time, and a live preview of the whole prompt shows each value dropping into place — the placeholder you're filling is highlighted and kept in view. A progress indicator like `Variable 2/3` tracks where you are.

| Key | Action |
|-----|--------|
| `Enter` | Set the current value and move to the next placeholder; on the last one, perform the action |
| `Shift+Enter` | Like `Enter`, but the finished prompt will be submitted, not just inserted |
| `Tab / Shift+Tab` | Move forward or back through placeholders without losing values |
| **Cmd+C (macOS) / Ctrl+Shift+C (Windows and Linux)** | Copy the prompt with values entered so far when the value field has no selected text; unfilled placeholders stay as **{{name}}**. With selected text, Solo leaves the field's native selected-text behavior in place. |
| `Backspace` (on an empty value) or `Esc` | Leave the wizard and return to the template list |

Values you leave empty are replaced with nothing in the final prompt. Once the last placeholder is set, the rendered prompt is inserted, submitted, or copied depending on how you started.

---

Are you a human? Read this doc on the web: https://soloterm.com/docs/prompt-templates/using-templates
