From 856f76e44a00a710b1c34eddee5a893a3c0ada6a Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Fri, 5 Mar 2010 11:08:33 +0100 Subject: Fixed key mappings on X11 Merge request #1742 (6c8c1c5322a26d789165783d7df3e29c672690cb) changed the behavior of one of the keys on X11, this fixes it back and documents that on X11 the key binding is a bit weird - XF86XK_MyComputer is mapped to Qt::Key_Launch0, XF86XK_Launch0 is mapped to Qt::Key_Launch3 and so on. Task-number: QTBUG-7063 Reviewed-by: Marius Storm-Olsen --- src/corelib/global/qnamespace.qdoc | 34 +++++++++++++++++----------------- src/gui/kernel/qkeymapper_x11.cpp | 6 +++--- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 6968773..a756565 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -1622,22 +1622,22 @@ \value Key_OpenUrl \value Key_LaunchMail \value Key_LaunchMedia - \value Key_Launch0 - \value Key_Launch1 - \value Key_Launch2 - \value Key_Launch3 - \value Key_Launch4 - \value Key_Launch5 - \value Key_Launch6 - \value Key_Launch7 - \value Key_Launch8 - \value Key_Launch9 - \value Key_LaunchA - \value Key_LaunchB - \value Key_LaunchC - \value Key_LaunchD - \value Key_LaunchE - \value Key_LaunchF + \value Key_Launch0 On X11 this key is mapped to "My Computer" (XF86XK_MyComputer) key for legacy reasons. + \value Key_Launch1 On X11 this key is mapped to "Calculator" (XF86XK_Calculator) key for legacy reasons. + \value Key_Launch2 On X11 this key is mapped to XF86XK_Launch0 key for legacy reasons. + \value Key_Launch3 On X11 this key is mapped to XF86XK_Launch1 key for legacy reasons. + \value Key_Launch4 On X11 this key is mapped to XF86XK_Launch2 key for legacy reasons. + \value Key_Launch5 On X11 this key is mapped to XF86XK_Launch3 key for legacy reasons. + \value Key_Launch6 On X11 this key is mapped to XF86XK_Launch4 key for legacy reasons. + \value Key_Launch7 On X11 this key is mapped to XF86XK_Launch5 key for legacy reasons. + \value Key_Launch8 On X11 this key is mapped to XF86XK_Launch6 key for legacy reasons. + \value Key_Launch9 On X11 this key is mapped to XF86XK_Launch7 key for legacy reasons. + \value Key_LaunchA On X11 this key is mapped to XF86XK_Launch8 key for legacy reasons. + \value Key_LaunchB On X11 this key is mapped to XF86XK_Launch9 key for legacy reasons. + \value Key_LaunchC On X11 this key is mapped to XF86XK_LaunchA key for legacy reasons. + \value Key_LaunchD On X11 this key is mapped to XF86XK_LaunchB key for legacy reasons. + \value Key_LaunchE On X11 this key is mapped to XF86XK_LaunchC key for legacy reasons. + \value Key_LaunchF On X11 this key is mapped to XF86XK_LaunchD key for legacy reasons. \value Key_MonBrightnessUp \value Key_MonBrightnessDown \value Key_KeyboardLightOnOff @@ -1663,7 +1663,7 @@ \value Key_ApplicationRight \value Key_Book \value Key_CD - \value Key_Calculator + \value Key_Calculator On X11 this key is not mapped for legacy reasons. Use Qt::Key_Launch1 instead. \value Key_ToDoList \value Key_ClearGrab \value Key_Close diff --git a/src/gui/kernel/qkeymapper_x11.cpp b/src/gui/kernel/qkeymapper_x11.cpp index 4e6c847..b32b626 100644 --- a/src/gui/kernel/qkeymapper_x11.cpp +++ b/src/gui/kernel/qkeymapper_x11.cpp @@ -1073,8 +1073,8 @@ static const unsigned int KeyTbl[] = { XF86XK_AudioNext, Qt::Key_MediaNext, XF86XK_AudioRecord, Qt::Key_MediaRecord, XF86XK_Mail, Qt::Key_LaunchMail, - XF86XK_MyComputer, Qt::Key_Launch0, - XF86XK_Calculator, Qt::Key_Calculator, + XF86XK_MyComputer, Qt::Key_Launch0, // ### Qt 5: remap properly + XF86XK_Calculator, Qt::Key_Launch1, XF86XK_Memo, Qt::Key_Memo, XF86XK_ToDoList, Qt::Key_ToDoList, XF86XK_Calendar, Qt::Key_Calendar, @@ -1172,7 +1172,7 @@ static const unsigned int KeyTbl[] = { XF86XK_Bluetooth, Qt::Key_Bluetooth, XF86XK_Suspend, Qt::Key_Suspend, XF86XK_Hibernate, Qt::Key_Hibernate, - XF86XK_Launch0, Qt::Key_Launch2, + XF86XK_Launch0, Qt::Key_Launch2, // ### Qt 5: remap properly XF86XK_Launch1, Qt::Key_Launch3, XF86XK_Launch2, Qt::Key_Launch4, XF86XK_Launch3, Qt::Key_Launch5, -- cgit v0.12