From 2912c598ae403e746596429435f673f6f930c276 Mon Sep 17 00:00:00 2001 From: Tony Xiao Date: Wed, 11 Oct 2023 12:51:38 -0700 Subject: [PATCH] Support both cmd+k and cmd+p --- packages/ui/command/command-components.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui/command/command-components.tsx b/packages/ui/command/command-components.tsx index 33264b16..2142f4d5 100644 --- a/packages/ui/command/command-components.tsx +++ b/packages/ui/command/command-components.tsx @@ -192,7 +192,7 @@ export function CommandBar(props: CommandComponentProps) { const [open, setOpen] = React.useState(false) React.useEffect(() => { const down = (e: KeyboardEvent) => { - if (e.key === 'p' && e.metaKey) { + if ((e.key === 'p' || e.key === 'k') && e.metaKey) { setOpen((open) => !open) e.preventDefault() }