Skip to content
OGE logoOGE

Command Palette

oge-command-palette is a modal search box over every action of an app — opened with Ctrl+K (⌘K on a Mac) or from code.

The query fuzzy-matches the labels — accent- and case-insensitive, prefixes and word starts first — plus each command's keywords and description; matches stay in their groups and the matched letters are highlighted. An empty query lists the recently run commands first. The search box is an APG combobox over a listbox, the dialog the shared modal shell: focus trap, scroll lock, Escape and a backdrop press to close, focus back where it was.

Ctrl+K fuzzy search combobox recent

Basics

Commands carry a label, an optional group, keywords, description, shortcut and icon; a disabled one is listed but never runs. Type “gtst” or “prefs” to see the fuzzy match. The default hotkey is Mod+K; this site already uses Ctrl+K for its search, so the demo listens for Ctrl+/ (⌘/).

commands hotkey commandExecute open()

Nothing run yet

Recent commands & keepOpen

[(recent)] is two-way — store it to keep the “Recent” section across visits. A handler that sets keepOpen leaves the palette open, for commands people repeat.

recent recentLimit keepOpen placeholder

Count: 0 · recent: none