KDECore
KKeyServer::Key Struct Reference
Represents a key press. More...
#include <kkeyserver_x11.h>
Public Types | |
enum | { CODE_FOR_QT = 256 } |
Public Member Functions | |
uint | code () const |
int | compare (const Key &key) const |
bool | init (const KKey &key, bool bQt) |
bool | isNative () const |
KKey | key () const |
int | keyCodeQt () const |
uint | mod () const |
bool | operator< (const Key &b) const |
Key & | operator= (const KKeyNative &key) |
bool | operator== (const Key &b) const |
void | setKeycodeQt (int keyQt) |
uint | sym () const |
Public Attributes | |
uint | m_code |
uint | m_mod |
uint | m_sym |
Detailed Description
Represents a key press.
- See also:
- KKey
Definition at line 137 of file kkeyserver_x11.h.
Member Enumeration Documentation
anonymous enum |
Member Function Documentation
uint KKeyServer::Key::code | ( | ) | const [inline] |
Returns the code of the key.
- Returns:
- the code of the key
Definition at line 174 of file kkeyserver_x11.h.
int KKeyServer::Key::compare | ( | const Key & | key | ) | const |
Compares this key with the given Key object.
Returns a negative number if the given Key is larger, 0 if they are equal and a positive number this Key is larger. The returned value is the difference between the symbol, modifier or code, whatever is non-zero first.
- Parameters:
-
key the key to compare with this key
bool KKeyServer::Key::isNative | ( | ) | const [inline] |
Checks whether the key code is a native code.
- Returns:
- true if native code of the window system, false if it is a Qt keycode
- See also:
- Qt::Key
Definition at line 168 of file kkeyserver_x11.h.
int KKeyServer::Key::keyCodeQt | ( | ) | const [inline] |
uint KKeyServer::Key::mod | ( | ) | const [inline] |
Returns the modifiers of the key.
- Returns:
- the modifiers of the key
Definition at line 180 of file kkeyserver_x11.h.
Compares the symbol, modifiers and code of both keys.
- See also:
- compare()
Definition at line 231 of file kkeyserver_x11.h.
Key& KKeyServer::Key::operator= | ( | const KKeyNative & | key | ) |
Compares the symbol, modifiers and code of both keys.
- See also:
- compare()
Definition at line 224 of file kkeyserver_x11.h.
void KKeyServer::Key::setKeycodeQt | ( | int | keyQt | ) | [inline] |
Sets the qt key code.
- Parameters:
-
keyQt the qt key code
Definition at line 198 of file kkeyserver_x11.h.
uint KKeyServer::Key::sym | ( | ) | const [inline] |
Returns the symbol of the key.
- Returns:
- the symbol of the key
Definition at line 186 of file kkeyserver_x11.h.
Member Data Documentation
The documentation for this struct was generated from the following file: