From 9a90aff27329ea94482f85489d9806c2302a02a3 Mon Sep 17 00:00:00 2001 From: Andriy Semenets Date: Sat, 10 Mar 2018 16:42:45 +0200 Subject: [PATCH] Fix issue with non-English keyboard on Windows Full issue described in #17. --- QHotkey/qhotkey_win.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/QHotkey/qhotkey_win.cpp b/QHotkey/qhotkey_win.cpp index c7d25b4..6b458a5 100644 --- a/QHotkey/qhotkey_win.cpp +++ b/QHotkey/qhotkey_win.cpp @@ -202,8 +202,12 @@ quint32 QHotkeyPrivateWin::nativeKeycode(Qt::Key keycode, bool &ok) return VK_OEM_FJ_TOUROKU; default: - ok = false; - return 0; + if(keycode <= 0xFFFF) + return (byte)keycode; + else { + ok = false; + return 0; + } } }