diff options
author | Tarek Soliman | 2012-02-09 01:26:34 -0600 |
---|---|---|
committer | Tarek Soliman | 2012-02-12 13:28:13 -0600 |
commit | 8c245af35cc2ac3666b631be12e1f130bfbad503 (patch) | |
tree | e1088ef87f0900ed9507b82c10000416bf27f978 /backends/platform/maemo | |
parent | 705761011d24f08eb56add90f6dfa605b36ac8ee (diff) | |
download | scummvm-rg350-8c245af35cc2ac3666b631be12e1f130bfbad503.tar.gz scummvm-rg350-8c245af35cc2ac3666b631be12e1f130bfbad503.tar.bz2 scummvm-rg350-8c245af35cc2ac3666b631be12e1f130bfbad503.zip |
MAEMO: Define platform global keymap
Diffstat (limited to 'backends/platform/maemo')
-rw-r--r-- | backends/platform/maemo/maemo.cpp | 27 | ||||
-rw-r--r-- | backends/platform/maemo/maemo.h | 1 |
2 files changed, 28 insertions, 0 deletions
diff --git a/backends/platform/maemo/maemo.cpp b/backends/platform/maemo/maemo.cpp index 24f5d38e5e..eae18cc4fd 100644 --- a/backends/platform/maemo/maemo.cpp +++ b/backends/platform/maemo/maemo.cpp @@ -31,7 +31,9 @@ #include "backends/platform/maemo/maemo-keys.h" #include "backends/events/maemosdl/maemosdl-events.h" #include "backends/graphics/maemosdl/maemosdl-graphics.h" +#include "backends/keymapper/keymapper.h" #include "common/textconsole.h" +#include "common/translation.h" #include <SDL/SDL_syswm.h> @@ -127,6 +129,31 @@ Common::HardwareKeySet *OSystem_SDL_Maemo::getHardwareKeySet() { #endif } +Common::Keymap *OSystem_SDL_Maemo::getGlobalKeymap() { +#ifdef ENABLE_KEYMAPPER + using namespace Common; + Keymap *globalMap = new Keymap("maemo"); + + Action *act; + +// act = new Action(globalMap, "CLKM", _("Click Mode"), kKeyRemapActionType); +// act->addCustomEvent(CLICK_MODE); + + act = new Action(globalMap, "LCLK", _("Left Click"), kKeyRemapActionType); + act->addLeftClickEvent(); + + act = new Action(globalMap, "MCLK", _("Middle Click"), kKeyRemapActionType); + act->addMiddleClickEvent(); + + act = new Action(globalMap, "RCLK", _("Right Click"), kKeyRemapActionType); + act->addRightClickEvent(); + + return globalMap; +#else + return OSystem_POSIX::getGlobalKeymap(); +#endif +} + } //namespace Maemo diff --git a/backends/platform/maemo/maemo.h b/backends/platform/maemo/maemo.h index 44b84cd9b5..e94c6c603b 100644 --- a/backends/platform/maemo/maemo.h +++ b/backends/platform/maemo/maemo.h @@ -40,6 +40,7 @@ public: virtual void setWindowCaption(const char *caption); virtual void setupIcon(); virtual Common::HardwareKeySet *getHardwareKeySet(); + virtual Common::Keymap *getGlobalKeymap(); Model getModel() { return _model; } |