diff options
-rw-r--r-- | src/gui/kernel/qkeymapper_win.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/kernel/qkeymapper_win.cpp b/src/gui/kernel/qkeymapper_win.cpp index 159c47dd1e..b88186e867 100644 --- a/src/gui/kernel/qkeymapper_win.cpp +++ b/src/gui/kernel/qkeymapper_win.cpp @@ -803,8 +803,11 @@ bool QKeyMapperPrivate::translateKeyEvent(QWidget *widget, const MSG &msg, bool bool k0 = false; bool k1 = false; int msgType = msg.message; - // Add this key to the keymap if it is not present yet. - updateKeyMap(msg); + // WM_CHAR messages already contain the character in question so there is + // no need to fiddle with our key map. In any other case add this key to the + // keymap if it is not present yet. + if (msg.message != WM_CHAR) + updateKeyMap(msg); const quint32 scancode = (msg.lParam >> 16) & scancodeBitmask; const quint32 vk_key = msg.wParam; |