import { commandIds } from "@commands/ids"; import type { Dispatch } from "@commands/dispatcher"; import type { KeybindEvent } from "./keyboard"; export function handleCommandPaletteKey(options: { event: KeybindEvent; dispatch: Dispatch }): boolean { if (options.event.altKey || options.event.shiftKey) return false; const modifier = options.event.metaKey || options.event.ctrlKey; if (!modifier || options.event.key.toLowerCase() !== "k") return false; options.dispatch(commandIds.commandPaletteOpen, undefined); return true; }