> 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

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="/files/mBHvbIibHnVwTi4Wop0X" 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="/files/zCWunaOfY3ietQLVDMfB" 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="/files/24ncrgUgPx7RfOXCqHaa" 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
