Skip to content

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

Merged
Andrei Salavei (ASalavei) merged 3 commits into
JetBrains:jb-mainfrom
sajidalidev:tvos-remote-button-mappings
Feb 2, 2026
Merged

Add Siri remote button mappings in KeyEvent.uikit.kt#2717
Andrei Salavei (ASalavei) merged 3 commits into
JetBrains:jb-mainfrom
sajidalidev:tvos-remote-button-mappings

Conversation

@sajidalidev

@sajidalidev Sajid Ali (sajidalidev) commented Jan 23, 2026

Copy link
Copy Markdown

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
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

Sajid Ali (@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.

…/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 Andrei Salavei (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