Skip to content

Commit

Permalink
Support both cmd+k and cmd+p
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyxiao committed Oct 11, 2023
1 parent 2157fc6 commit 2912c59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ui/command/command-components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit 2912c59

Please sign in to comment.