Qt 4.8
Classes | Macros | Enumerations | Functions | Variables
qkeymapper_x11.cpp File Reference
#include "qkeymapper_p.h"
#include "qdebug.h"
#include "qtextcodec.h"
#include "qwidget.h"
#include "qapplication_p.h"
#include "qevent_p.h"
#include "qt_x11_p.h"
#include <X11/XKBlib.h>
#include <X11/keysymdef.h>
#include <ctype.h>
#include "qkeymapper_x11_p.cpp"

Go to the source code of this file.

Classes

struct  qt_auto_repeat_data
 

Macros

#define QTOPIAXK_Call   0x1100060E
 
#define QTOPIAXK_Cancel   0x11000604
 
#define QTOPIAXK_Context1   0x1100060A
 
#define QTOPIAXK_Context2   0x1100060B
 
#define QTOPIAXK_Context3   0x1100060C
 
#define QTOPIAXK_Context4   0x1100060D
 
#define QTOPIAXK_Execute   0x11000606
 
#define QTOPIAXK_Flip   0x11000610
 
#define QTOPIAXK_Hangup   0x1100060F
 
#define QTOPIAXK_No   0x11000603
 
#define QTOPIAXK_Play   0x11000608
 
#define QTOPIAXK_Printer   0x11000605
 
#define QTOPIAXK_Select   0x11000601
 
#define QTOPIAXK_Sleep   0x11000607
 
#define QTOPIAXK_Yes   0x11000602
 
#define QTOPIAXK_Zoom   0x11000609
 
#define SETMASK(sym, mask)
 
#define XF86XK_AddFavorite   0x1008FF39
 
#define XF86XK_ApplicationLeft   0x1008FF50
 
#define XF86XK_ApplicationRight   0x1008FF51
 
#define XF86XK_AudioCycleTrack   0x1008FF9B
 
#define XF86XK_AudioForward   0x1008FF97
 
#define XF86XK_AudioLowerVolume   0x1008FF11
 
#define XF86XK_AudioMedia   0x1008FF32
 
#define XF86XK_AudioMute   0x1008FF12
 
#define XF86XK_AudioNext   0x1008FF17
 
#define XF86XK_AudioPause   0x1008FF31
 
#define XF86XK_AudioPlay   0x1008FF14
 
#define XF86XK_AudioPrev   0x1008FF16
 
#define XF86XK_AudioRaiseVolume   0x1008FF13
 
#define XF86XK_AudioRandomPlay   0x1008FF99
 
#define XF86XK_AudioRecord   0x1008FF1C
 
#define XF86XK_AudioRepeat   0x1008FF98
 
#define XF86XK_AudioRewind   0x1008FF3E
 
#define XF86XK_AudioStop   0x1008FF15
 
#define XF86XK_Away   0x1008FF8D
 
#define XF86XK_Back   0x1008FF26
 
#define XF86XK_BackForward   0x1008FF3F
 
#define XF86XK_Battery   0x1008FF93
 
#define XF86XK_Bluetooth   0x1008FF94
 
#define XF86XK_Book   0x1008FF52
 
#define XF86XK_BrightnessAdjust   0x1008FF3B
 
#define XF86XK_Calculater   0x1008FF54
 
#define XF86XK_Calculator   0x1008FF1D
 
#define XF86XK_Calendar   0x1008FF20
 
#define XF86XK_CD   0x1008FF53
 
#define XF86XK_Clear   0x1008FF55
 
#define XF86XK_ClearGrab   0x1008FE21
 
#define XF86XK_Close   0x1008FF56
 
#define XF86XK_Community   0x1008FF3D
 
#define XF86XK_ContrastAdjust   0x1008FF22
 
#define XF86XK_Copy   0x1008FF57
 
#define XF86XK_Cut   0x1008FF58
 
#define XF86XK_Display   0x1008FF59
 
#define XF86XK_Documents   0x1008FF5B
 
#define XF86XK_DOS   0x1008FF5A
 
#define XF86XK_Eject   0x1008FF2C
 
#define XF86XK_Excel   0x1008FF5C
 
#define XF86XK_Explorer   0x1008FF5D
 
#define XF86XK_Favorites   0x1008FF30
 
#define XF86XK_Finance   0x1008FF3C
 
#define XF86XK_Forward   0x1008FF27
 
#define XF86XK_Game   0x1008FF5E
 
#define XF86XK_Go   0x1008FF5F
 
#define XF86XK_Hibernate   0x1008FFA8
 
#define XF86XK_History   0x1008FF37
 
#define XF86XK_HomePage   0x1008FF18
 
#define XF86XK_HotLinks   0x1008FF3A
 
#define XF86XK_iTouch   0x1008FF60
 
#define XF86XK_KbdBrightnessDown   0x1008FF06
 
#define XF86XK_KbdBrightnessUp   0x1008FF05
 
#define XF86XK_KbdLightOnOff   0x1008FF04
 
#define XF86XK_Launch0   0x1008FF40
 
#define XF86XK_Launch1   0x1008FF41
 
#define XF86XK_Launch2   0x1008FF42
 
#define XF86XK_Launch3   0x1008FF43
 
#define XF86XK_Launch4   0x1008FF44
 
#define XF86XK_Launch5   0x1008FF45
 
#define XF86XK_Launch6   0x1008FF46
 
#define XF86XK_Launch7   0x1008FF47
 
#define XF86XK_Launch8   0x1008FF48
 
#define XF86XK_Launch9   0x1008FF49
 
#define XF86XK_LaunchA   0x1008FF4A
 
#define XF86XK_LaunchB   0x1008FF4B
 
#define XF86XK_LaunchC   0x1008FF4C
 
#define XF86XK_LaunchD   0x1008FF4D
 
#define XF86XK_LaunchE   0x1008FF4E
 
#define XF86XK_LaunchF   0x1008FF4F
 
#define XF86XK_LightBulb   0x1008FF35
 
#define XF86XK_LogOff   0x1008FF61
 
#define XF86XK_Mail   0x1008FF19
 
#define XF86XK_MailForward   0x1008FF90
 
#define XF86XK_Market   0x1008FF62
 
#define XF86XK_Meeting   0x1008FF63
 
#define XF86XK_Memo   0x1008FF1E
 
#define XF86XK_MenuKB   0x1008FF65
 
#define XF86XK_MenuPB   0x1008FF66
 
#define XF86XK_Messenger   0x1008FF8E
 
#define XF86XK_MonBrightnessDown   0x1008FF03
 
#define XF86XK_MonBrightnessUp   0x1008FF02
 
#define XF86XK_Music   0x1008FF92
 
#define XF86XK_MyComputer   0x1008FF33
 
#define XF86XK_MySites   0x1008FF67
 
#define XF86XK_News   0x1008FF69
 
#define XF86XK_OfficeHome   0x1008FF6A
 
#define XF86XK_OpenURL   0x1008FF38
 
#define XF86XK_Option   0x1008FF6C
 
#define XF86XK_Paste   0x1008FF6D
 
#define XF86XK_Phone   0x1008FF6E
 
#define XF86XK_Pictures   0x1008FF91
 
#define XF86XK_PowerDown   0x1008FF21
 
#define XF86XK_PowerOff   0x1008FF2A
 
#define XF86XK_Refresh   0x1008FF29
 
#define XF86XK_Reload   0x1008FF73
 
#define XF86XK_Reply   0x1008FF72
 
#define XF86XK_RotateWindows   0x1008FF74
 
#define XF86XK_RotationKB   0x1008FF76
 
#define XF86XK_RotationPB   0x1008FF75
 
#define XF86XK_Save   0x1008FF77
 
#define XF86XK_ScreenSaver   0x1008FF2D
 
#define XF86XK_Search   0x1008FF1B
 
#define XF86XK_Select   0x1008FFA0
 
#define XF86XK_Send   0x1008FF7B
 
#define XF86XK_Shop   0x1008FF36
 
#define XF86XK_Sleep   0x1008FF2F
 
#define XF86XK_Spell   0x1008FF7C
 
#define XF86XK_SplitScreen   0x1008FF7D
 
#define XF86XK_Standby   0x1008FF10
 
#define XF86XK_Start   0x1008FF1A
 
#define XF86XK_Stop   0x1008FF28
 
#define XF86XK_Subtitle   0x1008FF9A
 
#define XF86XK_Support   0x1008FF7E
 
#define XF86XK_Suspend   0x1008FFA7
 
#define XF86XK_TaskPane   0x1008FF7F
 
#define XF86XK_Terminal   0x1008FF80
 
#define XF86XK_Time   0x1008FF9F
 
#define XF86XK_ToDoList   0x1008FF1F
 
#define XF86XK_Tools   0x1008FF81
 
#define XF86XK_TopMenu   0x1008FFA2
 
#define XF86XK_Travel   0x1008FF82
 
#define XF86XK_UWB   0x1008FF96
 
#define XF86XK_Video   0x1008FF87
 
#define XF86XK_View   0x1008FFA1
 
#define XF86XK_WakeUp   0x1008FF2B
 
#define XF86XK_WebCam   0x1008FF8F
 
#define XF86XK_WLAN   0x1008FF95
 
#define XF86XK_Word   0x1008FF89
 
#define XF86XK_WWW   0x1008FF2E
 
#define XF86XK_Xfer   0x1008FF8A
 
#define XF86XK_ZoomIn   0x1008FF8B
 
#define XF86XK_ZoomOut   0x1008FF8C
 
#define XK_Codeinput   0xFF37
 
#define XK_dead_hook   0xFE61
 
#define XK_dead_horn   0xFE62
 
#define XK_ISO_Left_Tab   0xFE20
 
#define XK_Kanji_Bangou   0xFF37 /* same as codeinput */
 
#define XK_KOREAN
 
#define XK_KP_Delete   0xFF9F
 
#define XK_KP_Down   0xFF99
 
#define XK_KP_End   0xFF9C
 
#define XK_KP_Home   0xFF95
 
#define XK_KP_Insert   0xFF9E
 
#define XK_KP_Left   0xFF96
 
#define XK_KP_Next   0xFF9B
 
#define XK_KP_Prior   0xFF9A
 
#define XK_KP_Right   0xFF98
 
#define XK_KP_Up   0xFF97
 
#define XK_LATIN1
 
#define XK_MISCELLANY
 
#define XK_XKB_KEYS
 

Enumerations

enum  { MaxBits = sizeof(uint) * 8 }
 
enum  {
  RulesFileIndex = 0, ModelIndex = 1, LayoutIndex = 2, VariantIndex = 3,
  OptionsIndex = 4
}
 

Functions

QLocale q_getKeyboardLocale (const QByteArray &layoutName, const QByteArray &variantName)
 
static Bool qt_keypress_scanner (Display *, XEvent *event, XPointer arg)
 
static Bool qt_keyrelease_scanner (Display *, XEvent *event, XPointer arg)
 
bool qt_sendSpontaneousEvent (QObject *, QEvent *)
 
static int qt_XTranslateKey (register QXCoreDesc *dpy, KeyCode keycode, register unsigned int modifiers, unsigned int *modifiers_return, KeySym *keysym_return)
 
static QString translateKeySym (KeySym keysym, uint xmodifiers, int &code, Qt::KeyboardModifiers &modifiers, QByteArray &chars, int &count)
 
static int translateKeySym (uint key)
 

Variables

static const unsigned int KeyTbl []
 
uchar qt_alt_mask
 
uchar qt_hyper_mask
 
uchar qt_meta_mask
 
uchar qt_mode_switch_mask
 
uchar qt_num_lock_mask = 0
 
bool qt_sm_blockUserInput
 
uchar qt_super_mask
 
bool qt_use_rtl_extensions
 

Macro Definition Documentation

◆ QTOPIAXK_Call

#define QTOPIAXK_Call   0x1100060E

Definition at line 874 of file qkeymapper_x11.cpp.

◆ QTOPIAXK_Cancel

#define QTOPIAXK_Cancel   0x11000604

Definition at line 864 of file qkeymapper_x11.cpp.

◆ QTOPIAXK_Context1

#define QTOPIAXK_Context1   0x1100060A

Definition at line 870 of file qkeymapper_x11.cpp.

◆ QTOPIAXK_Context2

#define QTOPIAXK_Context2   0x1100060B

Definition at line 871 of file qkeymapper_x11.cpp.

◆ QTOPIAXK_Context3

#define QTOPIAXK_Context3   0x1100060C

Definition at line 872 of file qkeymapper_x11.cpp.

◆ QTOPIAXK_Context4

#define QTOPIAXK_Context4   0x1100060D

Definition at line 873 of file qkeymapper_x11.cpp.

◆ QTOPIAXK_Execute

#define QTOPIAXK_Execute   0x11000606

Definition at line 866 of file qkeymapper_x11.cpp.

◆ QTOPIAXK_Flip

#define QTOPIAXK_Flip   0x11000610

Definition at line 876 of file qkeymapper_x11.cpp.

◆ QTOPIAXK_Hangup

#define QTOPIAXK_Hangup   0x1100060F

Definition at line 875 of file qkeymapper_x11.cpp.

◆ QTOPIAXK_No

#define QTOPIAXK_No   0x11000603

Definition at line 863 of file qkeymapper_x11.cpp.

◆ QTOPIAXK_Play

#define QTOPIAXK_Play   0x11000608

Definition at line 868 of file qkeymapper_x11.cpp.

◆ QTOPIAXK_Printer

#define QTOPIAXK_Printer   0x11000605

Definition at line 865 of file qkeymapper_x11.cpp.

◆ QTOPIAXK_Select

#define QTOPIAXK_Select   0x11000601

Definition at line 861 of file qkeymapper_x11.cpp.

◆ QTOPIAXK_Sleep

#define QTOPIAXK_Sleep   0x11000607

Definition at line 867 of file qkeymapper_x11.cpp.

◆ QTOPIAXK_Yes

#define QTOPIAXK_Yes   0x11000602

Definition at line 862 of file qkeymapper_x11.cpp.

◆ QTOPIAXK_Zoom

#define QTOPIAXK_Zoom   0x11000609

Definition at line 869 of file qkeymapper_x11.cpp.

◆ SETMASK

#define SETMASK (   sym,
  mask 
)

Definition at line 106 of file qkeymapper_x11.cpp.

◆ XF86XK_AddFavorite

#define XF86XK_AddFavorite   0x1008FF39

Definition at line 764 of file qkeymapper_x11.cpp.

◆ XF86XK_ApplicationLeft

#define XF86XK_ApplicationLeft   0x1008FF50

Definition at line 787 of file qkeymapper_x11.cpp.

◆ XF86XK_ApplicationRight

#define XF86XK_ApplicationRight   0x1008FF51

Definition at line 788 of file qkeymapper_x11.cpp.

◆ XF86XK_AudioCycleTrack

#define XF86XK_AudioCycleTrack   0x1008FF9B

Definition at line 849 of file qkeymapper_x11.cpp.

◆ XF86XK_AudioForward

#define XF86XK_AudioForward   0x1008FF97

Definition at line 845 of file qkeymapper_x11.cpp.

◆ XF86XK_AudioLowerVolume

#define XF86XK_AudioLowerVolume   0x1008FF11

Definition at line 728 of file qkeymapper_x11.cpp.

◆ XF86XK_AudioMedia

#define XF86XK_AudioMedia   0x1008FF32

Definition at line 758 of file qkeymapper_x11.cpp.

◆ XF86XK_AudioMute

#define XF86XK_AudioMute   0x1008FF12

Definition at line 729 of file qkeymapper_x11.cpp.

◆ XF86XK_AudioNext

#define XF86XK_AudioNext   0x1008FF17

Definition at line 734 of file qkeymapper_x11.cpp.

◆ XF86XK_AudioPause

#define XF86XK_AudioPause   0x1008FF31

Definition at line 757 of file qkeymapper_x11.cpp.

◆ XF86XK_AudioPlay

#define XF86XK_AudioPlay   0x1008FF14

Definition at line 731 of file qkeymapper_x11.cpp.

◆ XF86XK_AudioPrev

#define XF86XK_AudioPrev   0x1008FF16

Definition at line 733 of file qkeymapper_x11.cpp.

◆ XF86XK_AudioRaiseVolume

#define XF86XK_AudioRaiseVolume   0x1008FF13

Definition at line 730 of file qkeymapper_x11.cpp.

◆ XF86XK_AudioRandomPlay

#define XF86XK_AudioRandomPlay   0x1008FF99

Definition at line 847 of file qkeymapper_x11.cpp.

◆ XF86XK_AudioRecord

#define XF86XK_AudioRecord   0x1008FF1C

Definition at line 739 of file qkeymapper_x11.cpp.

◆ XF86XK_AudioRepeat

#define XF86XK_AudioRepeat   0x1008FF98

Definition at line 846 of file qkeymapper_x11.cpp.

◆ XF86XK_AudioRewind

#define XF86XK_AudioRewind   0x1008FF3E

Definition at line 769 of file qkeymapper_x11.cpp.

◆ XF86XK_AudioStop

#define XF86XK_AudioStop   0x1008FF15

Definition at line 732 of file qkeymapper_x11.cpp.

◆ XF86XK_Away

#define XF86XK_Away   0x1008FF8D

Definition at line 835 of file qkeymapper_x11.cpp.

◆ XF86XK_Back

#define XF86XK_Back   0x1008FF26

Definition at line 746 of file qkeymapper_x11.cpp.

◆ XF86XK_BackForward

#define XF86XK_BackForward   0x1008FF3F

Definition at line 770 of file qkeymapper_x11.cpp.

◆ XF86XK_Battery

#define XF86XK_Battery   0x1008FF93

Definition at line 841 of file qkeymapper_x11.cpp.

◆ XF86XK_Bluetooth

#define XF86XK_Bluetooth   0x1008FF94

Definition at line 842 of file qkeymapper_x11.cpp.

◆ XF86XK_Book

#define XF86XK_Book   0x1008FF52

Definition at line 789 of file qkeymapper_x11.cpp.

◆ XF86XK_BrightnessAdjust

#define XF86XK_BrightnessAdjust   0x1008FF3B

Definition at line 766 of file qkeymapper_x11.cpp.

◆ XF86XK_Calculater

#define XF86XK_Calculater   0x1008FF54

Definition at line 791 of file qkeymapper_x11.cpp.

◆ XF86XK_Calculator

#define XF86XK_Calculator   0x1008FF1D

Definition at line 740 of file qkeymapper_x11.cpp.

◆ XF86XK_Calendar

#define XF86XK_Calendar   0x1008FF20

Definition at line 743 of file qkeymapper_x11.cpp.

◆ XF86XK_CD

#define XF86XK_CD   0x1008FF53

Definition at line 790 of file qkeymapper_x11.cpp.

◆ XF86XK_Clear

#define XF86XK_Clear   0x1008FF55

Definition at line 792 of file qkeymapper_x11.cpp.

◆ XF86XK_ClearGrab

#define XF86XK_ClearGrab   0x1008FE21

Definition at line 793 of file qkeymapper_x11.cpp.

◆ XF86XK_Close

#define XF86XK_Close   0x1008FF56

Definition at line 794 of file qkeymapper_x11.cpp.

◆ XF86XK_Community

#define XF86XK_Community   0x1008FF3D

Definition at line 768 of file qkeymapper_x11.cpp.

◆ XF86XK_ContrastAdjust

#define XF86XK_ContrastAdjust   0x1008FF22

Definition at line 745 of file qkeymapper_x11.cpp.

◆ XF86XK_Copy

#define XF86XK_Copy   0x1008FF57

Definition at line 795 of file qkeymapper_x11.cpp.

◆ XF86XK_Cut

#define XF86XK_Cut   0x1008FF58

Definition at line 796 of file qkeymapper_x11.cpp.

◆ XF86XK_Display

#define XF86XK_Display   0x1008FF59

Definition at line 797 of file qkeymapper_x11.cpp.

◆ XF86XK_Documents

#define XF86XK_Documents   0x1008FF5B

Definition at line 799 of file qkeymapper_x11.cpp.

◆ XF86XK_DOS

#define XF86XK_DOS   0x1008FF5A

Definition at line 798 of file qkeymapper_x11.cpp.

◆ XF86XK_Eject

#define XF86XK_Eject   0x1008FF2C

Definition at line 752 of file qkeymapper_x11.cpp.

◆ XF86XK_Excel

#define XF86XK_Excel   0x1008FF5C

Definition at line 800 of file qkeymapper_x11.cpp.

◆ XF86XK_Explorer

#define XF86XK_Explorer   0x1008FF5D

Definition at line 801 of file qkeymapper_x11.cpp.

◆ XF86XK_Favorites

#define XF86XK_Favorites   0x1008FF30

Definition at line 756 of file qkeymapper_x11.cpp.

◆ XF86XK_Finance

#define XF86XK_Finance   0x1008FF3C

Definition at line 767 of file qkeymapper_x11.cpp.

◆ XF86XK_Forward

#define XF86XK_Forward   0x1008FF27

Definition at line 747 of file qkeymapper_x11.cpp.

◆ XF86XK_Game

#define XF86XK_Game   0x1008FF5E

Definition at line 802 of file qkeymapper_x11.cpp.

◆ XF86XK_Go

#define XF86XK_Go   0x1008FF5F

Definition at line 803 of file qkeymapper_x11.cpp.

◆ XF86XK_Hibernate

#define XF86XK_Hibernate   0x1008FFA8

Definition at line 855 of file qkeymapper_x11.cpp.

◆ XF86XK_History

#define XF86XK_History   0x1008FF37

Definition at line 762 of file qkeymapper_x11.cpp.

◆ XF86XK_HomePage

#define XF86XK_HomePage   0x1008FF18

Definition at line 735 of file qkeymapper_x11.cpp.

◆ XF86XK_HotLinks

#define XF86XK_HotLinks   0x1008FF3A

Definition at line 765 of file qkeymapper_x11.cpp.

◆ XF86XK_iTouch

#define XF86XK_iTouch   0x1008FF60

Definition at line 804 of file qkeymapper_x11.cpp.

◆ XF86XK_KbdBrightnessDown

#define XF86XK_KbdBrightnessDown   0x1008FF06

Definition at line 726 of file qkeymapper_x11.cpp.

◆ XF86XK_KbdBrightnessUp

#define XF86XK_KbdBrightnessUp   0x1008FF05

Definition at line 725 of file qkeymapper_x11.cpp.

◆ XF86XK_KbdLightOnOff

#define XF86XK_KbdLightOnOff   0x1008FF04

Definition at line 724 of file qkeymapper_x11.cpp.

◆ XF86XK_Launch0

#define XF86XK_Launch0   0x1008FF40

Definition at line 771 of file qkeymapper_x11.cpp.

◆ XF86XK_Launch1

#define XF86XK_Launch1   0x1008FF41

Definition at line 772 of file qkeymapper_x11.cpp.

◆ XF86XK_Launch2

#define XF86XK_Launch2   0x1008FF42

Definition at line 773 of file qkeymapper_x11.cpp.

◆ XF86XK_Launch3

#define XF86XK_Launch3   0x1008FF43

Definition at line 774 of file qkeymapper_x11.cpp.

◆ XF86XK_Launch4

#define XF86XK_Launch4   0x1008FF44

Definition at line 775 of file qkeymapper_x11.cpp.

◆ XF86XK_Launch5

#define XF86XK_Launch5   0x1008FF45

Definition at line 776 of file qkeymapper_x11.cpp.

◆ XF86XK_Launch6

#define XF86XK_Launch6   0x1008FF46

Definition at line 777 of file qkeymapper_x11.cpp.

◆ XF86XK_Launch7

#define XF86XK_Launch7   0x1008FF47

Definition at line 778 of file qkeymapper_x11.cpp.

◆ XF86XK_Launch8

#define XF86XK_Launch8   0x1008FF48

Definition at line 779 of file qkeymapper_x11.cpp.

◆ XF86XK_Launch9

#define XF86XK_Launch9   0x1008FF49

Definition at line 780 of file qkeymapper_x11.cpp.

◆ XF86XK_LaunchA

#define XF86XK_LaunchA   0x1008FF4A

Definition at line 781 of file qkeymapper_x11.cpp.

◆ XF86XK_LaunchB

#define XF86XK_LaunchB   0x1008FF4B

Definition at line 782 of file qkeymapper_x11.cpp.

◆ XF86XK_LaunchC

#define XF86XK_LaunchC   0x1008FF4C

Definition at line 783 of file qkeymapper_x11.cpp.

◆ XF86XK_LaunchD

#define XF86XK_LaunchD   0x1008FF4D

Definition at line 784 of file qkeymapper_x11.cpp.

◆ XF86XK_LaunchE

#define XF86XK_LaunchE   0x1008FF4E

Definition at line 785 of file qkeymapper_x11.cpp.

◆ XF86XK_LaunchF

#define XF86XK_LaunchF   0x1008FF4F

Definition at line 786 of file qkeymapper_x11.cpp.

◆ XF86XK_LightBulb

#define XF86XK_LightBulb   0x1008FF35

Definition at line 760 of file qkeymapper_x11.cpp.

◆ XF86XK_LogOff

#define XF86XK_LogOff   0x1008FF61

Definition at line 805 of file qkeymapper_x11.cpp.

◆ XF86XK_Mail

#define XF86XK_Mail   0x1008FF19

Definition at line 736 of file qkeymapper_x11.cpp.

◆ XF86XK_MailForward

#define XF86XK_MailForward   0x1008FF90

Definition at line 838 of file qkeymapper_x11.cpp.

◆ XF86XK_Market

#define XF86XK_Market   0x1008FF62

Definition at line 806 of file qkeymapper_x11.cpp.

◆ XF86XK_Meeting

#define XF86XK_Meeting   0x1008FF63

Definition at line 807 of file qkeymapper_x11.cpp.

◆ XF86XK_Memo

#define XF86XK_Memo   0x1008FF1E

Definition at line 741 of file qkeymapper_x11.cpp.

◆ XF86XK_MenuKB

#define XF86XK_MenuKB   0x1008FF65

Definition at line 808 of file qkeymapper_x11.cpp.

◆ XF86XK_MenuPB

#define XF86XK_MenuPB   0x1008FF66

Definition at line 809 of file qkeymapper_x11.cpp.

◆ XF86XK_Messenger

#define XF86XK_Messenger   0x1008FF8E

Definition at line 836 of file qkeymapper_x11.cpp.

◆ XF86XK_MonBrightnessDown

#define XF86XK_MonBrightnessDown   0x1008FF03

Definition at line 723 of file qkeymapper_x11.cpp.

◆ XF86XK_MonBrightnessUp

#define XF86XK_MonBrightnessUp   0x1008FF02

Definition at line 722 of file qkeymapper_x11.cpp.

◆ XF86XK_Music

#define XF86XK_Music   0x1008FF92

Definition at line 840 of file qkeymapper_x11.cpp.

◆ XF86XK_MyComputer

#define XF86XK_MyComputer   0x1008FF33

Definition at line 759 of file qkeymapper_x11.cpp.

◆ XF86XK_MySites

#define XF86XK_MySites   0x1008FF67

Definition at line 810 of file qkeymapper_x11.cpp.

◆ XF86XK_News

#define XF86XK_News   0x1008FF69

Definition at line 811 of file qkeymapper_x11.cpp.

◆ XF86XK_OfficeHome

#define XF86XK_OfficeHome   0x1008FF6A

Definition at line 812 of file qkeymapper_x11.cpp.

◆ XF86XK_OpenURL

#define XF86XK_OpenURL   0x1008FF38

Definition at line 763 of file qkeymapper_x11.cpp.

◆ XF86XK_Option

#define XF86XK_Option   0x1008FF6C

Definition at line 813 of file qkeymapper_x11.cpp.

◆ XF86XK_Paste

#define XF86XK_Paste   0x1008FF6D

Definition at line 814 of file qkeymapper_x11.cpp.

◆ XF86XK_Phone

#define XF86XK_Phone   0x1008FF6E

Definition at line 815 of file qkeymapper_x11.cpp.

◆ XF86XK_Pictures

#define XF86XK_Pictures   0x1008FF91

Definition at line 839 of file qkeymapper_x11.cpp.

◆ XF86XK_PowerDown

#define XF86XK_PowerDown   0x1008FF21

Definition at line 744 of file qkeymapper_x11.cpp.

◆ XF86XK_PowerOff

#define XF86XK_PowerOff   0x1008FF2A

Definition at line 750 of file qkeymapper_x11.cpp.

◆ XF86XK_Refresh

#define XF86XK_Refresh   0x1008FF29

Definition at line 749 of file qkeymapper_x11.cpp.

◆ XF86XK_Reload

#define XF86XK_Reload   0x1008FF73

Definition at line 817 of file qkeymapper_x11.cpp.

◆ XF86XK_Reply

#define XF86XK_Reply   0x1008FF72

Definition at line 816 of file qkeymapper_x11.cpp.

◆ XF86XK_RotateWindows

#define XF86XK_RotateWindows   0x1008FF74

Definition at line 818 of file qkeymapper_x11.cpp.

◆ XF86XK_RotationKB

#define XF86XK_RotationKB   0x1008FF76

Definition at line 820 of file qkeymapper_x11.cpp.

◆ XF86XK_RotationPB

#define XF86XK_RotationPB   0x1008FF75

Definition at line 819 of file qkeymapper_x11.cpp.

◆ XF86XK_Save

#define XF86XK_Save   0x1008FF77

Definition at line 821 of file qkeymapper_x11.cpp.

◆ XF86XK_ScreenSaver

#define XF86XK_ScreenSaver   0x1008FF2D

Definition at line 753 of file qkeymapper_x11.cpp.

◆ XF86XK_Search

#define XF86XK_Search   0x1008FF1B

Definition at line 738 of file qkeymapper_x11.cpp.

◆ XF86XK_Select

#define XF86XK_Select   0x1008FFA0

Definition at line 851 of file qkeymapper_x11.cpp.

◆ XF86XK_Send

#define XF86XK_Send   0x1008FF7B

Definition at line 822 of file qkeymapper_x11.cpp.

◆ XF86XK_Shop

#define XF86XK_Shop   0x1008FF36

Definition at line 761 of file qkeymapper_x11.cpp.

◆ XF86XK_Sleep

#define XF86XK_Sleep   0x1008FF2F

Definition at line 755 of file qkeymapper_x11.cpp.

◆ XF86XK_Spell

#define XF86XK_Spell   0x1008FF7C

Definition at line 823 of file qkeymapper_x11.cpp.

◆ XF86XK_SplitScreen

#define XF86XK_SplitScreen   0x1008FF7D

Definition at line 824 of file qkeymapper_x11.cpp.

◆ XF86XK_Standby

#define XF86XK_Standby   0x1008FF10

Definition at line 727 of file qkeymapper_x11.cpp.

◆ XF86XK_Start

#define XF86XK_Start   0x1008FF1A

Definition at line 737 of file qkeymapper_x11.cpp.

◆ XF86XK_Stop

#define XF86XK_Stop   0x1008FF28

Definition at line 748 of file qkeymapper_x11.cpp.

◆ XF86XK_Subtitle

#define XF86XK_Subtitle   0x1008FF9A

Definition at line 848 of file qkeymapper_x11.cpp.

◆ XF86XK_Support

#define XF86XK_Support   0x1008FF7E

Definition at line 825 of file qkeymapper_x11.cpp.

◆ XF86XK_Suspend

#define XF86XK_Suspend   0x1008FFA7

Definition at line 854 of file qkeymapper_x11.cpp.

◆ XF86XK_TaskPane

#define XF86XK_TaskPane   0x1008FF7F

Definition at line 826 of file qkeymapper_x11.cpp.

◆ XF86XK_Terminal

#define XF86XK_Terminal   0x1008FF80

Definition at line 827 of file qkeymapper_x11.cpp.

◆ XF86XK_Time

#define XF86XK_Time   0x1008FF9F

Definition at line 850 of file qkeymapper_x11.cpp.

◆ XF86XK_ToDoList

#define XF86XK_ToDoList   0x1008FF1F

Definition at line 742 of file qkeymapper_x11.cpp.

◆ XF86XK_Tools

#define XF86XK_Tools   0x1008FF81

Definition at line 828 of file qkeymapper_x11.cpp.

◆ XF86XK_TopMenu

#define XF86XK_TopMenu   0x1008FFA2

Definition at line 853 of file qkeymapper_x11.cpp.

◆ XF86XK_Travel

#define XF86XK_Travel   0x1008FF82

Definition at line 829 of file qkeymapper_x11.cpp.

◆ XF86XK_UWB

#define XF86XK_UWB   0x1008FF96

Definition at line 844 of file qkeymapper_x11.cpp.

◆ XF86XK_Video

#define XF86XK_Video   0x1008FF87

Definition at line 830 of file qkeymapper_x11.cpp.

◆ XF86XK_View

#define XF86XK_View   0x1008FFA1

Definition at line 852 of file qkeymapper_x11.cpp.

◆ XF86XK_WakeUp

#define XF86XK_WakeUp   0x1008FF2B

Definition at line 751 of file qkeymapper_x11.cpp.

◆ XF86XK_WebCam

#define XF86XK_WebCam   0x1008FF8F

Definition at line 837 of file qkeymapper_x11.cpp.

◆ XF86XK_WLAN

#define XF86XK_WLAN   0x1008FF95

Definition at line 843 of file qkeymapper_x11.cpp.

◆ XF86XK_Word

#define XF86XK_Word   0x1008FF89

Definition at line 831 of file qkeymapper_x11.cpp.

◆ XF86XK_WWW

#define XF86XK_WWW   0x1008FF2E

Definition at line 754 of file qkeymapper_x11.cpp.

◆ XF86XK_Xfer

#define XF86XK_Xfer   0x1008FF8A

Definition at line 832 of file qkeymapper_x11.cpp.

◆ XF86XK_ZoomIn

#define XF86XK_ZoomIn   0x1008FF8B

Definition at line 833 of file qkeymapper_x11.cpp.

◆ XF86XK_ZoomOut

#define XF86XK_ZoomOut   0x1008FF8C

Definition at line 834 of file qkeymapper_x11.cpp.

◆ XK_Codeinput

#define XK_Codeinput   0xFF37

Definition at line 681 of file qkeymapper_x11.cpp.

◆ XK_dead_hook

#define XK_dead_hook   0xFE61

Definition at line 673 of file qkeymapper_x11.cpp.

◆ XK_dead_horn

#define XK_dead_horn   0xFE62

Definition at line 677 of file qkeymapper_x11.cpp.

Referenced by translateKeySym().

◆ XK_ISO_Left_Tab

#define XK_ISO_Left_Tab   0xFE20

Definition at line 669 of file qkeymapper_x11.cpp.

Referenced by translateKey().

◆ XK_Kanji_Bangou

#define XK_Kanji_Bangou   0xFF37 /* same as codeinput */

Definition at line 685 of file qkeymapper_x11.cpp.

◆ XK_KOREAN

#define XK_KOREAN

Definition at line 58 of file qkeymapper_x11.cpp.

◆ XK_KP_Delete

#define XK_KP_Delete   0xFF9F

Definition at line 717 of file qkeymapper_x11.cpp.

◆ XK_KP_Down

#define XK_KP_Down   0xFF99

Definition at line 702 of file qkeymapper_x11.cpp.

◆ XK_KP_End

#define XK_KP_End   0xFF9C

Definition at line 711 of file qkeymapper_x11.cpp.

◆ XK_KP_Home

#define XK_KP_Home   0xFF95

Definition at line 690 of file qkeymapper_x11.cpp.

◆ XK_KP_Insert

#define XK_KP_Insert   0xFF9E

Definition at line 714 of file qkeymapper_x11.cpp.

◆ XK_KP_Left

#define XK_KP_Left   0xFF96

Definition at line 693 of file qkeymapper_x11.cpp.

◆ XK_KP_Next

#define XK_KP_Next   0xFF9B

Definition at line 708 of file qkeymapper_x11.cpp.

◆ XK_KP_Prior

#define XK_KP_Prior   0xFF9A

Definition at line 705 of file qkeymapper_x11.cpp.

◆ XK_KP_Right

#define XK_KP_Right   0xFF98

Definition at line 699 of file qkeymapper_x11.cpp.

◆ XK_KP_Up

#define XK_KP_Up   0xFF97

Definition at line 696 of file qkeymapper_x11.cpp.

◆ XK_LATIN1

#define XK_LATIN1

Definition at line 57 of file qkeymapper_x11.cpp.

◆ XK_MISCELLANY

#define XK_MISCELLANY

Definition at line 56 of file qkeymapper_x11.cpp.

◆ XK_XKB_KEYS

#define XK_XKB_KEYS

Definition at line 59 of file qkeymapper_x11.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MaxBits 

Definition at line 272 of file qkeymapper_x11.cpp.

272 { MaxBits = sizeof(uint) * 8 };
unsigned int uint
Definition: qglobal.h:996

◆ anonymous enum

anonymous enum
Enumerator
RulesFileIndex 
ModelIndex 
LayoutIndex 
VariantIndex 
OptionsIndex 

Definition at line 465 of file qkeymapper_x11.cpp.

Function Documentation

◆ q_getKeyboardLocale()

QLocale q_getKeyboardLocale ( const QByteArray layoutName,
const QByteArray variantName 
)

Definition at line 83 of file qkeymapper_x11.cpp.

Referenced by getFontSet(), and QXIMInputContext::QXIMInputContext().

84 {
85  int i = 0;
86  while (xkbLayoutData[i].layout != 0) {
87  if (layoutName == xkbLayoutData[i].layout && variantName == xkbLayoutData[i].variant)
89  ++i;
90  }
91  return QLocale::c();
92 }
QLocale::Language language
const char * layout
static QLocale c()
Returns a QLocale object initialized to the "C" locale.
Definition: qlocale.h:773
static struct @202 xkbLayoutData[]
const char * variant
QLocale::Country country

◆ qt_keypress_scanner()

static Bool qt_keypress_scanner ( Display ,
XEvent event,
XPointer  arg 
)
static

Definition at line 1613 of file qkeymapper_x11.cpp.

Referenced by qt_keyrelease_scanner().

1614 {
1615  if (event->type != XKeyPress && event->type != XKeyRelease)
1616  return false;
1617 
1619  if (data->error)
1620  return false;
1621 
1622  if (event->xkey.window != data->window ||
1623  event->xkey.keycode != data->keycode) {
1624  // deal breakers: key events in a different window or an event
1625  // with a different key code
1626  data->error = true;
1627  return false;
1628  }
1629 
1630  if (event->type == XKeyPress) {
1631  data->error = (! data->release || event->xkey.time - data->timestamp > 10);
1632  return (! data->error);
1633  }
1634 
1635  // must be XKeyRelease event
1636  if (data->release) {
1637  // found a second release
1638  data->error = true;
1639  return false;
1640  }
1641 
1642  // found a single release
1643  data->release = true;
1644  data->timestamp = event->xkey.time;
1645 
1646  return false;
1647 }
EventRef event
static const char * data(const QByteArray &arr)

◆ qt_keyrelease_scanner()

static Bool qt_keyrelease_scanner ( Display ,
XEvent event,
XPointer  arg 
)
static

Definition at line 1649 of file qkeymapper_x11.cpp.

1650 {
1651  const qt_auto_repeat_data *data = (const qt_auto_repeat_data *) arg;
1652  return (event->type == XKeyRelease &&
1653  event->xkey.window == data->window &&
1654  event->xkey.keycode == data->keycode);
1655 }
EventRef event
static const char * data(const QByteArray &arr)

◆ qt_sendSpontaneousEvent()

bool qt_sendSpontaneousEvent ( QObject ,
QEvent  
)

Definition at line 5779 of file qapplication.cpp.

Referenced by qt_keyrelease_scanner().

5780 {
5782 }
EventRef event
static bool sendSpontaneousEvent(QObject *receiver, QEvent *event)

◆ qt_XTranslateKey()

static int qt_XTranslateKey ( register QXCoreDesc *  dpy,
KeyCode  keycode,
register unsigned int  modifiers,
unsigned int *  modifiers_return,
KeySym *  keysym_return 
)
static

Definition at line 180 of file qkeymapper_x11.cpp.

185 {
186  int per;
187  register KeySym *syms;
188  KeySym sym, lsym, usym;
189 
190  if (! dpy->keysyms)
191  return 0;
192  *modifiers_return = ((ShiftMask|LockMask)
193  | dpy->mode_switch | dpy->num_lock);
194  if (((int)keycode < dpy->min_keycode) || ((int)keycode > dpy->max_keycode))
195  {
196  *keysym_return = NoSymbol;
197  return 1;
198  }
199  per = dpy->keysyms_per_keycode;
200  syms = &dpy->keysyms[(keycode - dpy->min_keycode) * per];
201  while ((per > 2) && (syms[per - 1] == NoSymbol))
202  per--;
203  if ((per > 2) && (modifiers & dpy->mode_switch)) {
204  syms += 2;
205  per -= 2;
206  }
207  if ((modifiers & dpy->num_lock) &&
208  (per > 1 && (IsKeypadKey(syms[1]) || IsPrivateKeypadKey(syms[1])))) {
209  if ((modifiers & ShiftMask) ||
210  ((modifiers & LockMask) && (dpy->lock_meaning == XK_Shift_Lock)))
211  *keysym_return = syms[0];
212  else
213  *keysym_return = syms[1];
214  } else if (!(modifiers & ShiftMask) &&
215  (!(modifiers & LockMask) || (dpy->lock_meaning == NoSymbol))) {
216  if ((per == 1) || (syms[1] == NoSymbol))
217  XConvertCase(syms[0], keysym_return, &usym);
218  else
219  *keysym_return = syms[0];
220  } else if (!(modifiers & LockMask) ||
221  (dpy->lock_meaning != XK_Caps_Lock)) {
222  if ((per == 1) || ((usym = syms[1]) == NoSymbol))
223  XConvertCase(syms[0], &lsym, &usym);
224  *keysym_return = usym;
225  } else {
226  if ((per == 1) || ((sym = syms[1]) == NoSymbol))
227  sym = syms[0];
228  XConvertCase(sym, &lsym, &usym);
229  if (!(modifiers & ShiftMask) && (sym != syms[0]) &&
230  ((sym != usym) || (lsym == usym)))
231  XConvertCase(syms[0], &lsym, &usym);
232  *keysym_return = usym;
233  }
234  if (*keysym_return == XK_VoidSymbol)
235  *keysym_return = NoSymbol;
236  return 1;
237 }
int keycode

◆ translateKeySym() [1/2]

static QString translateKeySym ( KeySym  keysym,
uint  xmodifiers,
int &  code,
Qt::KeyboardModifiers &  modifiers,
QByteArray chars,
int &  count 
)
static

Definition at line 1385 of file qkeymapper_x11.cpp.

1388 {
1389  // all keysyms smaller than 0xff00 are actally keys that can be mapped to unicode chars
1390 
1391  extern QTextCodec *qt_input_mapper; // from qapplication_x11.cpp
1392  QTextCodec *mapper = qt_input_mapper;
1393  QChar converted;
1394 
1395  if (count == 0 && keysym < 0xff00) {
1396  unsigned char byte3 = (unsigned char)(keysym >> 8);
1397  int mib = -1;
1398  switch(byte3) {
1399  case 0: // Latin 1
1400  case 1: // Latin 2
1401  case 2: //latin 3
1402  case 3: // latin4
1403  mib = byte3 + 4; break;
1404  case 5: // arabic
1405  mib = 82; break;
1406  case 12: // Hebrew
1407  mib = 85; break;
1408  case 13: // Thai
1409  mib = 2259; break;
1410  case 4: // kana
1411  case 6: // cyrillic
1412  case 7: // greek
1413  case 8: // technical, no mapping here at the moment
1414  case 9: // Special
1415  case 10: // Publishing
1416  case 11: // APL
1417  case 14: // Korean, no mapping
1418  mib = -1; // manual conversion
1419  mapper = 0;
1420 #if !defined(QT_NO_XIM)
1421  converted = keysymToUnicode(byte3, keysym & 0xff);
1422 #endif
1423  case 0x20:
1424  // currency symbols
1425  if (keysym >= 0x20a0 && keysym <= 0x20ac) {
1426  mib = -1; // manual conversion
1427  mapper = 0;
1428  converted = (uint)keysym;
1429  }
1430  break;
1431  default:
1432  break;
1433  }
1434  if (mib != -1) {
1435  mapper = QTextCodec::codecForMib(mib);
1436  if (chars.isEmpty())
1437  chars.resize(1);
1438  chars[0] = (unsigned char) (keysym & 0xff); // get only the fourth bit for conversion later
1439  count++;
1440  }
1441  } else if (keysym >= 0x1000000 && keysym <= 0x100ffff) {
1442  converted = (ushort) (keysym - 0x1000000);
1443  mapper = 0;
1444  }
1445  if (count < (int)chars.size()-1)
1446  chars[count] = '\0';
1447 
1448  QString text;
1449  if (!mapper && converted.unicode() != 0x0) {
1450  text = converted;
1451  } else if (!chars.isEmpty()) {
1452  // convert chars (8bit) to text (unicode).
1453  if (mapper)
1454  text = mapper->toUnicode(chars.data(), count, 0);
1455  if (text.isEmpty()) {
1456  // no mapper, or codec couldn't convert to unicode (this
1457  // can happen when running in the C locale or with no LANG
1458  // set). try converting from latin-1
1459  text = QString::fromLatin1(chars);
1460  }
1461  }
1462 
1463  modifiers = X11->translateModifiers(xmodifiers);
1464 
1465  // Commentary in X11/keysymdef says that X codes match ASCII, so it
1466  // is safe to use the locale functions to process X codes in ISO8859-1.
1467  //
1468  // This is mainly for compatibility - applications should not use the
1469  // Qt keycodes between 128 and 255, but should rather use the
1470  // QKeyEvent::text().
1471  //
1472  extern QTextCodec *qt_input_mapper; // from qapplication_x11.cpp
1473  if (keysym < 128 || (keysym < 256 && (!qt_input_mapper || qt_input_mapper->mibEnum()==4))) {
1474  // upper-case key, if known
1475  code = isprint((int)keysym) ? toupper((int)keysym) : 0;
1476  } else if (keysym >= XK_F1 && keysym <= XK_F35) {
1477  // function keys
1478  code = Qt::Key_F1 + ((int)keysym - XK_F1);
1479  } else if (keysym >= XK_KP_Space && keysym <= XK_KP_9) {
1480  if (keysym >= XK_KP_0) {
1481  // numeric keypad keys
1482  code = Qt::Key_0 + ((int)keysym - XK_KP_0);
1483  } else {
1484  code = translateKeySym(keysym);
1485  }
1486  modifiers |= Qt::KeypadModifier;
1487  } else if (text.length() == 1 && text.unicode()->unicode() > 0x1f && text.unicode()->unicode() != 0x7f && !(keysym >= XK_dead_grave && keysym <= XK_dead_horn)) {
1488  code = text.unicode()->toUpper().unicode();
1489  } else {
1490  // any other keys
1491  code = translateKeySym(keysym);
1492 
1493  if (code == Qt::Key_Tab && (modifiers & Qt::ShiftModifier)) {
1494  // map shift+tab to shift+backtab, QShortcutMap knows about it
1495  // and will handle it.
1496  code = Qt::Key_Backtab;
1497  text = QString();
1498  }
1499  }
1500 
1501  return text;
1502 }
char * data()
Returns a pointer to the data stored in the byte array.
Definition: qbytearray.h:429
ushort unicode() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: qchar.h:251
int length() const
Returns the number of characters in this string.
Definition: qstring.h:696
int keysym
#define XK_dead_horn
The QString class provides a Unicode character string.
Definition: qstring.h:83
#define X11
Definition: qt_x11_p.h:724
The QChar class provides a 16-bit Unicode character.
Definition: qchar.h:72
static QString translateKeySym(KeySym keysym, uint xmodifiers, int &code, Qt::KeyboardModifiers &modifiers, QByteArray &chars, int &count)
const QChar * unicode() const
Returns a &#39;\0&#39;-terminated Unicode representation of the string.
Definition: qstring.h:706
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Definition: qstring.h:704
QTextCodec * qt_input_mapper
virtual int mibEnum() const =0
Subclasses of QTextCodec must reimplement this function.
unsigned int uint
Definition: qglobal.h:996
int mib
QChar toUpper() const
Returns the uppercase equivalent if the character is lowercase or titlecase; otherwise returns the ch...
Definition: qchar.cpp:1287
static QTextCodec * codecForMib(int mib)
Returns the QTextCodec which matches the MIBenum mib.
QString toUnicode(const QByteArray &) const
Converts a from the encoding of this codec to Unicode, and returns the result in a QString...
static QChar keysymToUnicode(unsigned char byte3, unsigned char byte4)
unsigned short ushort
Definition: qglobal.h:995
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
Definition: qstring.cpp:4188
void resize(int size)
Sets the size of the byte array to size bytes.
int size() const
Returns the number of bytes in this byte array.
Definition: qbytearray.h:402
bool isEmpty() const
Returns true if the byte array has size 0; otherwise returns false.
Definition: qbytearray.h:421
The QTextCodec class provides conversions between text encodings.
Definition: qtextcodec.h:62
#define text
Definition: qobjectdefs.h:80

◆ translateKeySym() [2/2]

static int translateKeySym ( uint  key)
static

Definition at line 1202 of file qkeymapper_x11.cpp.

1203 {
1204  int code = -1;
1205  int i = 0; // any other keys
1206  while (KeyTbl[i]) {
1207  if (key == KeyTbl[i]) {
1208  code = (int)KeyTbl[i+1];
1209  break;
1210  }
1211  i += 2;
1212  }
1213  if (qt_meta_mask) {
1214  // translate Super/Hyper keys to Meta if we're using them as the MetaModifier
1215  if (qt_meta_mask == qt_super_mask && (code == Qt::Key_Super_L || code == Qt::Key_Super_R)) {
1216  code = Qt::Key_Meta;
1217  } else if (qt_meta_mask == qt_hyper_mask && (code == Qt::Key_Hyper_L || code == Qt::Key_Hyper_R)) {
1218  code = Qt::Key_Meta;
1219  }
1220  }
1221  return code;
1222 }
uchar qt_hyper_mask
static const unsigned int KeyTbl[]
uchar qt_super_mask
int key
uchar qt_meta_mask

Variable Documentation

◆ KeyTbl

const unsigned int KeyTbl[]
static

Definition at line 879 of file qkeymapper_x11.cpp.

Referenced by translateKeySym().

◆ qt_alt_mask

uchar qt_alt_mask

◆ qt_hyper_mask

uchar qt_hyper_mask

Definition at line 367 of file qapplication_x11.cpp.

Referenced by q_getKeyboardLocale(), and translateKeySym().

◆ qt_meta_mask

uchar qt_meta_mask

◆ qt_mode_switch_mask

uchar qt_mode_switch_mask

Definition at line 368 of file qapplication_x11.cpp.

Referenced by q_getKeyboardLocale(), and QX11Data::translateModifiers().

◆ qt_num_lock_mask

uchar qt_num_lock_mask = 0

Definition at line 101 of file qkeymapper_x11.cpp.

◆ qt_sm_blockUserInput

bool qt_sm_blockUserInput

◆ qt_super_mask

uchar qt_super_mask

Definition at line 366 of file qapplication_x11.cpp.

Referenced by q_getKeyboardLocale(), and translateKeySym().

◆ qt_use_rtl_extensions

bool qt_use_rtl_extensions

Definition at line 266 of file qapplication_win.cpp.

Referenced by translateKeySym().