diff options
Diffstat (limited to 'backends/keymapper/keymapper.cpp')
-rw-r--r-- | backends/keymapper/keymapper.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/backends/keymapper/keymapper.cpp b/backends/keymapper/keymapper.cpp index 1c83bb877e..cda34ff052 100644 --- a/backends/keymapper/keymapper.cpp +++ b/backends/keymapper/keymapper.cpp @@ -181,12 +181,24 @@ void Keymapper::popKeymap(const char *name) { } bool Keymapper::notifyEvent(const Common::Event &ev) { + bool mapped = false; + if (ev.type == Common::EVENT_KEYDOWN) - return mapKeyDown(ev.kbd); + mapped = mapKeyDown(ev.kbd); else if (ev.type == Common::EVENT_KEYUP) - return mapKeyUp(ev.kbd); + mapped = mapKeyUp(ev.kbd); + + if (mapped) + return true; else - return false; + return mapEvent(ev); +} + +bool Keymapper::mapEvent(const Common::Event &ev) { + // pass through - copy the event + Event evt = ev; + addEvent(evt); + return true; } bool Keymapper::mapKeyDown(const KeyState& key) { |