ui/client/features/command-palette/domain/PaletteKeys
Pure (DOMAIN-001): keyboard rules of the palette.
Cockpit client (features), next. Source: ui/client/features/command-palette/domain/PaletteKeys.ts.
Functions#
isPaletteShortcut()#
isPaletteShortcut(
e):boolean
Defined in: ui/client/features/command-palette/domain/PaletteKeys.ts:15
Ctrl+K (Cmd+K on macOS) toggles the palette. Shift/Alt variants are left to the browser/editor.
Parameters#
e
Returns#
boolean
isQuickOpenShortcut()#
isQuickOpenShortcut(
e):boolean
Defined in: ui/client/features/command-palette/domain/PaletteKeys.ts:21
Ctrl+P (Cmd+P on macOS), the quick-open shortcut: opens the same palette, browsers' print dialog is pre-empted by the capture-phase preventDefault in subscribePaletteShortcut.
Parameters#
e
Returns#
boolean
moveActive()#
moveActive(
current,count,key):number
Defined in: ui/client/features/command-palette/domain/PaletteKeys.ts:5
Next active index for ArrowUp/ArrowDown/Home/End, wrapping. Returns the current one for other keys.
Parameters#
current
number
count
number
key
string
Returns#
number