---
title: "Offer keyboard shortcuts and a command · Agent Wranglers"
url: https://agentwranglers.se/playbook/app-ui/layout-and-navigation/keyboard-shortcuts
id: APP-83
level: Optional
updated: 2026-10-22
build: a2a6bdfed830
tokens: 897
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Offer keyboard shortcuts and a command palette

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Layout and navigation](https://agentwranglers.se/playbook/app-ui/layout-and-navigation.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-22.

- ID: APP-83
- Level: Optional
- Chapter: [Layout and navigation](https://agentwranglers.se/playbook/app-ui/layout-and-navigation.md)
- Rule: In apps people use for hours, offer shortcuts for the most used actions and a command palette that finds any action by name. List every shortcut on one help screen.
- Check: A test reads the action list. Every action appears in the palette, and every shortcut appears on the help screen. No shortcut is a single character without a modifier, unless a setting turns it off. A browser test opens the palette with the keyboard and runs one action without the mouse.
- How: Open the palette with `Ctrl+K` or `Cmd+K`, and build it as a combobox, as [Build search-as-you-type fields as a combobox](https://agentwranglers.se/playbook/app-ui/forms/search-combobox.md) says. Take its entries from the same list of actions as the menus, so the two never differ. Give shortcuts a modifier key, or let people turn single-key shortcuts off, as [Never take over single keys](https://agentwranglers.se/playbook/accessibility/keyboard-and-focus/character-key-shortcuts.md) requires. Never reuse a browser or screen reader shortcut. Show each shortcut next to its menu item and in `aria-keyshortcuts`.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### JavaScript example

```js
export const ACTIONS = [
  { id: 'invoice.new', label: 'New invoice', shortcut: 'Control+Alt+N', run: openNewInvoice },
  { id: 'search', label: 'Search', shortcut: 'Control+K', run: openPalette },
];
const hasModifier = shortcut => /^(Control|Alt|Meta)\+/.test(shortcut);
```

### Python example

```python
def test_every_shortcut_has_a_modifier():
    for action in load_actions():
        assert action["shortcut"].split("+")[0] in {"Control", "Alt", "Meta"}, action["id"]
```

## Sources

- [WCAG 2.2 – 2.1.4 Character Key Shortcuts](https://www.w3.org/TR/WCAG22/#character-key-shortcuts)
- [WAI-ARIA 1.2 (aria-keyshortcuts)](https://www.w3.org/TR/wai-aria-1.2/#aria-keyshortcuts)

## Related rules

- APP-23 [Build search-as-you-type fields as a combobox](https://agentwranglers.se/playbook/app-ui/forms/search-combobox.md) in Web app interface
- AXS-12 [Never take over single keys](https://agentwranglers.se/playbook/accessibility/keyboard-and-focus/character-key-shortcuts.md) in Accessibility

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/app-ui/layout-and-navigation/keyboard-shortcuts">Agent Wranglers web app interface playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Rearrange app screens for narrow windows](https://agentwranglers.se/playbook/app-ui/layout-and-navigation/narrow-layouts.md)
- Next: [Gather every setting on one settings page](https://agentwranglers.se/playbook/app-ui/layout-and-navigation/settings-page.md)
- [Layout and navigation](https://agentwranglers.se/playbook/app-ui/layout-and-navigation.md)
