MAEMO: Define platform global keymap

This commit is contained in:
Tarek Soliman 2012-02-09 01:26:34 -06:00
parent 705761011d
commit 8c245af35c
3 changed files with 29 additions and 0 deletions

View file

@ -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

View file

@ -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; }

View file

@ -64,6 +64,7 @@ backends/keymapper/remap-dialog.cpp
backends/midi/windows.cpp
backends/platform/ds/arm9/source/dsoptions.cpp
backends/platform/iphone/osys_events.cpp
backends/platform/maemo/maemo.cpp
backends/platform/sdl/macosx/appmenu_osx.mm
backends/graphics/surfacesdl/surfacesdl-graphics.cpp
backends/graphics/opengl/opengl-graphics.cpp