gui: use Shortcut for ESC key instead of Keys handler

- Keys.onEscapePressed doesn't fire when child items have focus
- Shortcut element provides proper global key handling
- Added console.log debugging to track ESC activation and activeState
This commit is contained in:
Levi Neely 2026-08-01 12:04:27 +02:00
parent ef63dfd398
commit 5615f69d11
1 changed files with 10 additions and 4 deletions

View File

@ -59,10 +59,16 @@ ApplicationWindow {
palette.disabled.light: theme.lightColor palette.disabled.light: theme.lightColor
palette.disabled.shadow: theme.shadowColor palette.disabled.shadow: theme.shadowColor
Keys.onEscapePressed: { Shortcut {
if (ollie.activeState !== "idle") { sequence: "Escape"
event.accepted = true onActivated: {
ollie.interrupt() console.log("ESC shortcut, activeState:", ollie.activeState)
if (ollie.activeState !== "idle") {
console.log("ESC: calling interrupt()")
ollie.interrupt()
} else {
console.log("ESC: ignored (idle)")
}
} }
} }