Repository navigation
[combobox][menu][select] Support Ctrl+N/Ctrl+P navigation on Apple platforms - #6316
Open
michaldudak wants to merge 3 commits into
Open
michaldudak wants to merge 3 commits into
michaldudak wants to merge 3 commits into
Conversation
michaldudak
requested review from
aarongarciah,
atomiks,
colmtuite,
flaviendelangle and
jjenzz
as code owners
November 20, 2026 12:00
Bundle size
PerformanceNo regressions in 36 benchmarks · ran 3m 57s · details Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
michaldudak
force-pushed
the
claude/ctrl-np-apple-navigation-3ebe22
branch
from
November 23, 2026 07:42
1043de0 to
410a0c5
Compare
commit: |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5146
On macOS and iOS, Ctrl+N and Ctrl+P move down and up a line in native text fields, menus and pop-up buttons. This makes them work as ↓ and ↑ in every list-navigation component: Combobox, Autocomplete, Select, Menu (including filterable menus), Context Menu and Menubar. On Windows and Linux the shortcuts clash with system and browser bindings, so they stay untouched there.
This replaces the reverted
highlightItem()imperative action (#5586, reverted in #5910) with built-in, platform-native behavior. There is no new public API.Behavior
loopFocusand grid rows, and reportsreason: 'keyboard'toonItemHighlighted.platform.os.apple(macOS and iOS/iPadOS).event.key, so Dvorak users press the key labelled N. Layouts without Latin letters fall back toevent.code.event.preventBaseUIHandler()in their ownonKeyDown.Implementation
getNavigationKey(event)inutils/popups/event.tsreturnsArrowDown/ArrowUpfor the shortcut andevent.keyotherwise.useListNavigationcomputes the key once per keydown and uses it wherever it readevent.key, includingkeyRef, which decides whether opening lands on the first or last item.getGridNavigatedIndextakes an optionalkey(defaulting toevent.key, so its other callers are unchanged), and the injectedgridNavigationpasses it through.ComboboxTriggerandComboboxChipuse the helper for their own open-on-arrow handling.getMenuFilterKeyAction) resolves the key through the helper before treating modified keys as text editing, so the shortcut navigates instead of editing. The trigger relays it to the input like the vertical arrows.Docs
One sentence in the "Keyboard navigation" section of the Accessibility page. The component pages have no keyboard section to put it in.