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;
Representation of a key in the format native of the windowing system (eg.
void clear()
Clears the key.
int compare(const KKeyNative &key) const
Compares this key with the given KKeyNative object.
KKeyNative(const KKeyNative &)
Copy constructor.
int keyCodeQt() const
Returns the qt key code.
bool isNull() const
Returns true if the key is null (after clear() or empty constructor).
KKey key() const
Returns the KKey representation of this key.
uint mod() const
The native modifier flags of the key.
uint code() const
The native keycode of the key.
uint sym() const
The native symbol (KeySym) of the key.
KKeyNative(const KKey &key)
Creates a new native key for the given KKey code.
bool init(const KKey &key)
Creates a new native key for the given KKey code.
bool init(const KKeyNative &key)
Copies the given key into this key.
KKeyNative()
Creates a new null KKey.
static bool keyboardHasWinKey()
Checks whether the keyboard has a Win key.
A KKey object represents a single key with possible modifiers (Shift, Ctrl, Alt, Win).
ModFlag
Flags to represent the modifiers.