KKeyServer Namespace Reference
A collection of functions for the conversion of key presses and their modifiers from the window system (X11) specific format to the generic format and vice-versa. More...
Classes | |
struct | KKeyServer::Sym |
Represents a key symbol. More... | |
struct | KKeyServer::Key |
Represents a key press. More... | |
struct | KKeyServer::Variations |
TODO: please document this class. More... | |
Enumerations | |
enum | ExtraModFlag { MODE_SWITCH = 0x2000 } |
Functions | |
bool | initializeMods () |
void | initializeVariations () |
void | intializeKKeyLabels () |
uint | modX (KKey::ModFlag mod) |
bool | keyboardHasWinKey () |
uint | modXShift () |
uint | modXLock () |
uint | modXCtrl () |
uint | modXAlt () |
uint | modXNumLock () |
uint | modXWin () |
uint | modXScrollLock () |
uint | accelModMaskX () |
bool | keyQtToSym (int keyQt, uint &keySym) |
bool | keyQtToMod (int keyQt, uint &mod) |
bool | symToKeyQt (uint keySym, int &keyQt) |
bool | modToModQt (uint mod, int &modQt) |
bool | modToModX (uint mod, uint &modX) |
bool | modXToModQt (uint modX, int &modQt) |
bool | modXToMod (uint modX, uint &mod) |
bool | codeXToSym (uchar codeX, uint modX, uint &sym) |
QString | modToString (uint mod, bool bUserSpace) |
QString | modToStringInternal (uint mod) |
QString | modToStringUser (uint mod) |
bool | stringToSymMod (const QString &, uint &sym, uint &mod) |
void | keyQtToKeyX (uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX) |
Variables | |
ModInfo | g_rgModInfo [KKey::MOD_FLAG_COUNT] |
SymVariation | g_rgSymVariation [] |
const SymName | g_rgSymNames [] |
const TransKey | g_rgQtToSymX [] |
bool | g_bInitializedMods |
bool | g_bInitializedVariations |
bool | g_bInitializedKKeyLabels |
bool | g_bMacLabels |
uint | g_modXNumLock |
uint | g_modXScrollLock |
Detailed Description
A collection of functions for the conversion of key presses and their modifiers from the window system (X11) specific format to the generic format and vice-versa.Enumeration Type Documentation
|
Supplement enum KKey::ModFlag
Definition at line 18 of file kkeyserver_x11.h. |
Function Documentation
|
TODO: please document.
Definition at line 288 of file kkeyserver_x11.cpp. References modX(). Referenced by accelModMaskX(), keyboardHasWinKey(), modToModX(), modX(), modXNumLock(), modXScrollLock(), modXToMod(), modXToModQt(), and modXWin(). |
|
Returns the equivalent X modifier mask of the given modifier flag.
Definition at line 516 of file kkeyserver_x11.cpp. References initializeMods(). Referenced by initializeMods(), modToModX(), KKeyNative::modX(), modXToMod(), and modXToModQt(). |
|
Returns true if the current keyboard layout supports the Win key. Specifically, whether the Super or Meta keys are assigned to an X modifier.
Definition at line 528 of file kkeyserver_x11.cpp. References initializeMods(). Referenced by KKeyNative::keyboardHasWinKey(). |
|
Returns the X11 Shift modifier mask/flag.
Definition at line 529 of file kkeyserver_x11.cpp. |
|
Returns the X11 Lock modifier mask/flag.
Definition at line 530 of file kkeyserver_x11.cpp. Referenced by KKeyNative::modXLock(). |
|
Returns the X11 Ctrl modifier mask/flag.
Definition at line 531 of file kkeyserver_x11.cpp. |
|
Returns the X11 Alt (Mod1) modifier mask/flag.
Definition at line 532 of file kkeyserver_x11.cpp. |
|
Returns the X11 NumLock modifier mask/flag.
Definition at line 533 of file kkeyserver_x11.cpp. References initializeMods(). Referenced by KKeyNative::modXNumLock(). |
|
Returns the X11 Win (Mod3) modifier mask/flag.
Definition at line 534 of file kkeyserver_x11.cpp. References initializeMods(). |
|
Returns the X11 ScrollLock modifier mask/flag.
Definition at line 535 of file kkeyserver_x11.cpp. References initializeMods(). Referenced by KKeyNative::modXScrollLock(). |
|
Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and Win (if available).
Definition at line 537 of file kkeyserver_x11.cpp. References initializeMods(). Referenced by KKeyNative::accelModMaskX(). |
|
Extracts the symbol from the given Qt key and converts it to a symbol.
Definition at line 544 of file kkeyserver_x11.cpp. References KKeyServer::Sym::initQt(), and KKeyServer::Sym::m_sym. Referenced by KKey::init(). |
|
Extracts the modifiers from the given Qt key and converts them in a mask of ORed KKey::ModFlag modifiers.
Definition at line 554 of file kkeyserver_x11.cpp. Referenced by KKey::init(). |
|
Converts the given symbol to a Qt key code.
Definition at line 566 of file kkeyserver_x11.cpp. References KKeyServer::Sym::qt(). |
|
Converts the mask of ORed KKey::ModFlag modifiers to a mask of ORed Qt key code modifiers.
Definition at line 573 of file kkeyserver_x11.cpp. |
|
Converts the mask of ORed KKey::ModFlag modifiers to a mask of ORed X11 modifiers.
Definition at line 588 of file kkeyserver_x11.cpp. References initializeMods(), and modX(). Referenced by KKeyNative::init(). |
|
Converts the mask of ORed X11 modifiers to a mask of ORed Qt key code modifiers.
Definition at line 610 of file kkeyserver_x11.cpp. References initializeMods(), and modX(). Referenced by KKeyNative::keyCodeQt(). |
|
Converts the mask of ORed X11 modifiers to a mask of ORed KKey::ModFlag modifiers.
Definition at line 628 of file kkeyserver_x11.cpp. References initializeMods(), and modX(). Referenced by KKeyServer::Key::key(), and KKeyNative::key(). |
|
Converts a X11 key code and a mask of ORed X11 modifiers into a X11 symbol. converts it to a symbol.
Definition at line 641 of file kkeyserver_x11.cpp. Referenced by KKeyNative::init(). |
|
Converts the mask of ORed KKey::ModFlag modifiers to a user-readable string.
Definition at line 673 of file kkeyserver_x11.cpp. Referenced by KKey::modFlagLabel(), and KKey::toString(). |
Variable Documentation
|
Initial value: { { KKey::SHIFT, Qt::SHIFT, ShiftMask, I18N_NOOP("Shift"), QString() }, { KKey::CTRL, Qt::CTRL, ControlMask, I18N_NOOP("Ctrl"), QString() }, { KKey::ALT, Qt::ALT, Mod1Mask, I18N_NOOP("Alt"), QString() }, { KKey::WIN, KKey::QtWIN, Mod4Mask, I18N_NOOP("Win"), QString() } } Definition at line 70 of file kkeyserver_x11.cpp. |
|
Initial value: { { '/', XK_KP_Divide, false }, { '*', XK_KP_Multiply, false }, { '-', XK_KP_Subtract, false }, { '+', XK_KP_Add, false }, { XK_Return, XK_KP_Enter, false }, { 0, 0, false } } Definition at line 78 of file kkeyserver_x11.cpp. |
|
Initial value: { { XK_ISO_Left_Tab, "Backtab" }, { XK_BackSpace, I18N_NOOP("Backspace") }, { XK_Sys_Req, I18N_NOOP("SysReq") }, { XK_Caps_Lock, I18N_NOOP("CapsLock") }, { XK_Num_Lock, I18N_NOOP("NumLock") }, { XK_Scroll_Lock, I18N_NOOP("ScrollLock") }, { XK_Prior, I18N_NOOP("PageUp") }, { XK_Next, I18N_NOOP("PageDown") }, { 0, 0 } } Definition at line 89 of file kkeyserver_x11.cpp. |