# Keyboard Shortcuts

Super Productivity supports an extensive keyboard shortcut system. Shortcuts are grouped by function, and most are user-configurable via [[3.02-Settings-and-Preferences]].

## Functional Grouping

Configurable shortcuts fall into these categories:

- **Global (system-wide):** `globalShowHide`, `globalToggleTaskStart`, `globalAddNote`, `globalAddTask`. Available only in the Electron/desktop build.
- **Navigation:** `goToFocusMode`, `goToWorkView`, `goToScheduledView`, `goToTimeline`, `goToSettings`.
- **Task management:** `taskToggleDone`, `taskAddSubTask`, `taskSchedule`, `taskDelete`, `taskEditTitle`, move/select task actions, and others.
- **UI panels:** `toggleIssuePanel`, `toggleBacklog`, `toggleTaskViewCustomizerPanel`, `addNewTask`, `addNewProject`, `addNewNote`, `focusSideNav`, `openProjectNotes`, `showSearchBar`, `triggerSync`, zoom.

The project README (keyboard shortcuts section) lists a subset of the most commonly used defaults.

## Global Shortcuts

These work everywhere in the app.

- `Shift`+`A`: Open add task bar
- `Shift`+`P`: Open create project dialog
- `Alt`+`N`: Add new note
- `Shift+D`: Focus Sidenav
- `Shift+N`: Show/Hide Notes
- `C`: Toggle Filter/Group/Sort Panel
- `P`: Show/Hide Issue Panel
- `Shift`+`F`: Show search bar
- `B`: Show/Hide Task Backlog
- `W`: Go to Work View and focus first task
- `F`: Enter Focus Mode
- `Shift`+`T`: Go to Schedule
- `Shift`+`S`: Go to scheduled Tasks
- `<no default binding>`: Go to Settings
- `Ctrl`+`=`: Zoom in (Desktop/Firefox/Chrome)
- `Ctrl`+`-`: Zoom out (Desktop/Firefox/Chrome)
- `Ctrl`+`0` (zero): Zoom default (Desktop/Firefox/Chrome)
- `Ctrl`+`S`: Trigger sync (if configured)

### Tasks

The following shortcuts apply for the currently selected task (selected via tab or mouse).

- `<no default binding>`: Edit Title
- `I`: Show/Hide additional task info
- `N`: Open note/checklist in task panel
- `T`: Edit estimation / time spent
- `S`: Open schedule dialog for currently focused task
- `D`: Mark currently focused task as done
- `A`: Add subtask to currently focused task
- `L`: Attach file or link
- `Enter`: Edit currently focused task title
- `Backspace`: Delete currently focused task
- `E`: Open move task to project menu
- `Q`: Open task context menu
- `K`: Select previous Task
- `J`: Select next Task
- `Ctrl`+`Shift`+`ArrowUp`: Move currently focused task up in list
- `Ctrl`+`Shift`+`ArrowDown`: Move currently focused task down in list
- `Ctrl`+`Alt`+`ArrowUp`: Move currently focused task to the top
- `Ctrl`+`Alt`+`ArrowDown`: Move currently focused task down to the bottom
- `Shift`+`B`: Move Task to Task Backlog
- `Shift`+`T`: Move Task to Today's Task List
- `<no default binding>`: Expand Sub Tasks
- `<no default binding>`: Collapse Sub Tasks
- `Y`: Toggle tracking time to currently focused task

#### Unconfigurable

- `Arrow keys`: Navigate around task list
- `ArrowRight`: Open additional info panel for currently focused task

## Collapsible Groups

The following shortcuts apply when focus is on a collapsible group header (e.g., task groupings in Work View like Overdue, Today, Done, Recurring, etc.).

- `ArrowLeft`: Collapse the focused group
- `ArrowRight`: Expand the focused group
- `Shift`+`ArrowLeft`: Collapse all groups
- `Shift`+`ArrowRight`: Expand all groups
- `Enter` or `Space`: Toggle the focused group

These shortcuts are **unconfigurable** and always available on group headers.

## Platform-Specific Differences

**Electron/desktop only:**

- Global shortcuts (`globalShowHide`, `globalToggleTaskStart`, `globalAddNote`, `globalAddTask`) work system-wide when the app is running.
- Window zoom controls (`zoomIn`, `zoomOut`, `zoomDefault`) are desktop-only.

**Android:**

- Keyboard settings are not shown on Android; the keyboard configuration UI is hidden.

## Configurable Vs Reserved

All shortcuts listed in [[3.02-Settings-and-Preferences]] are user-configurable. Users can:

- Change any shortcut by clicking the input and pressing the desired key or combination; press **Enter** to save.
- Clear a shortcut by pressing **Escape** in the input field (sets it to no binding).
- Have the UI warn when two actions share the same shortcut.

Shortcuts are stored in global config (`GlobalConfigState.keyboard`) and persist to IndexedDB; they sync across devices if sync is enabled. No shortcuts are reserved; every one can be changed or disabled.

## Context-Dependent Behavior

**Task-level shortcuts:** Actions with a task focus (e.g. mark done, add subtask, schedule, delete, move) apply to the currently selected task. Selection is by keyboard (tab/arrows) or mouse. The [[3.02-Settings-and-Preferences]] keyboard help text describes these as applying to "the currently selected task."

**Schedule week view:** `Ctrl`+MouseWheel changes the vertical scale of the week schedule grid. The value is stored locally for future schedule visits.

**Focus Mode overlay:** `Escape` closes the overlay. If a focus session or break is running, it continues in the header focus button.

**Input filtering:** Application-level and task-level shortcuts are not handled when focus is in an input, textarea, or content-editable element, or when a blocking overlay (e.g. dialog) is open. This avoids shortcuts firing while typing.

## Conflict and Precedence

- **Input focus:** When focus is in an input element or a blocking overlay is open, shortcut handling is skipped so typing is not interrupted.
- **Conflicts:** The configuration UI warns if two actions are assigned the same key combination. The user can press **Escape** in the shortcut field to clear that assignment.

## Storage and Definition

**Where shortcuts are defined:**

- Config model: `KeyboardConfig` (keyboard-config.model.ts).
- Default mappings: `default-global-config.const.ts` (keyboard section).
- Settings form (which actions appear and their labels): `keyboard-form.const.ts`.

**Where they are stored and used:**

- Saved in `GlobalConfigState.keyboard`; persisted via the global config system to IndexedDB; synced when sync is enabled.
- Handled at runtime by `ShortcutService`; the key listener is registered in the app root (e.g. `AppComponent`).

## Notes

The shortcut system uses the Keyboard API layout map when available so that shortcuts behave correctly across keyboard layouts (e.g. QWERTY, QWERTZ, AZERTY, Dvorak). The user's layout is detected and used for matching key events to configured shortcuts.
