KDEUI
Functions | |
uint | accelModMaskX () |
void | checkDisplay () |
bool | codeWinToKeyQt (uint sym, int *keyQt) |
bool | codeXToSym (uchar codeX, uint modX, uint *sym) |
uint | getModsRequired (uint sym) |
bool | initializeMods () |
static void | intializeKKeyLabels () |
bool | isShiftAsModifierAllowed (int keyQt) |
bool | keyboardHasMetaKey () |
bool | keyQtToCodeMac (int keyQt, QList< uint > &keyCodes) |
bool | keyQtToCodeWin (int keyQt, uint *sym) |
bool | keyQtToCodeX (int keyQt, int *keyCode) |
bool | keyQtToModMac (int keyQt, uint &mod) |
bool | keyQtToModWin (int keyQt, uint *mod) |
bool | keyQtToModX (int keyQt, uint *mod) |
bool | keyQtToSymMac (int keyQt, int &sym) |
bool | keyQtToSymX (int keyQt, int *sym) |
static QString | modToString (uint mod, bool bUserSpace) |
QString | modToStringUser (uint mod) |
bool | modWinToKeyQt (uint mod, int *keyQt) |
uint | modXAlt () |
uint | modXCtrl () |
uint | modXLock () |
uint | modXMeta () |
uint | modXModeSwitch () |
uint | modXNumLock () |
uint | modXScrollLock () |
uint | modXShift () |
bool | modXToQt (uint modX, int *modQt) |
uint | stringUserToMod (const QString &mod) |
bool | symXToKeyQt (uint sym, int *keyQt) |
bool | xEventToQt (XEvent *e, int *keyModQt) |
Variables | |
static uint | g_alt_mask |
static bool | g_bInitializedKKeyLabels |
static bool | g_bInitializedMods |
static bool | g_bMacLabels |
static uint | g_hyper_mask |
static uint | g_meta_mask |
static uint | g_modXModeSwitch |
static uint | g_modXNumLock |
static uint | g_modXScrollLock |
static ModInfo | g_rgModInfo [4] |
static const TransKey | g_rgQtToSymX [] |
static const SymName | g_rgSymNames [] |
static X11ModInfo | g_rgX11ModInfo [4] |
static uint | g_super_mask |
static const TransKey | KeyTbl [] |
static const int | MODE_SWITCH = 0x2000 |
Detailed Description
A collection of functions for the conversion of key presses and their modifiers from the window system specific format to the generic format and vice-versa.
Function Documentation
◆ accelModMaskX()
uint KKeyServer::accelModMaskX | ( | ) |
Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and Win (if available).
- See also
- modXShift()
- modXLock()
- modXCtrl()
- modXAlt()
- modXNumLock()
- modXWin()
- modXScrollLock()
Definition at line 811 of file kkeyserver_x11.cpp.
◆ checkDisplay()
|
inline |
Definition at line 478 of file kkeyserver_x11.cpp.
◆ codeWinToKeyQt()
bool KKeyServer::codeWinToKeyQt | ( | uint | sym, |
int * | keyQt | ||
) |
Definition at line 261 of file kkeyserver_win.cpp.
◆ codeXToSym()
bool KKeyServer::codeXToSym | ( | uchar | codeX, |
uint | modX, | ||
uint * | sym | ||
) |
Definition at line 793 of file kkeyserver_x11.cpp.
◆ getModsRequired()
uint KKeyServer::getModsRequired | ( | uint | sym | ) |
Definition at line 655 of file kkeyserver_x11.cpp.
◆ initializeMods()
bool KKeyServer::initializeMods | ( | ) |
Initialises the values to return for the mod*() functions below.
Called automatically by those functions if not already initialized.
Definition at line 498 of file kkeyserver_x11.cpp.
◆ intializeKKeyLabels()
|
static |
Definition at line 64 of file kkeyserver.cpp.
◆ isShiftAsModifierAllowed()
bool KKeyServer::isShiftAsModifierAllowed | ( | int | keyQt | ) |
Test if the shift modifier should be recorded for a given key.
For example, if shift+5 produces '' Qt wants ctrl+shift+5 recorded as ctrl+% and in that case this function would return false.
- Since
- 4.7.1
Definition at line 113 of file kkeyserver.cpp.
◆ keyboardHasMetaKey()
bool KKeyServer::keyboardHasMetaKey | ( | ) |
Returns true if the current keyboard layout supports the Meta key.
Specifically, whether the Super or Meta keys are assigned to an X modifier.
- Returns
- true if the keyboard has a Meta key
- See also
- modXMeta()
Definition at line 652 of file kkeyserver_x11.cpp.
◆ keyQtToCodeMac()
bool KKeyServer::keyQtToCodeMac | ( | int | keyQt, |
QList< uint > & | keyCodes | ||
) |
Extracts all the scancodes from the given Qt key.
The returned values can change if a different keyboard layout is selected.
- Parameters
-
keyQt the qt key code keyCodes if successful, a list of scancodes will be written here
- Returns
- true if successful, false otherwise
◆ keyQtToCodeWin()
bool KKeyServer::keyQtToCodeWin | ( | int | keyQt, |
uint * | sym | ||
) |
Extracts the symbol from the given Qt key and converts it to a Windows symbol.
- Parameters
-
keyQt the qt key code sym if successful, the symbol will be written here
- Returns
- true if successful, false otherwise
Definition at line 238 of file kkeyserver_win.cpp.
◆ keyQtToCodeX()
bool KKeyServer::keyQtToCodeX | ( | int | keyQt, |
int * | keyCode | ||
) |
Extracts the code from the given Qt key.
- Parameters
-
keyQt the qt key code keyCode if successful, the symbol will be written here
- Returns
- true if successful, false otherwise
Definition at line 686 of file kkeyserver_x11.cpp.
◆ keyQtToModMac()
bool KKeyServer::keyQtToModMac | ( | int | keyQt, |
uint & | mod | ||
) |
Extracts the modifiers from the given Qt key and converts them in a mask of OSX modifiers.
- Parameters
-
keyQt the qt key code mod if successful, the modifiers will be written here
- Returns
- true if successful, false otherwise
◆ keyQtToModWin()
bool KKeyServer::keyQtToModWin | ( | int | keyQt, |
uint * | mod | ||
) |
Extracts the modifiers from the given Qt key and converts them in a mask of Windows modifiers.
- Parameters
-
keyQt the qt key code mod if successful, the modifiers will be written here
- Returns
- true if successful, false otherwise
Definition at line 200 of file kkeyserver_win.cpp.
◆ keyQtToModX()
bool KKeyServer::keyQtToModX | ( | int | keyQt, |
uint * | mod | ||
) |
Extracts the modifiers from the given Qt key and converts them in a mask of X11 modifiers.
- Parameters
-
keyQt the qt key code mod if successful, the modifiers will be written here
- Returns
- true if successful, false otherwise
Definition at line 757 of file kkeyserver_x11.cpp.
◆ keyQtToSymMac()
bool KKeyServer::keyQtToSymMac | ( | int | keyQt, |
int & | sym | ||
) |
Extracts the symbol from the given Qt key, and converts it to an OSX symbol.
- Parameters
-
keyQt the qt key code sym if successful, the symbol will be written here
- Returns
- true if successful, false otherwise
◆ keyQtToSymX()
bool KKeyServer::keyQtToSymX | ( | int | keyQt, |
int * | sym | ||
) |
Extracts the symbol from the given Qt key and converts it to an X11 symbol + modifiers.
- Parameters
-
keyQt the qt key code sym if successful, the symbol will be written here
- Returns
- true if successful, false otherwise
Definition at line 706 of file kkeyserver_x11.cpp.
◆ modToString()
|
static |
Definition at line 80 of file kkeyserver.cpp.
◆ modToStringUser()
QString KKeyServer::modToStringUser | ( | uint | mod | ) |
Converts the mask of ORed KKey::ModFlag modifiers to a user-readable string.
- Parameters
-
mod the mask of ORed KKey::ModFlag modifiers
- Returns
- the user-readable string
Definition at line 98 of file kkeyserver.cpp.
◆ modWinToKeyQt()
bool KKeyServer::modWinToKeyQt | ( | uint | mod, |
int * | keyQt | ||
) |
Definition at line 219 of file kkeyserver_win.cpp.
◆ modXAlt()
uint KKeyServer::modXAlt | ( | ) |
Returns the X11 Alt (Mod1) modifier mask/flag.
- Returns
- the X11 Alt (Mod1) modifier mask/flag.
- See also
- accelModMaskX()
Definition at line 644 of file kkeyserver_x11.cpp.
◆ modXCtrl()
uint KKeyServer::modXCtrl | ( | ) |
Returns the X11 Ctrl modifier mask/flag.
- Returns
- the X11 Ctrl modifier mask/flag.
- See also
- accelModMaskX()
Definition at line 643 of file kkeyserver_x11.cpp.
◆ modXLock()
uint KKeyServer::modXLock | ( | ) |
Returns the X11 Lock modifier mask/flag.
- Returns
- the X11 Lock modifier mask/flag.
- See also
- accelModMaskX()
Definition at line 648 of file kkeyserver_x11.cpp.
◆ modXMeta()
uint KKeyServer::modXMeta | ( | ) |
Returns the X11 Win (Mod3) modifier mask/flag.
- Returns
- the X11 Win (Mod3) modifier mask/flag.
- See also
- keyboardHasWinKey()
- accelModMaskX()
Definition at line 645 of file kkeyserver_x11.cpp.
◆ modXModeSwitch()
uint KKeyServer::modXModeSwitch | ( | ) |
Returns the X11 Mode_switch modifier mask/flag.
- Returns
- the X11 Mode_switch modifier mask/flag.
- See also
- accelModMaskX()
Definition at line 650 of file kkeyserver_x11.cpp.
◆ modXNumLock()
uint KKeyServer::modXNumLock | ( | ) |
Returns the X11 NumLock modifier mask/flag.
- Returns
- the X11 NumLock modifier mask/flag.
- See also
- accelModMaskX()
Definition at line 647 of file kkeyserver_x11.cpp.
◆ modXScrollLock()
uint KKeyServer::modXScrollLock | ( | ) |
Returns the X11 ScrollLock modifier mask/flag.
- Returns
- the X11 ScrollLock modifier mask/flag.
- See also
- accelModMaskX()
Definition at line 649 of file kkeyserver_x11.cpp.
◆ modXShift()
uint KKeyServer::modXShift | ( | ) |
Returns the X11 Shift modifier mask/flag.
- Returns
- the X11 Shift modifier mask/flag.
- See also
- accelModMaskX()
Definition at line 642 of file kkeyserver_x11.cpp.
◆ modXToQt()
bool KKeyServer::modXToQt | ( | uint | modX, |
int * | modQt | ||
) |
Converts the mask of ORed X11 modifiers to a mask of ORed Qt key code modifiers.
- Parameters
-
modX the mask of X11 modifiers modQt the mask of Qt key code modifiers will be written here if successful
- Returns
- true if successful, false otherwise
Definition at line 777 of file kkeyserver_x11.cpp.
◆ stringUserToMod()
uint KKeyServer::stringUserToMod | ( | const QString & | mod | ) |
Converts the modifier given as user-readable string to KKey::ModFlag modifier, or 0.
Definition at line 103 of file kkeyserver.cpp.
◆ symXToKeyQt()
bool KKeyServer::symXToKeyQt | ( | uint | sym, |
int * | keyQt | ||
) |
Converts the given symbol to a Qt key code.
- Parameters
-
sym the symbol keyQt if successful, the qt key code will be written here
- Returns
- true if successful, false otherwise
Definition at line 730 of file kkeyserver_x11.cpp.
◆ xEventToQt()
bool KKeyServer::xEventToQt | ( | XEvent * | e, |
int * | keyModQt | ||
) |
Converts an X keypress event into a Qt key + modifier code.
- Parameters
-
e the X11 keypress event keyModQt the Qt keycode and mask of Qt key code modifiers will be written here if successful
- Returns
- true if successful, false otherwise
Definition at line 817 of file kkeyserver_x11.cpp.
Variable Documentation
◆ g_alt_mask
|
static |
Definition at line 496 of file kkeyserver_x11.cpp.
◆ g_bInitializedKKeyLabels
|
static |
Definition at line 61 of file kkeyserver.cpp.
◆ g_bInitializedMods
|
static |
Definition at line 495 of file kkeyserver_x11.cpp.
◆ g_bMacLabels
|
static |
Definition at line 62 of file kkeyserver.cpp.
◆ g_hyper_mask
|
static |
Definition at line 496 of file kkeyserver_x11.cpp.
◆ g_meta_mask
|
static |
Definition at line 496 of file kkeyserver_x11.cpp.
◆ g_modXModeSwitch
|
static |
Definition at line 496 of file kkeyserver_x11.cpp.
◆ g_modXNumLock
|
static |
Definition at line 496 of file kkeyserver_x11.cpp.
◆ g_modXScrollLock
|
static |
Definition at line 496 of file kkeyserver_x11.cpp.
◆ g_rgModInfo
|
static |
Definition at line 50 of file kkeyserver.cpp.
◆ g_rgQtToSymX
|
static |
Definition at line 119 of file kkeyserver_x11.cpp.
◆ g_rgSymNames
|
static |
Definition at line 93 of file kkeyserver_x11.cpp.
◆ g_rgX11ModInfo
|
static |
◆ g_super_mask
|
static |
Definition at line 496 of file kkeyserver_x11.cpp.
◆ KeyTbl
|
static |
Definition at line 33 of file kkeyserver_win.cpp.
◆ MODE_SWITCH
|
static |
Definition at line 32 of file kkeyserver_x11.h.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.