aboutsummaryrefslogtreecommitdiff
path: root/backends/events/maemosdl
diff options
context:
space:
mode:
authorTarek Soliman2011-08-28 19:39:18 -0500
committerTarek Soliman2011-09-22 22:07:45 -0500
commit9aad73be5ef35065b8a9b63958b39184083e0700 (patch)
tree27800535a7d0c842e46b85db1754f8b3198362e1 /backends/events/maemosdl
parentac207183635c1d8cc91c0c94de5f2900ad01a28c (diff)
downloadscummvm-rg350-9aad73be5ef35065b8a9b63958b39184083e0700.tar.gz
scummvm-rg350-9aad73be5ef35065b8a9b63958b39184083e0700.tar.bz2
scummvm-rg350-9aad73be5ef35065b8a9b63958b39184083e0700.zip
MAEMO: enable virtual keyboard and add keymapping
Diffstat (limited to 'backends/events/maemosdl')
-rw-r--r--backends/events/maemosdl/maemosdl-events.cpp28
1 files changed, 22 insertions, 6 deletions
diff --git a/backends/events/maemosdl/maemosdl-events.cpp b/backends/events/maemosdl/maemosdl-events.cpp
index 6a62f53950..e111bf574b 100644
--- a/backends/events/maemosdl/maemosdl-events.cpp
+++ b/backends/events/maemosdl/maemosdl-events.cpp
@@ -52,8 +52,16 @@ bool MaemoSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
processMouseEvent(event, _km.x, _km.y);
return true;
} else if (ev.key.keysym.sym == SDLK_F8) {
- // handled in keyup
- return true;
+ if (ev.key.keysym.mod & KMOD_CTRL) {
+ event.type = Common::EVENT_KEYDOWN;
+ event.kbd.keycode = Common::KEYCODE_F7;
+ event.kbd.ascii = Common::ASCII_F7;
+ event.kbd.flags = 0;
+ return true;
+ } else {
+ // handled in keyup
+ return true;
+ }
}
break;
}
@@ -72,10 +80,18 @@ bool MaemoSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
processMouseEvent(event, _km.x, _km.y);
return true;
} else if (ev.key.keysym.sym == SDLK_F8) {
- _clickEnabled = !_clickEnabled;
- ((SurfaceSdlGraphicsManager*) _graphicsManager)->displayMessageOnOSD(
- _clickEnabled ? _("Clicking Enabled") : _("Clicking Disabled"));
- return true;
+ if (ev.key.keysym.mod & KMOD_CTRL) {
+ event.type = Common::EVENT_KEYUP;
+ event.kbd.keycode = Common::KEYCODE_F7;
+ event.kbd.ascii = Common::ASCII_F7;
+ event.kbd.flags = 0;
+ return true;
+ } else {
+ _clickEnabled = !_clickEnabled;
+ ((SurfaceSdlGraphicsManager*) _graphicsManager)->displayMessageOnOSD(
+ _clickEnabled ? _("Clicking Enabled") : _("Clicking Disabled"));
+ return true;
+ }
}
break;
}