GSoC: GUI: Text input + Right Alt (bug #2978736)
|Reported by:||Pidgeot||Owned by:||lordhoto|
Patch for bug 2978736. For reference, this is from my comment on that bug:
The problem is that in backends/platform/sdl/events.cpp, the key up event is explicitly swallowed when both Ctrl and Alt is held down - and since Ctrl+Alt is equivalent to AltGr, the event manager never realizes the character key has been released. This is, presumably, done because we didn't expect to ever have sent a down event - Ctrl+Alt is used for scaler hotkeys, and the event is handled in the backend.
I see two ways of fixing this: either pass on the up key event if we're not releasing one of the keys bound to a hotkey, or never send key down events when both Ctrl and Alt is held down.
The problem with never sending the key down event is that at least some games (such as LSL1SCI) can use a CTRL+ALT+<something> input - I can't think of any where it's *required* to play the game, but we would have to either provide a workaround (holding down a different set of modifier keys) or ignore that part - and it seems a little silly to require a workaround if it isn't really required.
In my opinion, it would be best to take the second option - look at the key being released and determine if it's a scaler hotkey.
I noticed that the GP2X backend also provides the handleScalerHotkey method, but it doesn't appear to get called anywhere - so I haven't attempted to do anything to that. I've only fixed the SDL backend.
Ticket imported from: #2980597. Ticket imported from: patches/1258.
Change History (8)
comment:1 by , 14 years ago
|Summary:||GUI: Text input + Right Alt (bug #2978736) → GSoC: GUI: Text input + Right Alt (bug #2978736)|