Ticket #825 (closed enhancement: fixed)

Opened 2 years ago

Last modified 9 months ago

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:1 Changed 2 years ago by historic_bruno

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

comment:2 Changed 23 months ago by k776

  • Milestone changed from Alpha 6 to Alpha 7

comment:3 Changed 23 months ago by k776

  • Priority changed from Should Have to Nice to Have

comment:4 Changed 23 months ago by k776

  • Milestone changed from Alpha 7 to Backlog

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.

comment:6 Changed 9 months ago by leper

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from Backlog to Alpha 11

This was implemented in r12503/#1319.

Note: See TracTickets for help on using tickets.