.TH "KKeyServer" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdecore Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KKeyServer \- 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.  

.PP
.SH SYNOPSIS
.br
.PP
.SS "Classes"

.in +1c
.ti -1c
.RI "struct \fBSym\fP"
.br
.RI "\fIRepresents a key symbol. \fP"
.ti -1c
.RI "struct \fBKey\fP"
.br
.RI "\fIRepresents a key press. \fP"
.ti -1c
.RI "struct \fBVariations\fP"
.br
.RI "\fITODO: please document this class. \fP"
.in -1c
.SS "Enumerations"

.in +1c
.ti -1c
.RI "enum \fBExtraModFlag\fP { \fBMODE_SWITCH\fP =  0x2000 }"
.br
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "bool \fBinitializeMods\fP ()"
.br
.ti -1c
.RI "static void \fBinitializeVariations\fP ()"
.br
.ti -1c
.RI "static void \fBintializeKKeyLabels\fP ()"
.br
.ti -1c
.RI "uint \fBmodX\fP (\fBKKey::ModFlag\fP mod)"
.br
.ti -1c
.RI "bool \fBkeyboardHasWinKey\fP ()"
.br
.ti -1c
.RI "uint \fBmodXShift\fP ()"
.br
.ti -1c
.RI "uint \fBmodXLock\fP ()"
.br
.ti -1c
.RI "uint \fBmodXCtrl\fP ()"
.br
.ti -1c
.RI "uint \fBmodXAlt\fP ()"
.br
.ti -1c
.RI "uint \fBmodXNumLock\fP ()"
.br
.ti -1c
.RI "uint \fBmodXWin\fP ()"
.br
.ti -1c
.RI "uint \fBmodXScrollLock\fP ()"
.br
.ti -1c
.RI "uint \fBmodXModeSwitch\fP ()"
.br
.ti -1c
.RI "uint \fBaccelModMaskX\fP ()"
.br
.ti -1c
.RI "bool \fBkeyQtToSym\fP (int keyQt, uint &keySym)"
.br
.ti -1c
.RI "bool \fBkeyQtToMod\fP (int keyQt, uint &mod)"
.br
.ti -1c
.RI "bool \fBsymToKeyQt\fP (uint keySym, int &keyQt)"
.br
.ti -1c
.RI "bool \fBmodToModQt\fP (uint mod, int &modQt)"
.br
.ti -1c
.RI "bool \fBmodToModX\fP (uint mod, uint &modX)"
.br
.ti -1c
.RI "bool \fBmodXToModQt\fP (uint modX, int &modQt)"
.br
.ti -1c
.RI "bool \fBmodXToMod\fP (uint modX, uint &mod)"
.br
.ti -1c
.RI "bool \fBcodeXToSym\fP (uchar codeX, uint modX, uint &sym)"
.br
.ti -1c
.RI "static \fBQString\fP \fBmodToString\fP (uint mod, bool bUserSpace)"
.br
.ti -1c
.RI "\fBQString\fP \fBmodToStringInternal\fP (uint mod)"
.br
.ti -1c
.RI "\fBQString\fP \fBmodToStringUser\fP (uint mod)"
.br
.ti -1c
.RI "KDECORE_EXPORT int \fBqtButtonStateToMod\fP (Qt::ButtonState s)"
.br
.ti -1c
.RI "KDECORE_EXPORT bool \fBstringToSymMod\fP (const \fBQString\fP &, uint &sym, uint &mod)"
.br
.ti -1c
.RI "KDECORE_EXPORT void \fBkeyQtToKeyX\fP (uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX)"
.br
.in -1c
.SS "Variables"

.in +1c
.ti -1c
.RI "static ModInfo \fBg_rgModInfo\fP [KKey::MOD_FLAG_COUNT]"
.br
.ti -1c
.RI "static const SymName \fBg_rgSymNames\fP []"
.br
.ti -1c
.RI "static SymVariation \fBg_rgSymVariation\fP []"
.br
.ti -1c
.RI "static const TransKey \fBg_rgQtToSymX\fP []"
.br
.ti -1c
.RI "static bool \fBg_bInitializedMods\fP"
.br
.ti -1c
.RI "static bool \fBg_bInitializedVariations\fP"
.br
.ti -1c
.RI "static bool \fBg_bInitializedKKeyLabels\fP"
.br
.ti -1c
.RI "static bool \fBg_bMacLabels\fP"
.br
.ti -1c
.RI "static uint \fBg_modXNumLock\fP"
.br
.ti -1c
.RI "static uint \fBg_modXScrollLock\fP"
.br
.ti -1c
.RI "static uint \fBg_modXModeSwitch\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
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. 
.SH "Enumeration Type Documentation"
.PP 
.SS "enum \fBKKeyServer::ExtraModFlag\fP"
.PP
Supplement enum \fBKKey::ModFlag\fP 
.PP
\fBSince:\fP
.RS 4
3.1. 
.RE
.PP

.PP
Definition at line 40 of file kkeyserver_x11.h.
.SH "Function Documentation"
.PP 
.SS "KDECORE_EXPORT bool KKeyServer::initializeMods ()"
.PP
TODO: please document. 
.PP
Definition at line 329 of file kkeyserver_x11.cpp.
.PP
References endl(), modX(), and QString::number().
.PP
Referenced by accelModMaskX(), keyboardHasWinKey(), modToModX(), modX(), modXModeSwitch(), modXNumLock(), modXScrollLock(), modXToMod(), modXToModQt(), and modXWin().
.SS "KDECORE_EXPORT uint KKeyServer::modX (\fBKKey::ModFlag\fP modFlag)"
.PP
Returns the equivalent X modifier mask of the given modifier flag. 
.PP
\fBParameters:\fP
.RS 4
\fImodFlag\fP the generic flags to check 
.RE
.PP
\fBReturns:\fP
.RS 4
the window system specific flags
.RE
.PP

.PP
Definition at line 593 of file kkeyserver_x11.cpp.
.PP
References initializeMods().
.PP
Referenced by codeXToSym(), initializeMods(), modToModX(), KKeyNative::modX(), modXToMod(), and modXToModQt().
.SS "KDECORE_EXPORT bool KKeyServer::keyboardHasWinKey ()"
.PP
Returns true if the current keyboard layout supports the Win key. 
.PP
Specifically, whether the Super or Meta keys are assigned to an X modifier. 
.PP
\fBReturns:\fP
.RS 4
true if the keyboard has a Win key 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBmodXWin()\fP
.RE
.PP

.PP
Definition at line 605 of file kkeyserver_x11.cpp.
.PP
References initializeMods().
.PP
Referenced by KKeyNative::keyboardHasWinKey().
.SS "KDECORE_EXPORT uint KKeyServer::modXShift ()"
.PP
Returns the X11 Shift modifier mask/flag. 
.PP
\fBReturns:\fP
.RS 4
the X11 Shift modifier mask/flag. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBaccelModMaskX()\fP
.RE
.PP

.PP
Definition at line 606 of file kkeyserver_x11.cpp.
.SS "KDECORE_EXPORT uint KKeyServer::modXLock ()"
.PP
Returns the X11 Lock modifier mask/flag. 
.PP
\fBReturns:\fP
.RS 4
the X11 Lock modifier mask/flag. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBaccelModMaskX()\fP
.RE
.PP

.PP
Definition at line 607 of file kkeyserver_x11.cpp.
.PP
Referenced by KKeyNative::modXLock().
.SS "KDECORE_EXPORT uint KKeyServer::modXCtrl ()"
.PP
Returns the X11 Ctrl modifier mask/flag. 
.PP
\fBReturns:\fP
.RS 4
the X11 Ctrl modifier mask/flag. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBaccelModMaskX()\fP
.RE
.PP

.PP
Definition at line 608 of file kkeyserver_x11.cpp.
.SS "KDECORE_EXPORT uint KKeyServer::modXAlt ()"
.PP
Returns the X11 Alt (Mod1) modifier mask/flag. 
.PP
\fBReturns:\fP
.RS 4
the X11 Alt (Mod1) modifier mask/flag. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBaccelModMaskX()\fP
.RE
.PP

.PP
Definition at line 609 of file kkeyserver_x11.cpp.
.SS "KDECORE_EXPORT uint KKeyServer::modXNumLock ()"
.PP
Returns the X11 NumLock modifier mask/flag. 
.PP
\fBReturns:\fP
.RS 4
the X11 NumLock modifier mask/flag. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBaccelModMaskX()\fP
.RE
.PP

.PP
Definition at line 610 of file kkeyserver_x11.cpp.
.PP
References initializeMods().
.PP
Referenced by KKeyNative::modXNumLock().
.SS "KDECORE_EXPORT uint KKeyServer::modXWin ()"
.PP
Returns the X11 Win (Mod3) modifier mask/flag. 
.PP
\fBReturns:\fP
.RS 4
the X11 Win (Mod3) modifier mask/flag. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBkeyboardHasWinKey()\fP 
.PP
\fBaccelModMaskX()\fP
.RE
.PP

.PP
Definition at line 611 of file kkeyserver_x11.cpp.
.PP
References initializeMods().
.SS "KDECORE_EXPORT uint KKeyServer::modXScrollLock ()"
.PP
Returns the X11 ScrollLock modifier mask/flag. 
.PP
\fBReturns:\fP
.RS 4
the X11 ScrollLock modifier mask/flag. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBaccelModMaskX()\fP
.RE
.PP

.PP
Definition at line 612 of file kkeyserver_x11.cpp.
.PP
References initializeMods().
.PP
Referenced by KKeyNative::modXScrollLock().
.SS "KDECORE_EXPORT uint KKeyServer::modXModeSwitch ()"
.PP
Returns the X11 Mode_switch modifier mask/flag. 
.PP
\fBReturns:\fP
.RS 4
the X11 Mode_switch modifier mask/flag. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBaccelModMaskX()\fP 
.RE
.PP
\fBSince:\fP
.RS 4
3.5
.RE
.PP

.PP
Definition at line 613 of file kkeyserver_x11.cpp.
.PP
References initializeMods().
.PP
Referenced by KKeyNative::modXModeSwitch().
.SS "KDECORE_EXPORT uint KKeyServer::accelModMaskX ()"
.PP
Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and Win (if available). 
.PP
\fBSee also:\fP
.RS 4
\fBmodXShift()\fP 
.PP
\fBmodXLock()\fP 
.PP
\fBmodXCtrl()\fP 
.PP
\fBmodXAlt()\fP 
.PP
\fBmodXNumLock()\fP 
.PP
\fBmodXWin()\fP 
.PP
\fBmodXScrollLock()\fP
.RE
.PP

.PP
Definition at line 615 of file kkeyserver_x11.cpp.
.PP
References initializeMods().
.PP
Referenced by KKeyNative::accelModMaskX().
.SS "KDECORE_EXPORT bool KKeyServer::keyQtToSym (int keyQt, uint & sym)"
.PP
Extracts the symbol from the given \fBQt\fP key and converts it to a symbol. 
.PP
\fBParameters:\fP
.RS 4
\fIkeyQt\fP the qt key code 
.br
\fIsym\fP if successful, the symbol will be written here 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise 
.RE
.PP
\fBSee also:\fP
.RS 4
Qt::Key 
.PP
\fBSym\fP
.RE
.PP

.PP
Definition at line 623 of file kkeyserver_x11.cpp.
.PP
References KKeyServer::Sym::initQt(), and KKeyServer::Sym::m_sym.
.PP
Referenced by KKey::init().
.SS "KDECORE_EXPORT bool KKeyServer::keyQtToMod (int keyQt, uint & mod)"
.PP
Extracts the modifiers from the given \fBQt\fP key and converts them in a mask of ORed \fBKKey::ModFlag\fP modifiers. 
.PP
\fBParameters:\fP
.RS 4
\fIkeyQt\fP the qt key code 
.br
\fImod\fP if successful, the modifiers will be written here 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise 
.RE
.PP
\fBSee also:\fP
.RS 4
Qt::Key
.RE
.PP

.PP
Definition at line 633 of file kkeyserver_x11.cpp.
.PP
Referenced by KKey::init().
.SS "KDECORE_EXPORT bool KKeyServer::symToKeyQt (uint sym, int & keyQt)"
.PP
Converts the given symbol to a \fBQt\fP key code. 
.PP
\fBParameters:\fP
.RS 4
\fIsym\fP the symbol 
.br
\fIkeyQt\fP if successful, the qt key code will be written here 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise 
.RE
.PP
\fBSee also:\fP
.RS 4
Qt::Key 
.PP
\fBSym\fP
.RE
.PP

.PP
Definition at line 645 of file kkeyserver_x11.cpp.
.PP
References KKeyServer::Sym::qt().
.SS "KDECORE_EXPORT bool KKeyServer::modToModQt (uint mod, int & modQt)"
.PP
Converts the mask of ORed \fBKKey::ModFlag\fP modifiers to a mask of ORed \fBQt\fP key code modifiers. 
.PP
\fBParameters:\fP
.RS 4
\fImod\fP the mask of \fBKKey::ModFlag\fP modifiers 
.br
\fImodQt\fP the mask of \fBQt\fP key code modifiers will be written here, if successful 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise 
.RE
.PP
\fBSee also:\fP
.RS 4
Qt::Key 
.PP
\fBKKey\fP
.RE
.PP

.PP
Definition at line 652 of file kkeyserver_x11.cpp.
.SS "KDECORE_EXPORT bool KKeyServer::modToModX (uint mod, uint & modX)"
.PP
Converts the mask of ORed \fBKKey::ModFlag\fP modifiers to a mask of ORed X11 modifiers. 
.PP
\fBParameters:\fP
.RS 4
\fImod\fP the mask of \fBKKey::ModFlag\fP modifiers 
.br
\fImodX\fP the mask of X11 modifiers will be written here, if successful 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBKKey\fP
.RE
.PP

.PP
Definition at line 706 of file kkeyserver_x11.cpp.
.PP
References endl(), initializeMods(), and modX().
.PP
Referenced by KKeyNative::init().
.SS "KDECORE_EXPORT bool KKeyServer::modXToModQt (uint modX, int & modQt)"
.PP
Converts the mask of ORed X11 modifiers to a mask of ORed \fBQt\fP key code modifiers. 
.PP
\fBParameters:\fP
.RS 4
\fImodX\fP the mask of X11 modifiers 
.br
\fImodQt\fP the mask of \fBQt\fP key code modifiers will be written here if successful 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise 
.RE
.PP
\fBSee also:\fP
.RS 4
Qt::Key
.RE
.PP

.PP
Definition at line 728 of file kkeyserver_x11.cpp.
.PP
References initializeMods(), and modX().
.PP
Referenced by KKeyNative::keyCodeQt().
.SS "KDECORE_EXPORT bool KKeyServer::modXToMod (uint modX, uint & mod)"
.PP
Converts the mask of ORed X11 modifiers to a mask of ORed \fBKKey::ModFlag\fP modifiers. 
.PP
\fBParameters:\fP
.RS 4
\fImodX\fP the mask of X11 modifiers 
.br
\fImod\fP the mask of \fBKKey::ModFlag\fP modifiers will be written here, if successful 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBKKey\fP
.RE
.PP

.PP
Definition at line 746 of file kkeyserver_x11.cpp.
.PP
References initializeMods(), and modX().
.PP
Referenced by KKeyServer::Key::key(), and KKeyNative::key().
.SS "KDECORE_EXPORT bool KKeyServer::codeXToSym (uchar codeX, uint modX, uint & symX)"
.PP
Converts a X11 key code and a mask of ORed X11 modifiers into a X11 symbol. 
.PP
converts it to a symbol. 
.PP
\fBParameters:\fP
.RS 4
\fIcodeX\fP the X11 key code 
.br
\fImodX\fP the mask of ORed X11 modifiers 
.br
\fIsymX\fP if successful, the X11 symbol will be written here 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise 
.RE
.PP
\fBSee also:\fP
.RS 4
Qt::Key 
.PP
\fBSym\fP
.RE
.PP

.PP
Definition at line 759 of file kkeyserver_x11.cpp.
.PP
References modX().
.PP
Referenced by KKeyNative::init().
.SS "static \fBQString\fP modToString (uint mod, bool bUserSpace)\fC [static]\fP"
.PP
Q_WS_WIN. 
.PP
Definition at line 775 of file kkeyserver_x11.cpp.
.PP
References QString::isEmpty().
.PP
Referenced by modToStringUser().
.SS "KDECORE_EXPORT \fBQString\fP KKeyServer::modToStringUser (uint mod)"
.PP
Converts the mask of ORed \fBKKey::ModFlag\fP modifiers to a user-readable string. 
.PP
\fBParameters:\fP
.RS 4
\fImod\fP the mask of ORed \fBKKey::ModFlag\fP modifiers 
.RE
.PP
\fBReturns:\fP
.RS 4
the user-readable string
.RE
.PP

.PP
Definition at line 794 of file kkeyserver_x11.cpp.
.PP
References modToString().
.PP
Referenced by KKey::modFlagLabel(), and KKey::toString().
.SS "KDECORE_EXPORT int qtButtonStateToMod (Qt::ButtonState s)"
.PP
Converts the Qt-compatible button state to x11 modifier. 
.PP

.SH "Variable Documentation"
.PP 
.SS "ModInfo KKeyServer::g_rgModInfo[KKey::MOD_FLAG_COUNT]\fC [static]\fP"
.PP
\fBInitial value:\fP
.PP
.nf

{
    { KKey::SHIFT, Qt::SHIFT,   X11_ONLY(ShiftMask)   I18N_NOOP('Shift'), QString() },
    { KKey::CTRL,  Qt::CTRL,    X11_ONLY(ControlMask) I18N_NOOP('Ctrl'), QString() },
    { KKey::ALT,   Qt::ALT,     X11_ONLY(Mod1Mask)    I18N_NOOP('Alt'), QString() },
    { KKey::WIN,   KKey::QtWIN, X11_ONLY(Mod4Mask)    I18N_NOOP('Win'), QString() }
}
.fi
.PP
Definition at line 108 of file kkeyserver_x11.cpp.
.SS "const SymName KKeyServer::g_rgSymNames[]\fC [static]\fP"
.PP
\fBInitial value:\fP
.PP
.nf
 {
    { XK_ISO_Left_Tab, 'Backtab' },
    { XK_BackSpace,    I18N_NOOP('Backspace') },
    { XK_Sys_Req,      I18N_NOOP('SysReq') },
    { XK_Caps_Lock,    I18N_NOOP('CapsLock') },
    { XK_Num_Lock,     I18N_NOOP('NumLock') },
    { XK_Scroll_Lock,  I18N_NOOP('ScrollLock') },
    { XK_Prior,        I18N_NOOP('PageUp') },
    { XK_Next,         I18N_NOOP('PageDown') },













    { 0, 0 }
}
.fi
.PP
Definition at line 117 of file kkeyserver_x11.cpp.
.SS "SymVariation KKeyServer::g_rgSymVariation[]\fC [static]\fP"
.PP
\fBInitial value:\fP
.PP
.nf

{
    { '/', XK_KP_Divide, false },
    { '*', XK_KP_Multiply, false },
    { '-', XK_KP_Subtract, false },
    { '+', XK_KP_Add, false },
    { XK_Return, XK_KP_Enter, false },
    { 0, 0, false }
}
.fi
.PP
Definition at line 143 of file kkeyserver_x11.cpp.
.SH "Author"
.PP 
Generated automatically by Doxygen for kdecore Library from the source code.
