1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
8 ** |
8 ** |
358 code = text.at(0).unicode(); |
358 code = text.at(0).unicode(); |
359 } |
359 } |
360 |
360 |
361 if (code && code < 0xfffe) |
361 if (code && code < 0xfffe) |
362 code = QChar(code).toUpper().unicode(); |
362 code = QChar(code).toUpper().unicode(); |
|
363 |
|
364 if (code == Qt::Key_Tab && (baseModifiers & Qt::ShiftModifier)) { |
|
365 // map shift+tab to shift+backtab |
|
366 code = Qt::Key_Backtab; |
|
367 text = QString(); |
|
368 } |
|
369 |
363 if (code == baseCode) |
370 if (code == baseCode) |
364 continue; |
371 continue; |
365 |
372 |
366 result += (code | modifiers); |
373 result += (code | modifiers); |
367 } |
374 } |
446 code = text.at(0).unicode(); |
453 code = text.at(0).unicode(); |
447 } |
454 } |
448 |
455 |
449 if (code && code < 0xfffe) |
456 if (code && code < 0xfffe) |
450 code = QChar(code).toUpper().unicode(); |
457 code = QChar(code).toUpper().unicode(); |
|
458 |
|
459 if (code == Qt::Key_Tab && (baseModifiers & Qt::ShiftModifier)) { |
|
460 // map shift+tab to shift+backtab |
|
461 code = Qt::Key_Backtab; |
|
462 text = QString(); |
|
463 } |
|
464 |
451 if (code == baseCode) |
465 if (code == baseCode) |
452 continue; |
466 continue; |
453 |
467 |
454 result += (code | modifiers); |
468 result += (code | modifiers); |
455 } |
469 } |
1057 XF86XK_AudioStop, Qt::Key_MediaStop, |
1071 XF86XK_AudioStop, Qt::Key_MediaStop, |
1058 XF86XK_AudioPrev, Qt::Key_MediaPrevious, |
1072 XF86XK_AudioPrev, Qt::Key_MediaPrevious, |
1059 XF86XK_AudioNext, Qt::Key_MediaNext, |
1073 XF86XK_AudioNext, Qt::Key_MediaNext, |
1060 XF86XK_AudioRecord, Qt::Key_MediaRecord, |
1074 XF86XK_AudioRecord, Qt::Key_MediaRecord, |
1061 XF86XK_Mail, Qt::Key_LaunchMail, |
1075 XF86XK_Mail, Qt::Key_LaunchMail, |
1062 XF86XK_MyComputer, Qt::Key_Launch0, |
1076 XF86XK_MyComputer, Qt::Key_Launch0, // ### Qt 5: remap properly |
1063 XF86XK_Calculator, Qt::Key_Calculator, |
1077 XF86XK_Calculator, Qt::Key_Launch1, |
1064 XF86XK_Memo, Qt::Key_Memo, |
1078 XF86XK_Memo, Qt::Key_Memo, |
1065 XF86XK_ToDoList, Qt::Key_ToDoList, |
1079 XF86XK_ToDoList, Qt::Key_ToDoList, |
1066 XF86XK_Calendar, Qt::Key_Calendar, |
1080 XF86XK_Calendar, Qt::Key_Calendar, |
1067 XF86XK_PowerDown, Qt::Key_PowerDown, |
1081 XF86XK_PowerDown, Qt::Key_PowerDown, |
1068 XF86XK_ContrastAdjust, Qt::Key_ContrastAdjust, |
1082 XF86XK_ContrastAdjust, Qt::Key_ContrastAdjust, |
1156 XF86XK_View, Qt::Key_View, |
1170 XF86XK_View, Qt::Key_View, |
1157 XF86XK_TopMenu, Qt::Key_TopMenu, |
1171 XF86XK_TopMenu, Qt::Key_TopMenu, |
1158 XF86XK_Bluetooth, Qt::Key_Bluetooth, |
1172 XF86XK_Bluetooth, Qt::Key_Bluetooth, |
1159 XF86XK_Suspend, Qt::Key_Suspend, |
1173 XF86XK_Suspend, Qt::Key_Suspend, |
1160 XF86XK_Hibernate, Qt::Key_Hibernate, |
1174 XF86XK_Hibernate, Qt::Key_Hibernate, |
1161 XF86XK_Launch0, Qt::Key_Launch2, |
1175 XF86XK_Launch0, Qt::Key_Launch2, // ### Qt 5: remap properly |
1162 XF86XK_Launch1, Qt::Key_Launch3, |
1176 XF86XK_Launch1, Qt::Key_Launch3, |
1163 XF86XK_Launch2, Qt::Key_Launch4, |
1177 XF86XK_Launch2, Qt::Key_Launch4, |
1164 XF86XK_Launch3, Qt::Key_Launch5, |
1178 XF86XK_Launch3, Qt::Key_Launch5, |
1165 XF86XK_Launch4, Qt::Key_Launch6, |
1179 XF86XK_Launch4, Qt::Key_Launch6, |
1166 XF86XK_Launch5, Qt::Key_Launch7, |
1180 XF86XK_Launch5, Qt::Key_Launch7, |