From f0debda3c1726d48d1b30debc651c71e33ce062e Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Fri, 22 Feb 2019 16:40:03 +0200 Subject: [PATCH] win32_guikey handling update. --- inputdevice.cpp | 6 ++++-- od-win32/keyboard_win32.cpp | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/inputdevice.cpp b/inputdevice.cpp index 9bfec3fe..399af4c8 100644 --- a/inputdevice.cpp +++ b/inputdevice.cpp @@ -4688,8 +4688,10 @@ static int handle_input_event2(int nr, int state, int max, int flags, int extra) #ifdef _WIN32 // ignore normal GUI event if forced gui key is in use - if (currprefs.win32_guikey >= 0 && nr == INPUTEVENT_SPC_ENTERGUI) - return 0; + if (nr == INPUTEVENT_SPC_ENTERGUI) { + if (currprefs.win32_guikey > 0) + return 0; + } #endif ie = &events[nr]; diff --git a/od-win32/keyboard_win32.cpp b/od-win32/keyboard_win32.cpp index bbb3c39b..627bd4a6 100644 --- a/od-win32/keyboard_win32.cpp +++ b/od-win32/keyboard_win32.cpp @@ -453,7 +453,7 @@ bool my_kbd_handler (int keyboard, int scancode, int newstate, bool alwaysreleas if (currprefs.win32_guikey >= 0x100) { if (scancode_new == DIK_F12) return true; - } else if (currprefs.win32_guikey >= 0) { + } else if (currprefs.win32_guikey > 0) { if (scancode_new == defaultguikey && currprefs.win32_guikey != scancode_new) { scancode = 0; if (specialpressed () && ctrlpressed() && shiftpressed() && altpressed ()) @@ -462,7 +462,7 @@ bool my_kbd_handler (int keyboard, int scancode, int newstate, bool alwaysreleas inputdevice_add_inputcode (AKS_ENTERGUI, 1, NULL); scancode = 0; } - } else if (!specialpressed () && !ctrlpressed() && !shiftpressed() && !altpressed () && scancode_new == defaultguikey) { + } else if (currprefs.win32_guikey != 0 && !specialpressed () && !ctrlpressed() && !shiftpressed() && !altpressed () && scancode_new == defaultguikey) { inputdevice_add_inputcode (AKS_ENTERGUI, 1, NULL); scancode = 0; } -- 2.47.3