diff options
Diffstat (limited to 'backends/platform')
-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; } |