src/gui/kernel/qkeymapper_x11.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
child 7 f7bc934e204c
child 18 2f34d5167611
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
   712 #endif
   712 #endif
   713 #ifndef XK_KP_Delete
   713 #ifndef XK_KP_Delete
   714 #define XK_KP_Delete            0xFF9F
   714 #define XK_KP_Delete            0xFF9F
   715 #endif
   715 #endif
   716 
   716 
   717 // the next lines are taken from XFree > 4.0 (X11/XF86keysyms.h), defining some special
   717 // the next lines are taken on 10/2009 from X.org (X11/XF86keysym.h), defining some special
   718 // multimedia keys. They are included here as not every system has them.
   718 // multimedia keys. They are included here as not every system has them.
   719 #define XF86XK_Standby          0x1008FF10
   719 #define XF86XK_MonBrightnessUp     0x1008FF02
   720 #define XF86XK_AudioLowerVolume 0x1008FF11
   720 #define XF86XK_MonBrightnessDown   0x1008FF03
   721 #define XF86XK_AudioMute        0x1008FF12
   721 #define XF86XK_KbdLightOnOff       0x1008FF04
   722 #define XF86XK_AudioRaiseVolume 0x1008FF13
   722 #define XF86XK_KbdBrightnessUp     0x1008FF05
   723 #define XF86XK_AudioPlay        0x1008FF14
   723 #define XF86XK_KbdBrightnessDown   0x1008FF06
   724 #define XF86XK_AudioStop        0x1008FF15
   724 #define XF86XK_Standby             0x1008FF10
   725 #define XF86XK_AudioPrev        0x1008FF16
   725 #define XF86XK_AudioLowerVolume	   0x1008FF11
   726 #define XF86XK_AudioNext        0x1008FF17
   726 #define XF86XK_AudioMute           0x1008FF12
   727 #define XF86XK_HomePage         0x1008FF18
   727 #define XF86XK_AudioRaiseVolume    0x1008FF13
   728 #define XF86XK_Calculator       0x1008FF1D
   728 #define XF86XK_AudioPlay           0x1008FF14
   729 #define XF86XK_Mail             0x1008FF19
   729 #define XF86XK_AudioStop           0x1008FF15
   730 #define XF86XK_Start            0x1008FF1A
   730 #define XF86XK_AudioPrev           0x1008FF16
   731 #define XF86XK_Search           0x1008FF1B
   731 #define XF86XK_AudioNext           0x1008FF17
   732 #define XF86XK_AudioRecord      0x1008FF1C
   732 #define XF86XK_HomePage            0x1008FF18
   733 #define XF86XK_Back             0x1008FF26
   733 #define XF86XK_Mail                0x1008FF19
   734 #define XF86XK_Forward          0x1008FF27
   734 #define XF86XK_Start               0x1008FF1A
   735 #define XF86XK_Stop             0x1008FF28
   735 #define XF86XK_Search              0x1008FF1B
   736 #define XF86XK_Refresh          0x1008FF29
   736 #define XF86XK_AudioRecord         0x1008FF1C
   737 #define XF86XK_Favorites        0x1008FF30
   737 #define XF86XK_Calculator          0x1008FF1D
   738 #define XF86XK_AudioPause       0x1008FF31
   738 #define XF86XK_Memo                0x1008FF1E
   739 #define XF86XK_AudioMedia       0x1008FF32
   739 #define XF86XK_ToDoList            0x1008FF1F
   740 #define XF86XK_MyComputer       0x1008FF33
   740 #define XF86XK_Calendar            0x1008FF20
   741 #define XF86XK_OpenURL          0x1008FF38
   741 #define XF86XK_PowerDown           0x1008FF21
   742 #define XF86XK_Launch0          0x1008FF40
   742 #define XF86XK_ContrastAdjust      0x1008FF22
   743 #define XF86XK_Launch1          0x1008FF41
   743 #define XF86XK_Back                0x1008FF26
   744 #define XF86XK_Launch2          0x1008FF42
   744 #define XF86XK_Forward             0x1008FF27
   745 #define XF86XK_Launch3          0x1008FF43
   745 #define XF86XK_Stop                0x1008FF28
   746 #define XF86XK_Launch4          0x1008FF44
   746 #define XF86XK_Refresh             0x1008FF29
   747 #define XF86XK_Launch5          0x1008FF45
   747 #define XF86XK_PowerOff            0x1008FF2A
   748 #define XF86XK_Launch6          0x1008FF46
   748 #define XF86XK_WakeUp              0x1008FF2B
   749 #define XF86XK_Launch7          0x1008FF47
   749 #define XF86XK_Eject               0x1008FF2C
   750 #define XF86XK_Launch8          0x1008FF48
   750 #define XF86XK_ScreenSaver         0x1008FF2D
   751 #define XF86XK_Launch9          0x1008FF49
   751 #define XF86XK_WWW                 0x1008FF2E
   752 #define XF86XK_LaunchA          0x1008FF4A
   752 #define XF86XK_Sleep               0x1008FF2F
   753 #define XF86XK_LaunchB          0x1008FF4B
   753 #define XF86XK_Favorites           0x1008FF30
   754 #define XF86XK_LaunchC          0x1008FF4C
   754 #define XF86XK_AudioPause          0x1008FF31
   755 #define XF86XK_LaunchD          0x1008FF4D
   755 #define XF86XK_AudioMedia          0x1008FF32
   756 #define XF86XK_LaunchE          0x1008FF4E
   756 #define XF86XK_MyComputer          0x1008FF33
   757 #define XF86XK_LaunchF          0x1008FF4F
   757 #define XF86XK_LightBulb           0x1008FF35
       
   758 #define XF86XK_Shop                0x1008FF36
       
   759 #define XF86XK_History             0x1008FF37
       
   760 #define XF86XK_OpenURL             0x1008FF38
       
   761 #define XF86XK_AddFavorite         0x1008FF39
       
   762 #define XF86XK_HotLinks            0x1008FF3A
       
   763 #define XF86XK_BrightnessAdjust    0x1008FF3B
       
   764 #define XF86XK_Finance             0x1008FF3C
       
   765 #define XF86XK_Community           0x1008FF3D
       
   766 #define XF86XK_AudioRewind         0x1008FF3E
       
   767 #define XF86XK_BackForward         0x1008FF3F
       
   768 #define XF86XK_Launch0             0x1008FF40
       
   769 #define XF86XK_Launch1             0x1008FF41
       
   770 #define XF86XK_Launch2             0x1008FF42
       
   771 #define XF86XK_Launch3             0x1008FF43
       
   772 #define XF86XK_Launch4             0x1008FF44
       
   773 #define XF86XK_Launch5             0x1008FF45
       
   774 #define XF86XK_Launch6             0x1008FF46
       
   775 #define XF86XK_Launch7             0x1008FF47
       
   776 #define XF86XK_Launch8             0x1008FF48
       
   777 #define XF86XK_Launch9             0x1008FF49
       
   778 #define XF86XK_LaunchA             0x1008FF4A
       
   779 #define XF86XK_LaunchB             0x1008FF4B
       
   780 #define XF86XK_LaunchC             0x1008FF4C
       
   781 #define XF86XK_LaunchD             0x1008FF4D
       
   782 #define XF86XK_LaunchE             0x1008FF4E
       
   783 #define XF86XK_LaunchF             0x1008FF4F
       
   784 #define XF86XK_ApplicationLeft     0x1008FF50
       
   785 #define XF86XK_ApplicationRight    0x1008FF51
       
   786 #define XF86XK_Book                0x1008FF52
       
   787 #define XF86XK_CD                  0x1008FF53
       
   788 #define XF86XK_Calculater          0x1008FF54
       
   789 #define XF86XK_Clear               0x1008FF55
       
   790 #define XF86XK_ClearGrab           0x1008FE21
       
   791 #define XF86XK_Close               0x1008FF56
       
   792 #define XF86XK_Copy                0x1008FF57
       
   793 #define XF86XK_Cut                 0x1008FF58
       
   794 #define XF86XK_Display             0x1008FF59
       
   795 #define XF86XK_DOS                 0x1008FF5A
       
   796 #define XF86XK_Documents           0x1008FF5B
       
   797 #define XF86XK_Excel               0x1008FF5C
       
   798 #define XF86XK_Explorer            0x1008FF5D
       
   799 #define XF86XK_Game                0x1008FF5E
       
   800 #define XF86XK_Go                  0x1008FF5F
       
   801 #define XF86XK_iTouch              0x1008FF60
       
   802 #define XF86XK_LogOff              0x1008FF61
       
   803 #define XF86XK_Market              0x1008FF62
       
   804 #define XF86XK_Meeting             0x1008FF63
       
   805 #define XF86XK_MenuKB              0x1008FF65
       
   806 #define XF86XK_MenuPB              0x1008FF66
       
   807 #define XF86XK_MySites             0x1008FF67
       
   808 #define XF86XK_News                0x1008FF69
       
   809 #define XF86XK_OfficeHome          0x1008FF6A
       
   810 #define XF86XK_Option              0x1008FF6C
       
   811 #define XF86XK_Paste               0x1008FF6D
       
   812 #define XF86XK_Phone               0x1008FF6E
       
   813 #define XF86XK_Reply               0x1008FF72
       
   814 #define XF86XK_Reload              0x1008FF73
       
   815 #define XF86XK_RotateWindows       0x1008FF74
       
   816 #define XF86XK_RotationPB          0x1008FF75
       
   817 #define XF86XK_RotationKB          0x1008FF76
       
   818 #define XF86XK_Save                0x1008FF77
       
   819 #define XF86XK_Send                0x1008FF7B
       
   820 #define XF86XK_Spell               0x1008FF7C
       
   821 #define XF86XK_SplitScreen         0x1008FF7D
       
   822 #define XF86XK_Support             0x1008FF7E
       
   823 #define XF86XK_TaskPane            0x1008FF7F
       
   824 #define XF86XK_Terminal            0x1008FF80
       
   825 #define XF86XK_Tools               0x1008FF81
       
   826 #define XF86XK_Travel              0x1008FF82
       
   827 #define XF86XK_Video               0x1008FF87
       
   828 #define XF86XK_Word                0x1008FF89
       
   829 #define XF86XK_Xfer                0x1008FF8A
       
   830 #define XF86XK_ZoomIn              0x1008FF8B
       
   831 #define XF86XK_ZoomOut             0x1008FF8C
       
   832 #define XF86XK_Away                0x1008FF8D
       
   833 #define XF86XK_Messenger           0x1008FF8E
       
   834 #define XF86XK_WebCam              0x1008FF8F
       
   835 #define XF86XK_MailForward         0x1008FF90
       
   836 #define XF86XK_Pictures            0x1008FF91
       
   837 #define XF86XK_Music               0x1008FF92
       
   838 #define XF86XK_Battery             0x1008FF93
       
   839 #define XF86XK_Bluetooth           0x1008FF94
       
   840 #define XF86XK_WLAN                0x1008FF95
       
   841 #define XF86XK_UWB                 0x1008FF96
       
   842 #define XF86XK_AudioForward        0x1008FF97
       
   843 #define XF86XK_AudioRepeat         0x1008FF98
       
   844 #define XF86XK_AudioRandomPlay     0x1008FF99
       
   845 #define XF86XK_Subtitle            0x1008FF9A
       
   846 #define XF86XK_AudioCycleTrack     0x1008FF9B
       
   847 #define XF86XK_Time                0x1008FF9F
       
   848 #define XF86XK_Select              0x1008FFA0
       
   849 #define XF86XK_View                0x1008FFA1
       
   850 #define XF86XK_TopMenu             0x1008FFA2
       
   851 #define XF86XK_Suspend             0x1008FFA7
       
   852 #define XF86XK_Hibernate           0x1008FFA8
       
   853 
       
   854 
   758 // end of XF86keysyms.h
   855 // end of XF86keysyms.h
   759 
   856 
   760 // Special keys used by Qtopia, mapped into the X11 private keypad range.
   857 // Special keys used by Qtopia, mapped into the X11 private keypad range.
   761 #define QTOPIAXK_Select         0x11000601
   858 #define QTOPIAXK_Select         0x11000601
   762 #define QTOPIAXK_Yes            0x11000602
   859 #define QTOPIAXK_Yes            0x11000602
   940     XK_dead_semivoiced_sound,   Qt::Key_Dead_Semivoiced_Sound,
  1037     XK_dead_semivoiced_sound,   Qt::Key_Dead_Semivoiced_Sound,
   941     XK_dead_belowdot,           Qt::Key_Dead_Belowdot,
  1038     XK_dead_belowdot,           Qt::Key_Dead_Belowdot,
   942     XK_dead_hook,               Qt::Key_Dead_Hook,
  1039     XK_dead_hook,               Qt::Key_Dead_Hook,
   943     XK_dead_horn,               Qt::Key_Dead_Horn,
  1040     XK_dead_horn,               Qt::Key_Dead_Horn,
   944 
  1041 
   945     // Special multimedia keys
  1042     // Special keys from X.org - This include multimedia keys,
   946     // currently only tested with MS internet keyboard
  1043 	// wireless/bluetooth/uwb keys, special launcher keys, etc.
   947 
       
   948     // browsing keys
       
   949     XF86XK_Back,                Qt::Key_Back,
  1044     XF86XK_Back,                Qt::Key_Back,
   950     XF86XK_Forward,             Qt::Key_Forward,
  1045     XF86XK_Forward,             Qt::Key_Forward,
   951     XF86XK_Stop,                Qt::Key_Stop,
  1046     XF86XK_Stop,                Qt::Key_Stop,
   952     XF86XK_Refresh,             Qt::Key_Refresh,
  1047     XF86XK_Refresh,             Qt::Key_Refresh,
   953     XF86XK_Favorites,           Qt::Key_Favorites,
  1048     XF86XK_Favorites,           Qt::Key_Favorites,
   954     XF86XK_AudioMedia,          Qt::Key_LaunchMedia,
  1049     XF86XK_AudioMedia,          Qt::Key_LaunchMedia,
   955     XF86XK_OpenURL,             Qt::Key_OpenUrl,
  1050     XF86XK_OpenURL,             Qt::Key_OpenUrl,
   956     XF86XK_HomePage,            Qt::Key_HomePage,
  1051     XF86XK_HomePage,            Qt::Key_HomePage,
   957     XF86XK_Search,              Qt::Key_Search,
  1052     XF86XK_Search,              Qt::Key_Search,
   958 
       
   959     // media keys
       
   960     XF86XK_AudioLowerVolume,    Qt::Key_VolumeDown,
  1053     XF86XK_AudioLowerVolume,    Qt::Key_VolumeDown,
   961     XF86XK_AudioMute,           Qt::Key_VolumeMute,
  1054     XF86XK_AudioMute,           Qt::Key_VolumeMute,
   962     XF86XK_AudioRaiseVolume,    Qt::Key_VolumeUp,
  1055     XF86XK_AudioRaiseVolume,    Qt::Key_VolumeUp,
   963     XF86XK_AudioPlay,           Qt::Key_MediaPlay,
  1056     XF86XK_AudioPlay,           Qt::Key_MediaPlay,
   964     XF86XK_AudioStop,           Qt::Key_MediaStop,
  1057     XF86XK_AudioStop,           Qt::Key_MediaStop,
   965     XF86XK_AudioPrev,           Qt::Key_MediaPrevious,
  1058     XF86XK_AudioPrev,           Qt::Key_MediaPrevious,
   966     XF86XK_AudioNext,           Qt::Key_MediaNext,
  1059     XF86XK_AudioNext,           Qt::Key_MediaNext,
   967     XF86XK_AudioRecord,         Qt::Key_MediaRecord,
  1060     XF86XK_AudioRecord,         Qt::Key_MediaRecord,
   968 
       
   969     // launch keys
       
   970     XF86XK_Mail,                Qt::Key_LaunchMail,
  1061     XF86XK_Mail,                Qt::Key_LaunchMail,
   971     XF86XK_MyComputer,          Qt::Key_Launch0,
  1062     XF86XK_MyComputer,          Qt::Key_Launch0,
   972     XF86XK_Calculator,          Qt::Key_Launch1,
  1063     XF86XK_Calculator,          Qt::Key_Calculator,
       
  1064     XF86XK_Memo,                Qt::Key_Memo,
       
  1065     XF86XK_ToDoList,            Qt::Key_ToDoList,
       
  1066     XF86XK_Calendar,            Qt::Key_Calendar,
       
  1067     XF86XK_PowerDown,           Qt::Key_PowerDown,
       
  1068     XF86XK_ContrastAdjust,      Qt::Key_ContrastAdjust,
   973     XF86XK_Standby,             Qt::Key_Standby,
  1069     XF86XK_Standby,             Qt::Key_Standby,
   974 
  1070     XF86XK_MonBrightnessUp,     Qt::Key_MonBrightnessUp,
       
  1071     XF86XK_MonBrightnessDown,   Qt::Key_MonBrightnessDown,
       
  1072     XF86XK_KbdLightOnOff,       Qt::Key_KeyboardLightOnOff,
       
  1073     XF86XK_KbdBrightnessUp,     Qt::Key_KeyboardBrightnessUp,
       
  1074     XF86XK_KbdBrightnessDown,   Qt::Key_KeyboardBrightnessDown,
       
  1075     XF86XK_PowerOff,            Qt::Key_PowerOff,
       
  1076     XF86XK_WakeUp,              Qt::Key_WakeUp,
       
  1077     XF86XK_Eject,               Qt::Key_Eject,
       
  1078     XF86XK_ScreenSaver,         Qt::Key_ScreenSaver,
       
  1079     XF86XK_WWW,                 Qt::Key_WWW,
       
  1080     XF86XK_Sleep,               Qt::Key_Sleep,
       
  1081     XF86XK_LightBulb,           Qt::Key_LightBulb,
       
  1082     XF86XK_Shop,                Qt::Key_Shop,
       
  1083     XF86XK_History,             Qt::Key_History,
       
  1084     XF86XK_AddFavorite,         Qt::Key_AddFavorite,
       
  1085     XF86XK_HotLinks,            Qt::Key_HotLinks,
       
  1086     XF86XK_BrightnessAdjust,    Qt::Key_BrightnessAdjust,
       
  1087     XF86XK_Finance,             Qt::Key_Finance,
       
  1088     XF86XK_Community,           Qt::Key_Community,
       
  1089     XF86XK_AudioRewind,         Qt::Key_AudioRewind,
       
  1090     XF86XK_BackForward,         Qt::Key_BackForward,
       
  1091     XF86XK_ApplicationLeft,     Qt::Key_ApplicationLeft,
       
  1092     XF86XK_ApplicationRight,    Qt::Key_ApplicationRight,
       
  1093     XF86XK_Book,                Qt::Key_Book,
       
  1094     XF86XK_CD,                  Qt::Key_CD,
       
  1095     XF86XK_Calculater,          Qt::Key_Calculator,
       
  1096     XF86XK_Clear,               Qt::Key_Clear,
       
  1097     XF86XK_ClearGrab,           Qt::Key_ClearGrab,
       
  1098     XF86XK_Close,               Qt::Key_Close,
       
  1099     XF86XK_Copy,                Qt::Key_Copy,
       
  1100     XF86XK_Cut,                 Qt::Key_Cut,
       
  1101     XF86XK_Display,             Qt::Key_Display,
       
  1102     XF86XK_DOS,                 Qt::Key_DOS,
       
  1103     XF86XK_Documents,           Qt::Key_Documents,
       
  1104     XF86XK_Excel,               Qt::Key_Excel,
       
  1105     XF86XK_Explorer,            Qt::Key_Explorer,
       
  1106     XF86XK_Game,                Qt::Key_Game,
       
  1107     XF86XK_Go,                  Qt::Key_Go,
       
  1108     XF86XK_iTouch,              Qt::Key_iTouch,
       
  1109     XF86XK_LogOff,              Qt::Key_LogOff,
       
  1110     XF86XK_Market,              Qt::Key_Market,
       
  1111     XF86XK_Meeting,             Qt::Key_Meeting,
       
  1112     XF86XK_MenuKB,              Qt::Key_MenuKB,
       
  1113     XF86XK_MenuPB,              Qt::Key_MenuPB,
       
  1114     XF86XK_MySites,             Qt::Key_MySites,
       
  1115     XF86XK_News,                Qt::Key_News,
       
  1116     XF86XK_OfficeHome,          Qt::Key_OfficeHome,
       
  1117     XF86XK_Option,              Qt::Key_Option,
       
  1118     XF86XK_Paste,               Qt::Key_Paste,
       
  1119     XF86XK_Phone,               Qt::Key_Phone,
       
  1120     XF86XK_Reply,               Qt::Key_Reply,
       
  1121     XF86XK_Reload,              Qt::Key_Reload,
       
  1122     XF86XK_RotateWindows,       Qt::Key_RotateWindows,
       
  1123     XF86XK_RotationPB,          Qt::Key_RotationPB,
       
  1124     XF86XK_RotationKB,          Qt::Key_RotationKB,
       
  1125     XF86XK_Save,                Qt::Key_Save,
       
  1126     XF86XK_Send,                Qt::Key_Send,
       
  1127     XF86XK_Spell,               Qt::Key_Spell,
       
  1128     XF86XK_SplitScreen,         Qt::Key_SplitScreen,
       
  1129     XF86XK_Support,             Qt::Key_Support,
       
  1130     XF86XK_TaskPane,            Qt::Key_TaskPane,
       
  1131     XF86XK_Terminal,            Qt::Key_Terminal,
       
  1132     XF86XK_Tools,               Qt::Key_Tools,
       
  1133     XF86XK_Travel,              Qt::Key_Travel,
       
  1134     XF86XK_Video,               Qt::Key_Video,
       
  1135     XF86XK_Word,                Qt::Key_Word,
       
  1136     XF86XK_Xfer,                Qt::Key_Xfer,
       
  1137     XF86XK_ZoomIn,              Qt::Key_ZoomIn,
       
  1138     XF86XK_ZoomOut,             Qt::Key_ZoomOut,
       
  1139     XF86XK_Away,                Qt::Key_Away,
       
  1140     XF86XK_Messenger,           Qt::Key_Messenger,
       
  1141     XF86XK_WebCam,              Qt::Key_WebCam,
       
  1142     XF86XK_MailForward,         Qt::Key_MailForward,
       
  1143     XF86XK_Pictures,            Qt::Key_Pictures,
       
  1144     XF86XK_Music,               Qt::Key_Music,
       
  1145     XF86XK_Battery,             Qt::Key_Battery,
       
  1146     XF86XK_Bluetooth,           Qt::Key_Bluetooth,
       
  1147     XF86XK_WLAN,                Qt::Key_WLAN,
       
  1148     XF86XK_UWB,                 Qt::Key_UWB,
       
  1149     XF86XK_AudioForward,        Qt::Key_AudioForward,
       
  1150     XF86XK_AudioRepeat,         Qt::Key_AudioRepeat,
       
  1151     XF86XK_AudioRandomPlay,     Qt::Key_AudioRandomPlay,
       
  1152     XF86XK_Subtitle,            Qt::Key_Subtitle,
       
  1153     XF86XK_AudioCycleTrack,     Qt::Key_AudioCycleTrack,
       
  1154     XF86XK_Time,                Qt::Key_Time,
       
  1155     XF86XK_Select,              Qt::Key_Select,
       
  1156     XF86XK_View,                Qt::Key_View,
       
  1157     XF86XK_TopMenu,             Qt::Key_TopMenu,
       
  1158     XF86XK_Bluetooth,           Qt::Key_Bluetooth,
       
  1159     XF86XK_Suspend,             Qt::Key_Suspend,
       
  1160     XF86XK_Hibernate,           Qt::Key_Hibernate,
   975     XF86XK_Launch0,             Qt::Key_Launch2,
  1161     XF86XK_Launch0,             Qt::Key_Launch2,
   976     XF86XK_Launch1,             Qt::Key_Launch3,
  1162     XF86XK_Launch1,             Qt::Key_Launch3,
   977     XF86XK_Launch2,             Qt::Key_Launch4,
  1163     XF86XK_Launch2,             Qt::Key_Launch4,
   978     XF86XK_Launch3,             Qt::Key_Launch5,
  1164     XF86XK_Launch3,             Qt::Key_Launch5,
   979     XF86XK_Launch4,             Qt::Key_Launch6,
  1165     XF86XK_Launch4,             Qt::Key_Launch6,