Ticket #825 (closed enhancement: fixed)
Make Enter/Esc work when a dialog is open
| Reported by: | k776 | Owned by: | |
|---|---|---|---|
| Priority: | Nice to Have | Milestone: | Alpha 11 |
| Component: | UI & Simulation | Keywords: | |
| Cc: |
Description
Should be able to press enter when a dialog is opened.
e.g. if I select a unit, then hit "Delete" on the keyboard, I should be able to press enter to confirm it.
Likewise, if it doesn't work already, 'Escape' on the keyboard should trigger the 'cancel' action.
Change History
comment:5 Changed 13 months ago by MattDoerksen
I spent some time looking into this and based on the current implementation this isn't going to work (without some major hacks anyways). There just isn't any way to hook into the keyboard for escape/enter without it being handled by the main input function. If we get to that level, we'd have to make some hacks to check if something is open and accept/close it based on the key, which will become very ugly very fast.
TLDR; not possible with the current messagebox implementation.

If would be nice if the GUI engine had proper keyboard support (something like what #698 outlines)