23 #ifndef __KKEYNATIVE_H
24 #define __KKEYNATIVE_H
26 #include <tdeshortcut.h>
29 typedef union _XEvent XEvent;
32 class KKeyNativePrivate;
86 bool init(
const XEvent* xevent );
109 { init( key );
return *
this; }
130 operator KKey()
const {
return key(); }
177 {
return compare( key ) == 0; }
184 {
return compare( key ) != 0; }
191 {
return compare( key ) < 0; }
221 static uint accelModMaskX();
228 static uint modXNumLock();
235 static uint modXLock();
242 static uint modXScrollLock();
250 static uint modXModeSwitch();
254 uint m_code, m_mod, m_sym;
255 KKeyNativePrivate* d;
258 #endif // !__KKEYNATIVE_H
int compare(const KKeyNative &key) const
Compares this key with the given KKeyNative object.
uint code() const
The native keycode of the key.
bool isNull() const
Returns true if the key is null (after clear() or empty constructor).
bool init(const KKeyNative &key)
Copies the given key into this key.
Representation of a key in the format native of the windowing system (eg.
KKeyNative(const KKeyNative &)
Copy constructor.
A KKey object represents a single key with possible modifiers (Shift, Ctrl, Alt, Win).
KKeyNative()
Creates a new null KKey.
uint mod() const
The native modifier flags of the key.
uint sym() const
The native symbol (KeySym) of the key.
static bool keyboardHasWinKey()
Checks whether the keyboard has a Win key.
int keyCodeQt() const
Returns the qt key code.
void clear()
Clears the key.
ModFlag
Flags to represent the modifiers.
KKey key() const
Returns the KKey representation of this key.
bool init(const KKey &key)
Creates a new native key for the given KKey code.
KKeyNative(const KKey &key)
Creates a new native key for the given KKey code.