Skip to content

feat(player): keyboard shortcuts for tablets with a keyboard - #1409

Merged
A-EDev merged 7 commits into
mainfrom
feat/player-keyboard-shortcuts
Oct 22, 2026
Merged

A-EDev merged 7 commits into
mainfrom
feat/player-keyboard-shortcuts

Conversation

@A-EDev

@A-EDev A-EDev commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Keyboard shortcuts for tablets and phones with a physical keyboard, matching Flow Desktop: Space or K play and pause, Left/Right or J/L seek by the double-tap seek setting, Up/Down change the volume, F toggles fullscreen and Esc leaves it, C toggles captions, Shift+N and Shift+P go to the next and previous video, Shift+. and Shift+, step the speed through the presets, and 0 to 9 jump to 0 to 90 %.
  • Works in the expanded video player (including fullscreen), the open music player, and Shorts, where Up/Down page between Shorts.
  • Shortcuts act only while a hardware keyboard is attached and the player is open. They pause while a player sheet with a text field is open (transcript, sleep timer) and while the player is locked. A focused button or text field keeps its own keys.
  • The keys are listed under Flow > Player in the system shortcut list (Meta + /).
  • One shared Modifier.mediaKeyboardShortcuts with a pure key mapper, following the TV player's focus-target pattern. The volume key handling moved from MainActivity into PlayerHardwareController so the arrow keys share it.

Related issue

Closes #1401

Change type

  • Bug fix
  • Feature
  • Refactor or maintenance
  • Build, packaging, or CI
  • Documentation

Validation

  • ./gradlew :app:assembleGithubDebug
  • ./gradlew :app:testGithubDebugUnitTest: 4371 tests, 0 failed
  • I ran any additional flavor-specific build or test tasks affected by this change: ./gradlew :app:compileFossDebugKotlin, ./gradlew ktlintCheck, python3 .github/scripts/nightly_notes.py --check
  • I manually tested the affected behavior on an Android device or emulator.

Test device and Android version: Android emulator with a hardware keyboard (Resizable_Experimental, API 37). Every key in the expanded video player, fullscreen, the music player and Shorts; the mini players ignore keys; the sleep timer sheet pauses the shortcuts and they return when it closes; the Meta + / list shows the Player group.

Screenshots or recordings

Risk and compatibility

  • No preference, database, permission, network or background work changes. Nothing runs per frame: the shortcuts are key events only.

  • Without a hardware keyboard nothing changes. The player takes key focus only while a keyboard is attached, through a bare focus target that adds nothing for TalkBack.

  • The change does not introduce secrets, private data, or unexpected telemetry.

  • New user-facing text uses Android string resources.

  • Dependency and lockfile changes are intentional and limited to this PR.

  • Room schema changes include the required version bump and migration, or this PR does not change the Room schema.

  • Breaking changes and upgrade steps are clearly documented.

Copilot AI balanced review requested due to automatic review settings October 22, 2026 16:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@github-actions github-actions Bot added documentation Improvements or additions to documentation player Video and audio playback ui Compose UI, theming, or Material 3 surfaces labels Oct 22, 2026
@A-EDev
A-EDev merged commit cd63b60 into main Oct 22, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation player Video and audio playback ui Compose UI, theming, or Material 3 surfaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Support desktop-style keyboard shortcuts/controls on tablets

2 participants