after a dialog popup the godot input system is lost on keypress. If I had a key held at it keeps moving in the key direction #153

Closed
opened 2026-08-29 12:05:32 +00:00 by metaheavens · 1 comment
Owner
No description provided.
Author
Owner

Done in b721760. Diagnosed, and it is a consequence of #128.

Nothing was lost. A dialog stops the tree, a paused node receives no input, and the controller is paused with everything else - so a key released while the line was up never reached _handle_key. keys_down kept it, and the fleet flew on in that direction the moment the game restarted.

NOTIFICATION_UNPAUSED is delivered whatever a node's process mode is, which makes it the one moment the question can be asked, and the physical keyboard is the authority on what is actually held down - keys_down is only a record of what we were told, and it is the record that went stale. So on resume, anything the keyboard says is no longer held is dropped.

That fixes anything which stops the tree, not only dialogs, and the test checks it that way: it holds a key, opens a dialog, never delivers the release, and asserts the fleet has stopped once the dialog closes - then does it again by pausing and unpausing the tree directly.

Done in `b721760`. Diagnosed, and it is a consequence of #128. Nothing was lost. A dialog stops the tree, a **paused node receives no input**, and the controller is paused with everything else - so a key *released* while the line was up never reached `_handle_key`. `keys_down` kept it, and the fleet flew on in that direction the moment the game restarted. `NOTIFICATION_UNPAUSED` is delivered whatever a node's process mode is, which makes it the one moment the question can be asked, and the physical keyboard is the authority on what is actually held down - `keys_down` is only a record of what we were *told*, and it is the record that went stale. So on resume, anything the keyboard says is no longer held is dropped. That fixes anything which stops the tree, not only dialogs, and the test checks it that way: it holds a key, opens a dialog, never delivers the release, and asserts the fleet has stopped once the dialog closes - then does it again by pausing and unpausing the tree directly.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
metaheavens/spaceship#153
No description provided.