From 4ebbdaa59ba446d1ad69be083dad73b54691920a Mon Sep 17 00:00:00 2001 From: D G Turner Date: Tue, 29 Apr 2014 00:22:54 +0100 Subject: LINUXMOTO: Use virtual keyboard event directly, rather than using keycode. As the virtual keyboard trigger has been moved to CTRL-F7, the previous code which generates a unmodified F7 event to do this will not work. Rather than just adding the CTRL modifier, this code changes the backend to directly generate the virtual keyboard trigger event directly. This avoids any future breakage if the key combination is changed again. --- backends/events/linuxmotosdl/linuxmotosdl-events.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'backends/events') diff --git a/backends/events/linuxmotosdl/linuxmotosdl-events.cpp b/backends/events/linuxmotosdl/linuxmotosdl-events.cpp index ce34662612..b0d443ff9f 100644 --- a/backends/events/linuxmotosdl/linuxmotosdl-events.cpp +++ b/backends/events/linuxmotosdl/linuxmotosdl-events.cpp @@ -73,7 +73,10 @@ bool LinuxmotoSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) { } // VirtualKeyboard - Camera key else if (ev.key.keysym.sym == SDLK_PAUSE) { - ev.key.keysym.sym = SDLK_F7; +#ifdef ENABLE_VKEYBD + event.type = Common::EVENT_VIRTUAL_KEYBOARD; + return true; +#endif } // Enter - mod+fire key else if (ev.key.keysym.sym == SDLK_b) { @@ -117,7 +120,10 @@ bool LinuxmotoSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) { } // VirtualKeyboard - Right Soft key else if (ev.key.keysym.sym == SDLK_F11) { - ev.key.keysym.sym = SDLK_F7; +#ifdef ENABLE_VKEYBD + event.type = Common::EVENT_VIRTUAL_KEYBOARD; + return true; +#endif } #endif -- cgit v1.2.3