Files
multica/packages/views/editor
Jiayuan Zhang ab6da2e73b fix(views): navigate mention/slash pickers with Ctrl+N/J/P/K (MUL-5495) (#6135)
The command bar is built on cmdk, whose `vimBindings` option (on by
default) navigates the result list on Ctrl+N/Ctrl+J (down) and
Ctrl+P/Ctrl+K (up). The editor pickers accepted arrow keys only, so the
same muscle memory silently did nothing in the @mention and / menus.

Add `pickerNavigationDirection` next to the existing `isPickerAcceptKey`
policy in suggestion-popup.tsx and route both list components through it,
so every picker built on `createSuggestionPopupRender` navigates
identically instead of each one re-deciding what "move down" means.

The letter aliases require Ctrl alone: with another modifier the chord
belongs to the browser or OS (Ctrl+Shift+N opens an incognito window).
Cmd-based aliases are deliberately not added — cmdk never bound them
either, and Cmd+P/Cmd+N are browser accelerators the app does not own on
web, matching `isReservedShortcut` in @multica/core/shortcuts.

Co-authored-by: Lambda <lambda@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
2026-07-30 14:21:29 +08:00
..