aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/events/webossdl/webossdl-events.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/backends/events/webossdl/webossdl-events.cpp b/backends/events/webossdl/webossdl-events.cpp
index 24aa5f0abd..0e92e069b6 100644
--- a/backends/events/webossdl/webossdl-events.cpp
+++ b/backends/events/webossdl/webossdl-events.cpp
@@ -95,6 +95,8 @@ void WebOSSdlEventSource::SDLModToOSystemKeyFlags(SDLMod mod,
event.kbd.flags |= Common::KBD_SHIFT;
if (mod & KMOD_CTRL)
event.kbd.flags |= Common::KBD_CTRL;
+
+ // Holding down the gesture area emulates the ALT key
if (gestureDown)
event.kbd.flags |= Common::KBD_ALT;
}
@@ -115,6 +117,14 @@ bool WebOSSdlEventSource::handleKeyDown(SDL_Event &ev, Common::Event &event) {
return true;
}
+ // Ensure that ALT key (Gesture down) is ignored when back or forward
+ // gesture is detected. This is needed for WebOS 1 which releases the
+ // gesture tap AFTER the backward gesture event and not BEFORE (Like
+ // WebOS 2).
+ if (ev.key.keysym.sym == 27 || ev.key.keysym.sym == 229) {
+ gestureDown = false;
+ }
+
// Call original SDL key handler.
return SdlEventSource::handleKeyDown(ev, event);
}