KDECore
KKeyServer Namespace Reference
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. More...
Classes | |
| struct | Key |
| Represents a key press. More... | |
| struct | Sym |
| Represents a key symbol. More... | |
| struct | Variations |
| TODO: please document this class. More... | |
Enumerations | |
| enum | ExtraModFlag { MODE_SWITCH = 0x2000 } |
Functions | |
| uint | accelModMaskX () |
| bool | codeXToSym (uchar codeX, uint modX, uint &symX) |
| bool | initializeMods () |
| bool | keyboardHasWinKey () |
| void | keyQtToKeyX (uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX) |
| bool | keyQtToMod (int keyQt, uint &mod) |
| bool | keyQtToSym (int keyQt, uint &sym) |
| bool | modToModQt (uint mod, int &modQt) |
| bool | modToModX (uint mod, uint &modX) |
| QString | modToStringInternal (uint mod) |
| QString | modToStringUser (uint mod) |
| uint | modX (KKey::ModFlag modFlag) |
| uint | modXAlt () |
| uint | modXCtrl () |
| uint | modXLock () |
| uint | modXModeSwitch () |
| uint | modXNumLock () |
| uint | modXScrollLock () |
| uint | modXShift () |
| bool | modXToMod (uint modX, uint &mod) |
| bool | modXToModQt (uint modX, int &modQt) |
| uint | modXWin () |
| int | qtButtonStateToMod (Qt::ButtonState s) |
| bool | stringToSymMod (const QString &, uint &sym, uint &mod) |
| uint | stringUserToMod (const QString &mod) |
| bool | symToKeyQt (uint sym, int &keyQt) |
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.
Enumeration Type Documentation
Function Documentation
| uint KKeyServer::accelModMaskX | ( | ) |
Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and Win (if available).
| bool KKeyServer::codeXToSym | ( | uchar | codeX, | |
| uint | modX, | |||
| uint & | symX | |||
| ) |
Converts a X11 key code and a mask of ORed X11 modifiers into a X11 symbol.
converts it to a symbol.
- Parameters:
-
codeX the X11 key code modX the mask of ORed X11 modifiers symX if successful, the X11 symbol will be written here
- Returns:
- true if successful, false otherwise
- See also:
- Qt::Key
| bool KKeyServer::initializeMods | ( | ) |
TODO: please document.
| bool KKeyServer::keyboardHasWinKey | ( | ) |
| void KKeyServer::keyQtToKeyX | ( | uint | keyCombQt, | |
| unsigned char * | pKeyCodeX, | |||
| uint * | pKeySymX, | |||
| uint * | pKeyModX | |||
| ) |
For internal use only.
Unimplemented?
| bool KKeyServer::keyQtToMod | ( | int | keyQt, | |
| uint & | mod | |||
| ) |
Extracts the modifiers from the given Qt key and converts them in a mask of ORed KKey::ModFlag modifiers.
- Parameters:
-
keyQt the qt key code mod if successful, the modifiers will be written here
- Returns:
- true if successful, false otherwise
- See also:
- Qt::Key
| bool KKeyServer::keyQtToSym | ( | int | keyQt, | |
| uint & | sym | |||
| ) |
| bool KKeyServer::modToModQt | ( | uint | mod, | |
| int & | modQt | |||
| ) |
Converts the mask of ORed KKey::ModFlag modifiers to a mask of ORed Qt key code modifiers.
- Parameters:
-
mod the mask of KKey::ModFlag modifiers modQt the mask of Qt key code modifiers will be written here, if successful
- Returns:
- true if successful, false otherwise
- See also:
- Qt::Key
| bool KKeyServer::modToModX | ( | uint | mod, | |
| uint & | modX | |||
| ) |
Converts the mask of ORed KKey::ModFlag modifiers to a mask of ORed X11 modifiers.
- Parameters:
-
mod the mask of KKey::ModFlag modifiers modX the mask of X11 modifiers will be written here, if successful
- Returns:
- true if successful, false otherwise
- See also:
- KKey
| QString KKeyServer::modToStringInternal | ( | uint | mod | ) |
For internal use only.
| 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
| uint KKeyServer::modX | ( | KKey::ModFlag | modFlag | ) |
Returns the equivalent X modifier mask of the given modifier flag.
- Parameters:
-
modFlag the generic flags to check
- Returns:
- the window system specific flags
| uint KKeyServer::modXAlt | ( | ) |
Returns the X11 Alt (Mod1) modifier mask/flag.
- Returns:
- the X11 Alt (Mod1) modifier mask/flag.
- See also:
- accelModMaskX()
| uint KKeyServer::modXCtrl | ( | ) |
Returns the X11 Ctrl modifier mask/flag.
- Returns:
- the X11 Ctrl modifier mask/flag.
- See also:
- accelModMaskX()
| uint KKeyServer::modXLock | ( | ) |
Returns the X11 Lock modifier mask/flag.
- Returns:
- the X11 Lock modifier mask/flag.
- See also:
- accelModMaskX()
| uint KKeyServer::modXModeSwitch | ( | ) |
Returns the X11 Mode_switch modifier mask/flag.
- Returns:
- the X11 Mode_switch modifier mask/flag.
- See also:
- accelModMaskX()
- Since:
- 3.5
| uint KKeyServer::modXNumLock | ( | ) |
Returns the X11 NumLock modifier mask/flag.
- Returns:
- the X11 NumLock modifier mask/flag.
- See also:
- accelModMaskX()
| uint KKeyServer::modXScrollLock | ( | ) |
Returns the X11 ScrollLock modifier mask/flag.
- Returns:
- the X11 ScrollLock modifier mask/flag.
- See also:
- accelModMaskX()
| uint KKeyServer::modXShift | ( | ) |
Returns the X11 Shift modifier mask/flag.
- Returns:
- the X11 Shift modifier mask/flag.
- See also:
- accelModMaskX()
| bool KKeyServer::modXToMod | ( | uint | modX, | |
| uint & | mod | |||
| ) |
Converts the mask of ORed X11 modifiers to a mask of ORed KKey::ModFlag modifiers.
- Parameters:
-
modX the mask of X11 modifiers mod the mask of KKey::ModFlag modifiers will be written here, if successful
- Returns:
- true if successful, false otherwise
- See also:
- KKey
| bool KKeyServer::modXToModQt | ( | uint | modX, | |
| int & | modQt | |||
| ) |
| uint KKeyServer::modXWin | ( | ) |
Returns the X11 Win (Mod3) modifier mask/flag.
- Returns:
- the X11 Win (Mod3) modifier mask/flag.
- See also:
- keyboardHasWinKey()
| int KKeyServer::qtButtonStateToMod | ( | Qt::ButtonState | s | ) |
Converts the Qt-compatible button state to x11 modifier.
For internal use only.
Unimplemented?
| uint KKeyServer::stringUserToMod | ( | const QString & | mod | ) |
Converts the modifier given as user-readable string to KKey::ModFlag modifier, or 0.
For internal use only.
- Since:
- 3.5
| bool KKeyServer::symToKeyQt | ( | uint | sym, | |
| int & | keyQt | |||
| ) |
KDE 3.5 API Reference