Skip to content

Add Siri remote button mappings in KeyEvent.uikit.kt#2717

Merged
ASalavei merged 3 commits intoJetBrains:jb-mainfrom
sajidalidev:tvos-remote-button-mappings
Feb 2, 2026
Merged

Add Siri remote button mappings in KeyEvent.uikit.kt#2717
ASalavei merged 3 commits intoJetBrains:jb-mainfrom
sajidalidev:tvos-remote-button-mappings

Conversation

@sajidalidev
Copy link
Copy Markdown

@sajidalidev sajidalidev commented Jan 23, 2026

Add key mappings for tvOS Siri Remote buttons in UIPress.toComposeEvent().

This enables Compose applications to receive and handle button presses from the Siri Remote:

  • UIPressTypeSelect → Key.DirectionCenter
  • UIPressTypeMenu → Key.Menu
  • UIPressTypePlayPause → Key.MediaPlayPause

Fixes https://youtrack.jetbrains.com/issue/CMP-9712/Support-Siri-remote-controls

Testing

Tested with tvOS Siri Remote. Button presses are correctly converted to Compose key events and can be handled via Modifier.onKeyEvent().

Release Notes

Features - iOS

  • Add support for tvOS Siri Remote button events (Select, Menu, Play/Pause)

Google CLA

Already signed.

- UIPressTypeSelect → Key.DirectionCenter
- UIPressTypeMenu → Key.Back
- UIPressTypePlayPause → Key.MediaPlayPause
@MatkovIvan MatkovIvan requested a review from ASalavei January 26, 2026 10:15
Comment thread compose/ui/ui/src/iosMain/kotlin/androidx/compose/ui/input/key/KeyEvent.ios.kt Outdated
Comment thread compose/ui/ui/src/iosMain/kotlin/androidx/compose/ui/input/key/KeyEvent.ios.kt Outdated
@ASalavei
Copy link
Copy Markdown

@sajidalidev, thank you for contribution and sorry for the long review. Please fix the issue description according to the template: https://github.com/JetBrains/compose-multiplatform-core/blob/83ce70dcf10ea173f93a23bd96063f35c5d57e83/.github/PULL_REQUEST_TEMPLATE.md#L9-L8
And here is the issue for you: https://youtrack.jetbrains.com/issue/CMP-9712/Support-Siri-remote-controls
Feel free to use it in the "Fixes" section.

sajidalidev and others added 2 commits January 30, 2026 23:10
…/KeyEvent.ios.kt

Co-authored-by: Andrei Salavei <Andrei.Salavei@jetbrains.com>
…/KeyEvent.ios.kt

Co-authored-by: Andrei Salavei <Andrei.Salavei@jetbrains.com>
@ASalavei ASalavei self-requested a review February 2, 2026 13:12
@ASalavei ASalavei merged commit 5807278 into JetBrains:jb-main Feb 2, 2026
21 checks passed
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.

4 participants