> For the complete documentation index, see [llms.txt](https://docs.pixiebrix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pixiebrix.com/developing-mods/developer-concepts/types-of-mods/button/hotkeys.md).

# Hotkeys

Initiate mod runs with keyboard shortcuts

PixieBrix lets you trigger mods using keyboard shortcuts, known as hotkeys. This is useful for power users who want quick access to mods without clicking buttons or menus

### How to Set Up a Hotkey

1. **Add a Trigger Brick**\
   Use the [**Trigger**](/developing-mods/developer-concepts/types-of-mods/trigger.md) starter brick and set the trigger event to **Page Load.**<br>

   <figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2FYHZbcl8WTOKwSJWhRUtQ%2FCleanShot%202025-07-15%20at%2010.48.10.png?alt=media&amp;token=1ab63327-b224-44d0-b13f-6a73c35da5ff" alt=""><figcaption></figcaption></figure>
2. **Add the Add Hotkey brick**\
   In the Brick Action Pipeline, click the ➕ button and add the **Add Hotkey** brick.
3. **Configure the Hotkey Settings**\
   In the Add Hotkey brick:

   * **Title:** Human friendly text describing the action.
   * **Key Name**: Type the key combination you want to use (e.g. `ctrl+shift+d`, `alt+h`, `⌘+j`, etc.). [Read more about available keys](https://www.w3.org/TR/uievents-key/).<br>

   <figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2FMBsixrVwCUutXV0JL3oY%2FCleanShot%202025-07-15%20at%2010.51.31.png?alt=media&amp;token=16c70839-9c88-4235-8771-dad6590706e4" alt=""><figcaption></figcaption></figure>
4. **Add Bricks to the Action Pipeline**\
   After the trigger, add the bricks that should run when the hotkey is pressed. This can be anything—showing a sidebar, extracting info from a page, fetching info from an API, etc.<br>

   <figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2FP0KlynSD0YvSTnEIuWCY%2FCleanShot%202025-07-15%20at%2010.52.40.png?alt=media&amp;token=483678ec-d6eb-43ed-884f-2baf08353684" alt=""><figcaption></figcaption></figure>

***

### Best Practices

* **Avoid Conflicts**: Don’t use common browser/system shortcuts (like `ctrl+s`, `cmd+r`, `alt+tab`) to avoid interrupting standard behavior.
* **Use Modifier Keys**: Hotkeys with `ctrl`, `alt`, `shift`, or `⌘` are less likely to conflict and easier to remember.
* **Communicate Clearly**: If you're sharing your mod, display the hotkey in the UI or a tooltip so users know it exists. This often works nicely as the title for [Floating Actions](/developing-mods/developer-concepts/types-of-mods/button/floating-actions.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pixiebrix.com/developing-mods/developer-concepts/types-of-mods/button/hotkeys.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
