|
|
@ -44,7 +44,7 @@ namespace KKeyServer
|
|
|
|
* @see KKey
|
|
|
|
* @see KKey
|
|
|
|
* @see KKeyServer
|
|
|
|
* @see KKeyServer
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
struct KDECORE_EXPORT Sym
|
|
|
|
struct TDECORE_EXPORT Sym
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
/// the actual value of the symbol
|
|
|
|
/// the actual value of the symbol
|
|
|
@ -134,7 +134,7 @@ namespace KKeyServer
|
|
|
|
* Represents a key press.
|
|
|
|
* Represents a key press.
|
|
|
|
* @see KKey
|
|
|
|
* @see KKey
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
struct KDECORE_EXPORT Key
|
|
|
|
struct TDECORE_EXPORT Key
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/// Code for native Keys in Qt
|
|
|
|
/// Code for native Keys in Qt
|
|
|
|
enum { CODE_FOR_QT = 256 };
|
|
|
|
enum { CODE_FOR_QT = 256 };
|
|
|
@ -241,7 +241,7 @@ namespace KKeyServer
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* TODO: please document this class
|
|
|
|
* TODO: please document this class
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
struct KDECORE_EXPORT Variations
|
|
|
|
struct TDECORE_EXPORT Variations
|
|
|
|
{
|
|
|
|
{
|
|
|
|
enum { MAX_VARIATIONS = 4 };
|
|
|
|
enum { MAX_VARIATIONS = 4 };
|
|
|
|
|
|
|
|
|
|
|
@ -257,14 +257,14 @@ namespace KKeyServer
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// TODO: please document
|
|
|
|
/// TODO: please document
|
|
|
|
KDECORE_EXPORT bool initializeMods();
|
|
|
|
TDECORE_EXPORT bool initializeMods();
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Returns the equivalent X modifier mask of the given modifier flag.
|
|
|
|
* Returns the equivalent X modifier mask of the given modifier flag.
|
|
|
|
* @param modFlag the generic flags to check
|
|
|
|
* @param modFlag the generic flags to check
|
|
|
|
* @return the window system specific flags
|
|
|
|
* @return the window system specific flags
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
KDECORE_EXPORT uint modX( KKey::ModFlag modFlag );
|
|
|
|
TDECORE_EXPORT uint modX( KKey::ModFlag modFlag );
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Returns true if the current keyboard layout supports the Win key.
|
|
|
|
* Returns true if the current keyboard layout supports the Win key.
|
|
|
@ -272,42 +272,42 @@ namespace KKeyServer
|
|
|
|
* @return true if the keyboard has a Win key
|
|
|
|
* @return true if the keyboard has a Win key
|
|
|
|
* @see modXWin()
|
|
|
|
* @see modXWin()
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
KDECORE_EXPORT bool keyboardHasWinKey();
|
|
|
|
TDECORE_EXPORT bool keyboardHasWinKey();
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Returns the X11 Shift modifier mask/flag.
|
|
|
|
* Returns the X11 Shift modifier mask/flag.
|
|
|
|
* @return the X11 Shift modifier mask/flag.
|
|
|
|
* @return the X11 Shift modifier mask/flag.
|
|
|
|
* @see accelModMaskX()
|
|
|
|
* @see accelModMaskX()
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
KDECORE_EXPORT uint modXShift();
|
|
|
|
TDECORE_EXPORT uint modXShift();
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Returns the X11 Lock modifier mask/flag.
|
|
|
|
* Returns the X11 Lock modifier mask/flag.
|
|
|
|
* @return the X11 Lock modifier mask/flag.
|
|
|
|
* @return the X11 Lock modifier mask/flag.
|
|
|
|
* @see accelModMaskX()
|
|
|
|
* @see accelModMaskX()
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
KDECORE_EXPORT uint modXLock();
|
|
|
|
TDECORE_EXPORT uint modXLock();
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Returns the X11 Ctrl modifier mask/flag.
|
|
|
|
* Returns the X11 Ctrl modifier mask/flag.
|
|
|
|
* @return the X11 Ctrl modifier mask/flag.
|
|
|
|
* @return the X11 Ctrl modifier mask/flag.
|
|
|
|
* @see accelModMaskX()
|
|
|
|
* @see accelModMaskX()
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
KDECORE_EXPORT uint modXCtrl();
|
|
|
|
TDECORE_EXPORT uint modXCtrl();
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Returns the X11 Alt (Mod1) modifier mask/flag.
|
|
|
|
* Returns the X11 Alt (Mod1) modifier mask/flag.
|
|
|
|
* @return the X11 Alt (Mod1) modifier mask/flag.
|
|
|
|
* @return the X11 Alt (Mod1) modifier mask/flag.
|
|
|
|
* @see accelModMaskX()
|
|
|
|
* @see accelModMaskX()
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
KDECORE_EXPORT uint modXAlt();
|
|
|
|
TDECORE_EXPORT uint modXAlt();
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Returns the X11 NumLock modifier mask/flag.
|
|
|
|
* Returns the X11 NumLock modifier mask/flag.
|
|
|
|
* @return the X11 NumLock modifier mask/flag.
|
|
|
|
* @return the X11 NumLock modifier mask/flag.
|
|
|
|
* @see accelModMaskX()
|
|
|
|
* @see accelModMaskX()
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
KDECORE_EXPORT uint modXNumLock();
|
|
|
|
TDECORE_EXPORT uint modXNumLock();
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Returns the X11 Win (Mod3) modifier mask/flag.
|
|
|
|
* Returns the X11 Win (Mod3) modifier mask/flag.
|
|
|
@ -315,14 +315,14 @@ namespace KKeyServer
|
|
|
|
* @see keyboardHasWinKey()
|
|
|
|
* @see keyboardHasWinKey()
|
|
|
|
* @see accelModMaskX()
|
|
|
|
* @see accelModMaskX()
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
KDECORE_EXPORT uint modXWin();
|
|
|
|
TDECORE_EXPORT uint modXWin();
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Returns the X11 ScrollLock modifier mask/flag.
|
|
|
|
* Returns the X11 ScrollLock modifier mask/flag.
|
|
|
|
* @return the X11 ScrollLock modifier mask/flag.
|
|
|
|
* @return the X11 ScrollLock modifier mask/flag.
|
|
|
|
* @see accelModMaskX()
|
|
|
|
* @see accelModMaskX()
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
KDECORE_EXPORT uint modXScrollLock();
|
|
|
|
TDECORE_EXPORT uint modXScrollLock();
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Returns the X11 Mode_switch modifier mask/flag.
|
|
|
|
* Returns the X11 Mode_switch modifier mask/flag.
|
|
|
@ -330,7 +330,7 @@ namespace KKeyServer
|
|
|
|
* @see accelModMaskX()
|
|
|
|
* @see accelModMaskX()
|
|
|
|
* @since 3.5
|
|
|
|
* @since 3.5
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
KDECORE_EXPORT uint modXModeSwitch();
|
|
|
|
TDECORE_EXPORT uint modXModeSwitch();
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
|
|
|
|
* Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
|
|
|
@ -343,7 +343,7 @@ namespace KKeyServer
|
|
|
|
* @see modXWin()
|
|
|
|
* @see modXWin()
|
|
|
|
* @see modXScrollLock()
|
|
|
|
* @see modXScrollLock()
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
KDECORE_EXPORT uint accelModMaskX();
|
|
|
|
TDECORE_EXPORT uint accelModMaskX();
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Extracts the symbol from the given Qt key and
|
|
|
|
* Extracts the symbol from the given Qt key and
|
|
|
@ -354,7 +354,7 @@ namespace KKeyServer
|
|
|
|
* @see Qt::Key
|
|
|
|
* @see Qt::Key
|
|
|
|
* @see Sym
|
|
|
|
* @see Sym
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
KDECORE_EXPORT bool keyQtToSym( int keyQt, uint& sym );
|
|
|
|
TDECORE_EXPORT bool keyQtToSym( int keyQt, uint& sym );
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Extracts the modifiers from the given Qt key and
|
|
|
|
* Extracts the modifiers from the given Qt key and
|
|
|
@ -364,7 +364,7 @@ namespace KKeyServer
|
|
|
|
* @return true if successful, false otherwise
|
|
|
|
* @return true if successful, false otherwise
|
|
|
|
* @see Qt::Key
|
|
|
|
* @see Qt::Key
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
KDECORE_EXPORT bool keyQtToMod( int keyQt, uint& mod );
|
|
|
|
TDECORE_EXPORT bool keyQtToMod( int keyQt, uint& mod );
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Converts the given symbol to a Qt key code.
|
|
|
|
* Converts the given symbol to a Qt key code.
|
|
|
@ -374,7 +374,7 @@ namespace KKeyServer
|
|
|
|
* @see Qt::Key
|
|
|
|
* @see Qt::Key
|
|
|
|
* @see Sym
|
|
|
|
* @see Sym
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
KDECORE_EXPORT bool symToKeyQt( uint sym, int& keyQt );
|
|
|
|
TDECORE_EXPORT bool symToKeyQt( uint sym, int& keyQt );
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Converts the mask of ORed KKey::ModFlag modifiers to
|
|
|
|
* Converts the mask of ORed KKey::ModFlag modifiers to
|
|
|
@ -386,7 +386,7 @@ namespace KKeyServer
|
|
|
|
* @see Qt::Key
|
|
|
|
* @see Qt::Key
|
|
|
|
* @see KKey
|
|
|
|
* @see KKey
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
KDECORE_EXPORT bool modToModQt( uint mod, int& modQt );
|
|
|
|
TDECORE_EXPORT bool modToModQt( uint mod, int& modQt );
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Converts the mask of ORed KKey::ModFlag modifiers to
|
|
|
|
* Converts the mask of ORed KKey::ModFlag modifiers to
|
|
|
@ -397,7 +397,7 @@ namespace KKeyServer
|
|
|
|
* @return true if successful, false otherwise
|
|
|
|
* @return true if successful, false otherwise
|
|
|
|
* @see KKey
|
|
|
|
* @see KKey
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
KDECORE_EXPORT bool modToModX( uint mod, uint& modX );
|
|
|
|
TDECORE_EXPORT bool modToModX( uint mod, uint& modX );
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Converts the mask of ORed X11 modifiers to
|
|
|
|
* Converts the mask of ORed X11 modifiers to
|
|
|
@ -409,12 +409,12 @@ namespace KKeyServer
|
|
|
|
* @see Qt::Key
|
|
|
|
* @see Qt::Key
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
//wrapped for win32
|
|
|
|
//wrapped for win32
|
|
|
|
KDECORE_EXPORT bool modXToModQt( uint modX, int& modQt );
|
|
|
|
TDECORE_EXPORT bool modXToModQt( uint modX, int& modQt );
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Converts the Qt-compatible button state to x11 modifier.
|
|
|
|
* Converts the Qt-compatible button state to x11 modifier.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
KDECORE_EXPORT int qtButtonStateToMod( Qt::ButtonState s );
|
|
|
|
TDECORE_EXPORT int qtButtonStateToMod( Qt::ButtonState s );
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Converts the mask of ORed X11 modifiers to
|
|
|
|
* Converts the mask of ORed X11 modifiers to
|
|
|
@ -425,7 +425,7 @@ namespace KKeyServer
|
|
|
|
* @return true if successful, false otherwise
|
|
|
|
* @return true if successful, false otherwise
|
|
|
|
* @see KKey
|
|
|
|
* @see KKey
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
KDECORE_EXPORT bool modXToMod( uint modX, uint& mod );
|
|
|
|
TDECORE_EXPORT bool modXToMod( uint modX, uint& mod );
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Converts a X11 key code and a mask of ORed X11 modifiers
|
|
|
|
* Converts a X11 key code and a mask of ORed X11 modifiers
|
|
|
@ -438,12 +438,12 @@ namespace KKeyServer
|
|
|
|
* @see Qt::Key
|
|
|
|
* @see Qt::Key
|
|
|
|
* @see Sym
|
|
|
|
* @see Sym
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
KDECORE_EXPORT bool codeXToSym( uchar codeX, uint modX, uint& symX );
|
|
|
|
TDECORE_EXPORT bool codeXToSym( uchar codeX, uint modX, uint& symX );
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @internal
|
|
|
|
* @internal
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
KDECORE_EXPORT QString modToStringInternal( uint mod );
|
|
|
|
TDECORE_EXPORT QString modToStringInternal( uint mod );
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Converts the mask of ORed KKey::ModFlag modifiers to a
|
|
|
|
* Converts the mask of ORed KKey::ModFlag modifiers to a
|
|
|
@ -451,7 +451,7 @@ namespace KKeyServer
|
|
|
|
* @param mod the mask of ORed KKey::ModFlag modifiers
|
|
|
|
* @param mod the mask of ORed KKey::ModFlag modifiers
|
|
|
|
* @return the user-readable string
|
|
|
|
* @return the user-readable string
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
KDECORE_EXPORT QString modToStringUser( uint mod );
|
|
|
|
TDECORE_EXPORT QString modToStringUser( uint mod );
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Converts the modifier given as user-readable string
|
|
|
|
* Converts the modifier given as user-readable string
|
|
|
@ -459,19 +459,19 @@ namespace KKeyServer
|
|
|
|
* @internal
|
|
|
|
* @internal
|
|
|
|
* @since 3.5
|
|
|
|
* @since 3.5
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
KDECORE_EXPORT uint stringUserToMod( const QString& mod );
|
|
|
|
TDECORE_EXPORT uint stringUserToMod( const QString& mod );
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @internal
|
|
|
|
* @internal
|
|
|
|
* Unimplemented?
|
|
|
|
* Unimplemented?
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
KDECORE_EXPORT bool stringToSymMod( const QString&, uint& sym, uint& mod );
|
|
|
|
TDECORE_EXPORT bool stringToSymMod( const QString&, uint& sym, uint& mod );
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @internal
|
|
|
|
* @internal
|
|
|
|
* Unimplemented?
|
|
|
|
* Unimplemented?
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
KDECORE_EXPORT void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
|
|
|
|
TDECORE_EXPORT void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif // !_KKEYSERVER_X11_H
|
|
|
|
#endif // !_KKEYSERVER_X11_H
|
|
|
|