Route system Back through the current navigation owner
All checks were successful
review/code-claude Code APPROVE: single Back owner, tests fail before and pass after
review/design-claude Design PASS: no visual change

This commit is contained in:
justinzeus 2026-11-07 22:30:20 +01:00
parent b51dced5fe
commit a268cdd7b8
27 changed files with 196 additions and 77 deletions

View file

@ -32,14 +32,14 @@ import androidx.tv.material3.Text
import org.justinvisser.wolfskin.design.WolfskinTokens.Color as C
import org.justinvisser.wolfskin.design.WolfskinTokens.Layout as L
/** Screens and the shell interpret the same Android directional and activation keys. */
/** Native Back belongs to the Activity dispatcher; Escape remains the local Back shortcut. */
fun readShellKey(event: KeyEvent): ShellKey? = when (event.key) {
Key.DirectionUp -> ShellKey.Up
Key.DirectionDown -> ShellKey.Down
Key.DirectionLeft -> ShellKey.Left
Key.DirectionRight -> ShellKey.Right
Key.DirectionCenter, Key.Enter, Key.NumPadEnter -> ShellKey.Ok
Key.Back, Key.Escape -> ShellKey.Back
Key.Escape -> ShellKey.Back
else -> null
}