aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorTarek Soliman2011-07-05 13:21:53 -0500
committerTarek Soliman2011-09-22 22:07:44 -0500
commitbafaeef24afa600940d3ffb422a10952bee57fff (patch)
tree9d55a5b810cc9929fa756c69019ac5b3574a9930 /backends
parentdf649e08f8977f1893f18d7693160be1d7bf2998 (diff)
downloadscummvm-rg350-bafaeef24afa600940d3ffb422a10952bee57fff.tar.gz
scummvm-rg350-bafaeef24afa600940d3ffb422a10952bee57fff.tar.bz2
scummvm-rg350-bafaeef24afa600940d3ffb422a10952bee57fff.zip
MAEMO: initial keymapper that keymaps menu button
Diffstat (limited to 'backends')
-rw-r--r--backends/events/maemosdl/maemosdl-events.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/backends/events/maemosdl/maemosdl-events.cpp b/backends/events/maemosdl/maemosdl-events.cpp
index abc653ad6a..994782746c 100644
--- a/backends/events/maemosdl/maemosdl-events.cpp
+++ b/backends/events/maemosdl/maemosdl-events.cpp
@@ -28,7 +28,29 @@
bool MaemoSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
- //FIXME: Implement this
+ // List of special N810 keys:
+ // SDLK_F4 -> menu
+ // SDLK_F5 -> home
+ // SDLK_F6 -> fullscreen
+ // SDLK_F7 -> zoom +
+ // SDLK_F8 -> zoom -
+
+ switch (ev.type) {
+ case SDL_KEYDOWN:{
+ if (ev.key.keysym.sym == SDLK_F4) {
+ event.type = Common::EVENT_MAINMENU;
+ return true;
+ }
+ break;
+ }
+ case SDL_KEYUP: {
+ if (ev.key.keysym.sym == SDLK_F4) {
+ event.type = Common::EVENT_MAINMENU;
+ return true;
+ }
+ break;
+ }
+ }
// Invoke parent implementation of this method
return SdlEventSource::remapKey(ev, event);