\section{KKey\-Server Namespace Reference}
\label{namespaceKKeyServer}\index{KKeyServer@{KKeyServer}}
A collection of functions for the conversion of key presses and their modifiers from the window system (X11) specific format to the generic format and vice-versa.  


\subsection*{Classes}
\begin{CompactItemize}
\item 
struct {\bf Sym}
\begin{CompactList}\small\item\em Represents a key symbol. \item\end{CompactList}\item 
struct {\bf Key}
\begin{CompactList}\small\item\em Represents a key press. \item\end{CompactList}\item 
struct {\bf Variations}
\begin{CompactList}\small\item\em TODO: please document this class. \item\end{CompactList}\end{CompactItemize}
\subsection*{Enumerations}
\begin{CompactItemize}
\item 
enum {\bf Extra\-Mod\-Flag} \{ {\bf MODE\_\-SWITCH} =  0x2000
 \}
\begin{CompactList}\small\item\em Supplement enum KKey::Mod\-Flag \begin{Desc}
\item[Since:]3.1. \end{Desc}
\item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
bool {\bf initialize\-Mods} ()
\begin{CompactList}\small\item\em TODO: please document. \item\end{CompactList}\item 
uint {\bf mod\-X} (KKey::Mod\-Flag mod\-Flag)
\begin{CompactList}\small\item\em Returns the equivalent X modifier mask of the given modifier flag. \item\end{CompactList}\item 
bool {\bf keyboard\-Has\-Win\-Key} ()
\begin{CompactList}\small\item\em Returns true if the current keyboard layout supports the Win key. \item\end{CompactList}\item 
uint {\bf mod\-XShift} ()
\begin{CompactList}\small\item\em Returns the X11 Shift modifier mask/flag. \item\end{CompactList}\item 
uint {\bf mod\-XLock} ()
\begin{CompactList}\small\item\em Returns the X11 Lock modifier mask/flag. \item\end{CompactList}\item 
uint {\bf mod\-XCtrl} ()
\begin{CompactList}\small\item\em Returns the X11 Ctrl modifier mask/flag. \item\end{CompactList}\item 
uint {\bf mod\-XAlt} ()
\begin{CompactList}\small\item\em Returns the X11 Alt (Mod1) modifier mask/flag. \item\end{CompactList}\item 
uint {\bf mod\-XNum\-Lock} ()
\begin{CompactList}\small\item\em Returns the X11 Num\-Lock modifier mask/flag. \item\end{CompactList}\item 
uint {\bf mod\-XWin} ()
\begin{CompactList}\small\item\em Returns the X11 Win (Mod3) modifier mask/flag. \item\end{CompactList}\item 
uint {\bf mod\-XScroll\-Lock} ()
\begin{CompactList}\small\item\em Returns the X11 Scroll\-Lock modifier mask/flag. \item\end{CompactList}\item 
uint {\bf accel\-Mod\-Mask\-X} ()
\begin{CompactList}\small\item\em Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and Win (if available). \item\end{CompactList}\item 
bool {\bf key\-Qt\-To\-Sym} (int key\-Qt, uint \&sym)
\begin{CompactList}\small\item\em Extracts the symbol from the given {\bf Qt} key and converts it to a symbol. \item\end{CompactList}\item 
bool {\bf key\-Qt\-To\-Mod} (int key\-Qt, uint \&mod)
\begin{CompactList}\small\item\em Extracts the modifiers from the given {\bf Qt} key and converts them in a mask of ORed KKey::Mod\-Flag modifiers. \item\end{CompactList}\item 
bool {\bf sym\-To\-Key\-Qt} (uint sym, int \&key\-Qt)
\begin{CompactList}\small\item\em Converts the given symbol to a {\bf Qt} key code. \item\end{CompactList}\item 
bool {\bf mod\-To\-Mod\-Qt} (uint mod, int \&mod\-Qt)
\begin{CompactList}\small\item\em Converts the mask of ORed KKey::Mod\-Flag modifiers to a mask of ORed {\bf Qt} key code modifiers. \item\end{CompactList}\item 
bool {\bf mod\-To\-Mod\-X} (uint mod, uint \&mod\-X)
\begin{CompactList}\small\item\em Converts the mask of ORed KKey::Mod\-Flag modifiers to a mask of ORed X11 modifiers. \item\end{CompactList}\item 
bool {\bf mod\-XTo\-Mod\-Qt} (uint mod\-X, int \&mod\-Qt)
\begin{CompactList}\small\item\em Converts the mask of ORed X11 modifiers to a mask of ORed {\bf Qt} key code modifiers. \item\end{CompactList}\item 
bool {\bf mod\-XTo\-Mod} (uint mod\-X, uint \&mod)
\begin{CompactList}\small\item\em Converts the mask of ORed X11 modifiers to a mask of ORed KKey::Mod\-Flag modifiers. \item\end{CompactList}\item 
bool {\bf code\-XTo\-Sym} (uchar code\-X, uint mod\-X, uint \&sym\-X)
\begin{CompactList}\small\item\em Converts a X11 key code and a mask of ORed X11 modifiers into a X11 symbol. \item\end{CompactList}\item 
{\bf QString} {\bf mod\-To\-String\-Internal} (uint mod)\label{namespaceKKeyServer_a20}

\item 
{\bf QString} {\bf mod\-To\-String\-User} (uint mod)
\begin{CompactList}\small\item\em Converts the mask of ORed KKey::Mod\-Flag modifiers to a user-readable string. \item\end{CompactList}\item 
bool {\bf string\-To\-Sym\-Mod} (const  {\bf QString} \&, uint \&sym, uint \&mod)\label{namespaceKKeyServer_a22}

\item 
void {\bf key\-Qt\-To\-Key\-X} (uint key\-Comb\-Qt, unsigned char $\ast$p\-Key\-Code\-X, uint $\ast$p\-Key\-Sym\-X, uint $\ast$p\-Key\-Mod\-X)\label{namespaceKKeyServer_a23}

\end{CompactItemize}


\subsection{Detailed Description}
A collection of functions for the conversion of key presses and their modifiers from the window system (X11) specific format to the generic format and vice-versa. 

\subsection{Enumeration Type Documentation}
\index{KKeyServer@{KKey\-Server}!ExtraModFlag@{ExtraModFlag}}
\index{ExtraModFlag@{ExtraModFlag}!KKeyServer@{KKey\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf KKey\-Server::Extra\-Mod\-Flag}}\label{namespaceKKeyServer_a24}


Supplement enum KKey::Mod\-Flag \begin{Desc}
\item[Since:]3.1. \end{Desc}




Definition at line 18 of file kkeyserver\_\-x11.h.

\subsection{Function Documentation}
\index{KKeyServer@{KKey\-Server}!initializeMods@{initializeMods}}
\index{initializeMods@{initializeMods}!KKeyServer@{KKey\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool initialize\-Mods ()}\label{namespaceKKeyServer_a1}


TODO: please document. 

\index{KKeyServer@{KKey\-Server}!modX@{modX}}
\index{modX@{modX}!KKeyServer@{KKey\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint mod\-X (KKey::Mod\-Flag {\em mod\-Flag})}\label{namespaceKKeyServer_a2}


Returns the equivalent X modifier mask of the given modifier flag. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mod\-Flag}]the generic flags to check \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the window system specific flags\end{Desc}
\index{KKeyServer@{KKey\-Server}!keyboardHasWinKey@{keyboardHasWinKey}}
\index{keyboardHasWinKey@{keyboardHasWinKey}!KKeyServer@{KKey\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool keyboard\-Has\-Win\-Key ()}\label{namespaceKKeyServer_a3}


Returns true if the current keyboard layout supports the Win key. 

Specifically, whether the Super or Meta keys are assigned to an X modifier. \begin{Desc}
\item[Returns:]true if the keyboard has a Win key \end{Desc}
\begin{Desc}
\item[See also:]{\bf mod\-XWin()}{\rm (p.\,\pageref{namespaceKKeyServer_a9})}\end{Desc}
\index{KKeyServer@{KKey\-Server}!modXShift@{modXShift}}
\index{modXShift@{modXShift}!KKeyServer@{KKey\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint mod\-XShift ()}\label{namespaceKKeyServer_a4}


Returns the X11 Shift modifier mask/flag. 

\begin{Desc}
\item[Returns:]the X11 Shift modifier mask/flag. \end{Desc}
\begin{Desc}
\item[See also:]{\bf accel\-Mod\-Mask\-X()}{\rm (p.\,\pageref{namespaceKKeyServer_a11})}\end{Desc}
\index{KKeyServer@{KKey\-Server}!modXLock@{modXLock}}
\index{modXLock@{modXLock}!KKeyServer@{KKey\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint mod\-XLock ()}\label{namespaceKKeyServer_a5}


Returns the X11 Lock modifier mask/flag. 

\begin{Desc}
\item[Returns:]the X11 Lock modifier mask/flag. \end{Desc}
\begin{Desc}
\item[See also:]{\bf accel\-Mod\-Mask\-X()}{\rm (p.\,\pageref{namespaceKKeyServer_a11})}\end{Desc}
\index{KKeyServer@{KKey\-Server}!modXCtrl@{modXCtrl}}
\index{modXCtrl@{modXCtrl}!KKeyServer@{KKey\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint mod\-XCtrl ()}\label{namespaceKKeyServer_a6}


Returns the X11 Ctrl modifier mask/flag. 

\begin{Desc}
\item[Returns:]the X11 Ctrl modifier mask/flag. \end{Desc}
\begin{Desc}
\item[See also:]{\bf accel\-Mod\-Mask\-X()}{\rm (p.\,\pageref{namespaceKKeyServer_a11})}\end{Desc}
\index{KKeyServer@{KKey\-Server}!modXAlt@{modXAlt}}
\index{modXAlt@{modXAlt}!KKeyServer@{KKey\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint mod\-XAlt ()}\label{namespaceKKeyServer_a7}


Returns the X11 Alt (Mod1) modifier mask/flag. 

\begin{Desc}
\item[Returns:]the X11 Alt (Mod1) modifier mask/flag. \end{Desc}
\begin{Desc}
\item[See also:]{\bf accel\-Mod\-Mask\-X()}{\rm (p.\,\pageref{namespaceKKeyServer_a11})}\end{Desc}
\index{KKeyServer@{KKey\-Server}!modXNumLock@{modXNumLock}}
\index{modXNumLock@{modXNumLock}!KKeyServer@{KKey\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint mod\-XNum\-Lock ()}\label{namespaceKKeyServer_a8}


Returns the X11 Num\-Lock modifier mask/flag. 

\begin{Desc}
\item[Returns:]the X11 Num\-Lock modifier mask/flag. \end{Desc}
\begin{Desc}
\item[See also:]{\bf accel\-Mod\-Mask\-X()}{\rm (p.\,\pageref{namespaceKKeyServer_a11})}\end{Desc}
\index{KKeyServer@{KKey\-Server}!modXWin@{modXWin}}
\index{modXWin@{modXWin}!KKeyServer@{KKey\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint mod\-XWin ()}\label{namespaceKKeyServer_a9}


Returns the X11 Win (Mod3) modifier mask/flag. 

\begin{Desc}
\item[Returns:]the X11 Win (Mod3) modifier mask/flag. \end{Desc}
\begin{Desc}
\item[See also:]{\bf keyboard\-Has\-Win\-Key()}{\rm (p.\,\pageref{namespaceKKeyServer_a3})} 

{\bf accel\-Mod\-Mask\-X()}{\rm (p.\,\pageref{namespaceKKeyServer_a11})}\end{Desc}
\index{KKeyServer@{KKey\-Server}!modXScrollLock@{modXScrollLock}}
\index{modXScrollLock@{modXScrollLock}!KKeyServer@{KKey\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint mod\-XScroll\-Lock ()}\label{namespaceKKeyServer_a10}


Returns the X11 Scroll\-Lock modifier mask/flag. 

\begin{Desc}
\item[Returns:]the X11 Scroll\-Lock modifier mask/flag. \end{Desc}
\begin{Desc}
\item[See also:]{\bf accel\-Mod\-Mask\-X()}{\rm (p.\,\pageref{namespaceKKeyServer_a11})}\end{Desc}
\index{KKeyServer@{KKey\-Server}!accelModMaskX@{accelModMaskX}}
\index{accelModMaskX@{accelModMaskX}!KKeyServer@{KKey\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint accel\-Mod\-Mask\-X ()}\label{namespaceKKeyServer_a11}


Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and Win (if available). 

\begin{Desc}
\item[See also:]{\bf mod\-XShift()}{\rm (p.\,\pageref{namespaceKKeyServer_a4})} 

{\bf mod\-XLock()}{\rm (p.\,\pageref{namespaceKKeyServer_a5})} 

{\bf mod\-XCtrl()}{\rm (p.\,\pageref{namespaceKKeyServer_a6})} 

{\bf mod\-XAlt()}{\rm (p.\,\pageref{namespaceKKeyServer_a7})} 

{\bf mod\-XNum\-Lock()}{\rm (p.\,\pageref{namespaceKKeyServer_a8})} 

{\bf mod\-XWin()}{\rm (p.\,\pageref{namespaceKKeyServer_a9})} 

{\bf mod\-XScroll\-Lock()}{\rm (p.\,\pageref{namespaceKKeyServer_a10})}\end{Desc}
\index{KKeyServer@{KKey\-Server}!keyQtToSym@{keyQtToSym}}
\index{keyQtToSym@{keyQtToSym}!KKeyServer@{KKey\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool key\-Qt\-To\-Sym (int {\em key\-Qt}, uint \& {\em sym})}\label{namespaceKKeyServer_a12}


Extracts the symbol from the given {\bf Qt} key and converts it to a symbol. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em key\-Qt}]the qt key code \item[{\em sym}]if successful, the symbol will be written here \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise \end{Desc}
\begin{Desc}
\item[See also:]Qt::Key 

{\bf Sym}{\rm (p.\,\pageref{structKKeyServer_1_1Sym})}\end{Desc}
\index{KKeyServer@{KKey\-Server}!keyQtToMod@{keyQtToMod}}
\index{keyQtToMod@{keyQtToMod}!KKeyServer@{KKey\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool key\-Qt\-To\-Mod (int {\em key\-Qt}, uint \& {\em mod})}\label{namespaceKKeyServer_a13}


Extracts the modifiers from the given {\bf Qt} key and converts them in a mask of ORed KKey::Mod\-Flag modifiers. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em key\-Qt}]the qt key code \item[{\em mod}]if successful, the modifiers will be written here \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise \end{Desc}
\begin{Desc}
\item[See also:]Qt::Key\end{Desc}
\index{KKeyServer@{KKey\-Server}!symToKeyQt@{symToKeyQt}}
\index{symToKeyQt@{symToKeyQt}!KKeyServer@{KKey\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool sym\-To\-Key\-Qt (uint {\em sym}, int \& {\em key\-Qt})}\label{namespaceKKeyServer_a14}


Converts the given symbol to a {\bf Qt} key code. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sym}]the symbol \item[{\em key\-Qt}]if successful, the qt key code will be written here \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise \end{Desc}
\begin{Desc}
\item[See also:]Qt::Key 

{\bf Sym}{\rm (p.\,\pageref{structKKeyServer_1_1Sym})}\end{Desc}
\index{KKeyServer@{KKey\-Server}!modToModQt@{modToModQt}}
\index{modToModQt@{modToModQt}!KKeyServer@{KKey\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool mod\-To\-Mod\-Qt (uint {\em mod}, int \& {\em mod\-Qt})}\label{namespaceKKeyServer_a15}


Converts the mask of ORed KKey::Mod\-Flag modifiers to a mask of ORed {\bf Qt} key code modifiers. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em the}]mask of KKey::Mod\-Flag modifiers \item[{\em the}]mask of {\bf Qt} key code modifiers will be written here, if successful \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise \end{Desc}
\begin{Desc}
\item[See also:]Qt::Key 

KKey\end{Desc}
\index{KKeyServer@{KKey\-Server}!modToModX@{modToModX}}
\index{modToModX@{modToModX}!KKeyServer@{KKey\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool mod\-To\-Mod\-X (uint {\em mod}, uint \& {\em mod\-X})}\label{namespaceKKeyServer_a16}


Converts the mask of ORed KKey::Mod\-Flag modifiers to a mask of ORed X11 modifiers. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em the}]mask of KKey::Mod\-Flag modifiers \item[{\em the}]mask of X11 modifiers will be written here, if successful \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise \end{Desc}
\begin{Desc}
\item[See also:]KKey\end{Desc}
\index{KKeyServer@{KKey\-Server}!modXToModQt@{modXToModQt}}
\index{modXToModQt@{modXToModQt}!KKeyServer@{KKey\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool mod\-XTo\-Mod\-Qt (uint {\em mod\-X}, int \& {\em mod\-Qt})}\label{namespaceKKeyServer_a17}


Converts the mask of ORed X11 modifiers to a mask of ORed {\bf Qt} key code modifiers. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em the}]mask of X11 modifiers \item[{\em the}]mask of {\bf Qt} key code modifiers will be written here if successful \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise \end{Desc}
\begin{Desc}
\item[See also:]Qt::Key\end{Desc}
\index{KKeyServer@{KKey\-Server}!modXToMod@{modXToMod}}
\index{modXToMod@{modXToMod}!KKeyServer@{KKey\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool mod\-XTo\-Mod (uint {\em mod\-X}, uint \& {\em mod})}\label{namespaceKKeyServer_a18}


Converts the mask of ORed X11 modifiers to a mask of ORed KKey::Mod\-Flag modifiers. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em the}]mask of X11 modifiers \item[{\em the}]mask of KKey::Mod\-Flag modifiers will be written here, if successful \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise \end{Desc}
\begin{Desc}
\item[See also:]KKey\end{Desc}
\index{KKeyServer@{KKey\-Server}!codeXToSym@{codeXToSym}}
\index{codeXToSym@{codeXToSym}!KKeyServer@{KKey\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool code\-XTo\-Sym (uchar {\em code\-X}, uint {\em mod\-X}, uint \& {\em sym\-X})}\label{namespaceKKeyServer_a19}


Converts a X11 key code and a mask of ORed X11 modifiers into a X11 symbol. 

converts it to a symbol. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em code\-X}]the X11 key code \item[{\em mod\-X}]the mask of ORed X11 modifiers \item[{\em sym}]if successful, the X11 symbol will be written here \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise \end{Desc}
\begin{Desc}
\item[See also:]Qt::Key 

{\bf Sym}{\rm (p.\,\pageref{structKKeyServer_1_1Sym})}\end{Desc}
\index{KKeyServer@{KKey\-Server}!modToStringUser@{modToStringUser}}
\index{modToStringUser@{modToStringUser}!KKeyServer@{KKey\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} mod\-To\-String\-User (uint {\em mod})}\label{namespaceKKeyServer_a21}


Converts the mask of ORed KKey::Mod\-Flag modifiers to a user-readable string. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mod}]the mask of ORed KKey::Mod\-Flag modifiers \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the user-readable string\end{Desc}
