My goal is for the
Esc key to work intuitively with my game's menu system such that pressing it dismisses the top-level window.
I have created a button shortcut keyed off the
ui_cancel action that is associated with
Esc. As anticipated, pressing the key triggers the button's
pressed signal and performs the function of closing the window.
The problem that I am encountering is that
SceneTree.SetInputAsHandled() is not called, so a single key press dismisses all open windows, not just the top-most one.
Is there a setting somewhere that I missed?