Command palette on web and desktop: ⌘1–⌘9 to open results, like on iPad #16488
gabrielrojasc
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
On iPad,
Cmd+1throughCmd+9open the first nine results in the command palette. On web and desktop they don't. When I search threads withmod+k, I have to use the arrow keys or the mouse to open a result, and pressing⌘1does nothing.The user docs describe the iPad behavior for every platform.
docs/user/keyboard-focus.mdsays: "While the palette or model picker is open, number shortcuts select its entries instead of switching threads."docs/user/keybindings.md(iPad) says: "Use the arrow keys and Return to choose a result, orCmd+1throughCmd+9to choose directly." On web and desktop, number shortcuts only work in the "New thread in..." project picker.Proposal
Match the iPad palette on web and desktop. The first nine visible results get
⌘1–⌘9hints in display order, assigned after filtering. Pressing the key opens that result. With an empty query, the visible list is numbered the same way.Code pointers (main @ 9bd1d80)
apps/mobile/src/features/keyboard/CommandPalette.tsx:123shows⌘{index + 1}for the first nine filtered results, and:407runsresults[threadJumpIndex(command)].enumerateCommandPaletteItems(apps/web/src/components/CommandPalette.logic.ts:234) assignsthread.jump.Nonly to the project picker. The other groups, includingthreads-search(:486) and "Recent Threads" (:605), carry noshortcutCommand.handleKeyDown(apps/web/src/components/CommandPalette.tsx:3046) already callspreventDefaultonthread.jump.Nand looks up the result among the displayed items. Assigning shortcuts to the displayed results after filtering is enough.Related
thread.jump.Nafter filtering through anenumerateShortcutsgroup flag. This proposal would extend that to the root palette.Would you approve this direction and scope for a focused PR?
All reactions