Refine TV player remote control key mappings

Update directional key behavior to separate seeking, showing controls, and
toggling playback. Left/Right now seek without showing controls, while
Up/Down now only show controls instead of toggling playback.
This commit is contained in:
2026-04-07 18:51:25 +02:00
parent 8a6c745332
commit bcbad6f262

View File

@@ -155,15 +155,16 @@ fun TvPlayerScreen(
when (event.key) { when (event.key) {
Key.DirectionLeft -> { Key.DirectionLeft -> {
viewModel.seekBy(-10_000) viewModel.seekBy(-10_000)
viewModel.showControls()
true true
} }
Key.DirectionRight -> { Key.DirectionRight -> {
viewModel.seekBy(10_000) viewModel.seekBy(10_000)
true
}
Key.DirectionUp, Key.DirectionDown -> {
viewModel.showControls() viewModel.showControls()
true true
} }
Key.DirectionUp, Key.DirectionDown,
Key.DirectionCenter, Key.Enter -> { Key.DirectionCenter, Key.Enter -> {
viewModel.togglePlayPause() viewModel.togglePlayPause()
viewModel.showControls() viewModel.showControls()