Keyboard Shortcuts

Consistent keyboard shortcuts and context-menu patterns across the Sitka product suite — mac-first, with Windows equivalents documented.

Chord Anatomy

KCommand paletteZUndoZRedoSSavePQuick actions/Toggle sidebar

Global Shortcuts

Every Sitka product must support these chords. Implement them at the application level so they work regardless of which panel or element has focus.

ShortcutScopeAction
⌘KGlobalOpen command palette
⌘/GlobalToggle sidebar
⌘⇧PGlobalQuick actions menu
⌘,GlobalOpen Preferences
⌘WGlobalClose current panel
⌘ZEditingUndo last action
⌘⇧ZEditingRedo
⌘SEditingSave / commit changes
⌘ASelectionSelect all
⌘⇧ASelectionDeselect all
ListOpen / confirm focused item
⌘↵ListOpen in new tab / secondary view
ListDelete focused item
↑ / ↓ListMove focus through list
EscGlobalDismiss overlay / cancel

Modifier Key Reference

Symbols used throughout this documentation and in the UI. Always display modifiers in order: Ctrl → Alt → Shift → Cmd → Key.

SymbolNameWindowsNotes
Command (Cmd)CtrlPrimary modifier for most actions
Option (Alt)AltAlternate or secondary action
Control (Ctrl)System-level; use sparingly in apps
ShiftShiftExtends or inverts the action
Delete (Backspace)DelDestructive — confirm before acting
Return / EnterEnterConfirm or open primary action
EscEscapeEscCancel, dismiss, or go back

Context Menus

Context menus surface actions relevant to the focused element without consuming toolbar space. They are triggered by right-click on desktop and long-press on touch.

Right-click targetOpenOpen in Tab⌘↵Cut⌘XCopy⌘CPaste⌘VMove to Trash⌘⌫TARGET ELEMENTCONTEXT MENU
RuleDetail
Triggered byRight-click (mouse), long-press (touch ≥ 500ms), or ⌘⌥Space / platform equivalent (keyboard).
ScopeItems must be contextually relevant to the focused or hovered element. Don't include global actions.
OrderOpen / primary action first. Destructive actions last, separated by a divider.
ShortcutsShow the keyboard shortcut for every action that has one. Right-align in monospace.
SubmenusMax one level of nesting. If you need two levels, promote the submenu to a dedicated panel.
DismissalCloses on: item selection, click-outside, Esc, window blur, scroll > 8px.
WidthMin 160px, max 280px. Never wider than the viewport; clamp and scroll if items overflow.

Displaying Shortcuts in the UI

Use the <kbd> element for keyboard shortcut labels. The design system provides a .kbd utility class that renders the correct font, size, border, and background for both light and dark themes.

ContextPlacementFormat
TooltipAfter label⌘K in a <kbd> element
Menu itemRight-aligned⌘Z right-aligned in monospace
Empty stateInline with text"Press ⌘K to start"
OnboardingCallout cardLarge key cap illustration + action
Settings pageEditable fieldRecord + display the full chord

Accessibility

  • Every keyboard shortcut must have a menu or button equivalent — shortcuts are enhancements, not the only path.
  • Announce shortcut hints to screen readers by placing them inside a visually-hidden <span aria-hidden="false"> after the label.
  • Never override browser or OS system shortcuts (⌘T, ⌘N, ⌘Q, F5, etc.). Map conflicts to less common chords.
  • Allow users to discover shortcuts via a searchable shortcut reference accessible from the ⌘K palette.
  • Respect prefers-reduced-motion — do not tie shortcuts to animated transitions that cannot be disabled.
  • Context menus triggered by keyboard must set focus to the first item and trap focus within the menu. Esc returns focus to the trigger.