summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qkeymapper_win.cpp
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2009-10-07 13:52:59 (GMT)
committerJoerg Bornemann <joerg.bornemann@nokia.com>2009-10-07 13:52:59 (GMT)
commitcc95666378ee0aef1cc6b02b544fdf52645f6d9b (patch)
treed7f1644edd1416dbf013e86e9a4631f617c9ae2f /src/gui/kernel/qkeymapper_win.cpp
parent1c5b84937a7dd993e188f2a6fbf4e28916f683c9 (diff)
downloadQt-cc95666378ee0aef1cc6b02b544fdf52645f6d9b.zip
Qt-cc95666378ee0aef1cc6b02b544fdf52645f6d9b.tar.gz
Qt-cc95666378ee0aef1cc6b02b544fdf52645f6d9b.tar.bz2
ignore invalid WM_KEYDOWN messages on Windows
For some strange reason, I get the following message if I press a non-numerical key on the SIP of a Samsung Omnia device, running Windows mobile 6.1: WM_KEYDOWN wParam == 0 lParam == 1 That message is invalid. We must ignore it. Reviewed-by: mauricek
Diffstat (limited to 'src/gui/kernel/qkeymapper_win.cpp')
-rw-r--r--src/gui/kernel/qkeymapper_win.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/kernel/qkeymapper_win.cpp b/src/gui/kernel/qkeymapper_win.cpp
index 25b6dce..8138839 100644
--- a/src/gui/kernel/qkeymapper_win.cpp
+++ b/src/gui/kernel/qkeymapper_win.cpp
@@ -949,8 +949,8 @@ bool QKeyMapperPrivate::translateKeyEvent(QWidget *widget, const MSG &msg, bool
if(msg.wParam == VK_PROCESSKEY)
return true;
- // Ignore invalid virtual keycode (see bug 127424)
- if (msg.wParam == 0xFF)
+ // Ignore invalid virtual keycodes (see bugs 127424, QTBUG-3630)
+ if (msg.wParam == 0 || msg.wParam == 0xFF)
return true;
// Translate VK_* (native) -> Key_* (Qt) keys