Skip to content

Keyboard Arrow Navigation#180

Open
aelrased wants to merge 1 commit into
NuvioMedia:Devfrom
aelrased:keyboard-nav
Open

Keyboard Arrow Navigation#180
aelrased wants to merge 1 commit into
NuvioMedia:Devfrom
aelrased:keyboard-nav

Conversation

@aelrased

@aelrased aelrased commented Jun 29, 2026

Copy link
Copy Markdown

Summary

PR type

  • Reproducible bug fix
  • UI glitch/bug fix
  • Behavior bug/regression fix
  • Small maintenance only, with no UI or behavior change
  • Docs accuracy fix
  • Translation/localization only
  • Approved larger or directional change

Why

Desktop scope

Issue or approval

UI / behavior impact

  • No UI change
  • No behavior change
  • UI changed only to fix a documented glitch/bug
  • Behavior changed only to fix a documented bug/regression
  • UI change has explicit maintainer approval
  • Behavior change has explicit maintainer approval

Policy check

  • I have read and understood CONTRIBUTING.md.
  • This PR is small, focused, and limited to one problem.
  • This PR is scoped to the desktop app, desktop packaging, desktop documentation, or shared code required for desktop behavior.
  • This PR is not cosmetic-only.
  • Any UI change fixes a linked glitch/bug and includes visual proof, or this PR has no UI change.
  • Any behavior change fixes a linked bug/regression or has explicit approval, or this PR has no behavior change.
  • This PR does not bundle unrelated refactors, cleanups, formatting, or drive-by changes.
  • This PR does not add dependencies, architecture changes, migrations, or product-direction changes without explicit approval.
  • I listed the testing performed below.

UI polish, cosmetic-only changes, minor behavior tweaks, and unapproved product changes will be closed without review.

Scope boundaries

Testing

Screenshots / Video

Breaking changes

Linked issues

@aelrased

aelrased commented Jun 29, 2026

Copy link
Copy Markdown
Author

Summary — Keyboard Arrow Navigation

Problem

  • onPreviewKeyEvent does not work without a focused element in Compose Desktop
  • LazyRow/LazyColumn consume arrow key events before they reach the top level

Solution

Use AWT KeyEventDispatcher (same approach as installDesktopAppFullscreenShortcuts) to intercept arrow keys outside the Compose Focus system entirely.

New Files (5)

File Description
PlatformKeyboardNavigation.kt expect declaration
PlatformKeyboardNavigation.desktop.kt AWT KeyEventDispatcher → focusManager.moveFocus() + fallback FocusDirection.Next
PlatformKeyboardNavigation.android.kt no-op
PlatformKeyboardNavigation.ios.kt no-op
NuvioFocusable.kt Modifier.nuvioFocusBorder(shape) — draws a 3dp border using the theme's focusRing color around the element's actual shape

Modified Files (5)

File Change
App.kt Moved PlatformKeyboardNavigation() to App() root (works on all screens). Added nuvioFocusBorder to TabletTopPillItem and DesktopSidebarItem
NavigationBar.kt Added nuvioFocusBorder to all 3 NavItem overloads
ProfileSelectionScreen.kt Added nuvioFocusBorder to ProfileAvatarCard and AddProfileCard
ShelfComponents.kt Added nuvioFocusBorder to NuvioPosterCard
SettingsComponents.kt Added nuvioFocusBorder to SettingsSidebarItem, SettingsNavigationRow, SettingsSwitchRow

Focusable Elements

Bottom nav bar, desktop sidebar, tablet top pills, poster cards, profile avatar cards, add profile button, and settings items.

@aelrased aelrased changed the title Keyboard nav Keyboard Arrow Navigation Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant