\section{KKey\-Native Class Reference}
\label{classKKeyNative}\index{KKeyNative@{KKeyNative}}
Representation of a key in the format native of the windowing system (eg.  


{\tt \#include $<$kkeynative.h$>$}

\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KKey\-Native} ()
\item 
{\bf KKey\-Native} (const XEvent $\ast$xevent)
\item 
{\bf KKey\-Native} (const {\bf KKey} \&key)
\item 
{\bf KKey\-Native} (const {\bf KKey\-Native} \&)
\item 
{\bf KKey\-Native} (uint code, uint mod, uint sym)\label{classKKeyNative_a4}

\item 
void {\bf clear} ()
\item 
bool {\bf init} (const XEvent $\ast$xevent)
\item 
bool {\bf init} (const {\bf KKey} \&key)
\item 
bool {\bf init} (const {\bf KKey\-Native} \&key)
\item 
{\bf KKey\-Native} \& {\bf operator=} (const {\bf KKey\-Native} \&key)
\item 
int {\bf key\-Code\-Qt} () const 
\item 
{\bf KKey} {\bf key} () const 
\item 
{\bf operator KKey} () const 
\item 
uint {\bf code} () const 
\item 
uint {\bf mod} () const 
\item 
uint {\bf sym} () const 
\item 
bool {\bf is\-Null} () const 
\item 
int {\bf compare} (const {\bf KKey\-Native} \&key) const 
\item 
bool {\bf operator==} (const {\bf KKey\-Native} \&key) const 
\item 
bool {\bf operator!=} (const {\bf KKey\-Native} \&key) const 
\item 
bool {\bf operator$<$} (const {\bf KKey\-Native} \&key) const 
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static {\bf KKey\-Native} \& {\bf null} ()
\item 
static bool {\bf keyboard\-Has\-Win\-Key} ()
\item 
static uint {\bf mod\-X} ({\bf KKey::Mod\-Flag} mod\-Flag)
\item 
static uint {\bf accel\-Mod\-Mask\-X} ()
\item 
static uint {\bf mod\-XNum\-Lock} ()
\item 
static uint {\bf mod\-XLock} ()
\item 
static uint {\bf mod\-XScroll\-Lock} ()
\item 
static uint {\bf mod\-XMode\-Switch} ()
\end{CompactItemize}


\subsection{Detailed Description}
Representation of a key in the format native of the windowing system (eg. 

X11). \begin{Desc}
\item[See also:]{\bf KKey}{\rm (p.\,\pageref{classKKey})} \end{Desc}




Definition at line 37 of file kkeynative.h.

\subsection{Constructor \& Destructor Documentation}
\index{KKeyNative@{KKey\-Native}!KKeyNative@{KKeyNative}}
\index{KKeyNative@{KKeyNative}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KKey\-Native::KKey\-Native ()}\label{classKKeyNative_a0}


Creates a new null {\bf KKey}{\rm (p.\,\pageref{classKKey})}. 

\begin{Desc}
\item[See also:]{\bf clear()}{\rm (p.\,\pageref{classKKeyNative_a6})} 

{\bf is\-Null()}{\rm (p.\,\pageref{classKKeyNative_a17})} 

{\bf null()}{\rm (p.\,\pageref{classKKeyNative_e0})}\end{Desc}


Definition at line 55 of file kkeynative\_\-x11.cpp.

References clear().\index{KKeyNative@{KKey\-Native}!KKeyNative@{KKeyNative}}
\index{KKeyNative@{KKeyNative}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KKey\-Native::KKey\-Native (const XEvent $\ast$ {\em xevent})}\label{classKKeyNative_a1}


Extracts a new native key from the given xevent. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em xevent}]the XEvent that contains the key\end{description}
\end{Desc}


Definition at line 59 of file kkeynative\_\-x11.cpp.

References init().\index{KKeyNative@{KKey\-Native}!KKeyNative@{KKeyNative}}
\index{KKeyNative@{KKeyNative}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KKey\-Native::KKey\-Native (const {\bf KKey} \& {\em key})}\label{classKKeyNative_a2}


Creates a new native key for the given {\bf KKey}{\rm (p.\,\pageref{classKKey})} code. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em key}]the {\bf KKey}{\rm (p.\,\pageref{classKKey})} that contains the generic key\end{description}
\end{Desc}


Definition at line 56 of file kkeynative\_\-x11.cpp.

References init(), and key().\index{KKeyNative@{KKey\-Native}!KKeyNative@{KKeyNative}}
\index{KKeyNative@{KKeyNative}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KKey\-Native::KKey\-Native (const {\bf KKey\-Native} \&)}\label{classKKeyNative_a3}


Copy constructor. 



Definition at line 57 of file kkeynative\_\-x11.cpp.

References init(), and key().

\subsection{Member Function Documentation}
\index{KKeyNative@{KKey\-Native}!clear@{clear}}
\index{clear@{clear}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KKey\-Native::clear ()}\label{classKKeyNative_a6}


Clears the key. 

The key is null after calling this function. \begin{Desc}
\item[See also:]{\bf is\-Null()}{\rm (p.\,\pageref{classKKeyNative_a17})}\end{Desc}


Definition at line 72 of file kkeynative\_\-x11.cpp.

Referenced by KKey\-Native(), and null().\index{KKeyNative@{KKey\-Native}!init@{init}}
\index{init@{init}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KKey\-Native::init (const XEvent $\ast$ {\em xevent})}\label{classKKeyNative_a7}


Initializes the native key by extracting the information from the given xevent. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em xevent}]the XEvent that contains the key \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise\end{Desc}


Definition at line 80 of file kkeynative\_\-x11.cpp.

Referenced by KKey\-Native().\index{KKeyNative@{KKey\-Native}!init@{init}}
\index{init@{init}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KKey\-Native::init (const {\bf KKey} \& {\em key})}\label{classKKeyNative_a8}


Creates a new native key for the given {\bf KKey}{\rm (p.\,\pageref{classKKey})} code. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em key}]the {\bf KKey}{\rm (p.\,\pageref{classKKey})} that contains the generic key \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise\end{Desc}


Definition at line 91 of file kkeynative\_\-x11.cpp.

References KKey\-Server::code\-XTo\-Sym(), endl(), key(), KKey::m\_\-mod, KKey::mod\-Flags(), KKey\-Server::mod\-To\-Mod\-X(), and KKey::sym().\index{KKeyNative@{KKey\-Native}!init@{init}}
\index{init@{init}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KKey\-Native::init (const {\bf KKey\-Native} \& {\em key})}\label{classKKeyNative_a9}


Copies the given key into this key. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em key}]the key to copy \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise\end{Desc}


Definition at line 130 of file kkeynative\_\-x11.cpp.

References key(), KKey::m\_\-mod, and KKey::m\_\-sym.\index{KKeyNative@{KKey\-Native}!operator=@{operator=}}
\index{operator=@{operator=}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KKey\-Native}\& KKey\-Native::operator= (const {\bf KKey\-Native} \& {\em key})\hspace{0.3cm}{\tt  [inline]}}\label{classKKeyNative_a10}


Copies the given key into this key. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em key}]the key to copy \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]this key\end{Desc}


Definition at line 108 of file kkeynative.h.\index{KKeyNative@{KKey\-Native}!keyCodeQt@{keyCodeQt}}
\index{keyCodeQt@{keyCodeQt}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KKey\-Native::key\-Code\-Qt () const}\label{classKKeyNative_a11}


Returns the qt key code. 

\begin{Desc}
\item[Returns:]the qt key code or 0 if there is no key set. \end{Desc}
\begin{Desc}
\item[See also:]Qt::Key\end{Desc}


Definition at line 177 of file kkeynative\_\-x11.cpp.

References KKey\-Server::mod\-XTo\-Mod\-Qt().\index{KKeyNative@{KKey\-Native}!key@{key}}
\index{key@{key}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KKey} KKey\-Native::key () const}\label{classKKeyNative_a12}


Returns the {\bf KKey}{\rm (p.\,\pageref{classKKey})} representation of this key. 

\begin{Desc}
\item[Returns:]the {\bf KKey}{\rm (p.\,\pageref{classKKey})} representation\end{Desc}


Definition at line 164 of file kkeynative\_\-x11.cpp.

References KKey\-Server::mod\-XTo\-Mod().

Referenced by compare(), init(), and KKey\-Native().\index{KKeyNative@{KKey\-Native}!operator KKey@{operator KKey}}
\index{operator KKey@{operator KKey}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KKey\-Native::operator {\bf KKey} () const\hspace{0.3cm}{\tt  [inline]}}\label{classKKeyNative_a13}


Converts this key to its {\bf KKey}{\rm (p.\,\pageref{classKKey})} representation. 

\begin{Desc}
\item[Returns:]the {\bf KKey}{\rm (p.\,\pageref{classKKey})} representation \end{Desc}
\begin{Desc}
\item[See also:]{\bf key()}{\rm (p.\,\pageref{classKKeyNative_a12})}\end{Desc}


Definition at line 130 of file kkeynative.h.\index{KKeyNative@{KKey\-Native}!code@{code}}
\index{code@{code}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint KKey\-Native::code () const}\label{classKKeyNative_a14}


The native keycode of the key. 

\begin{Desc}
\item[Returns:]the native keycode\end{Desc}


Definition at line 138 of file kkeynative\_\-x11.cpp.\index{KKeyNative@{KKey\-Native}!mod@{mod}}
\index{mod@{mod}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint KKey\-Native::mod () const}\label{classKKeyNative_a15}


The native modifier flags of the key. 

\begin{Desc}
\item[Returns:]the native modifier flags\end{Desc}


Definition at line 139 of file kkeynative\_\-x11.cpp.\index{KKeyNative@{KKey\-Native}!sym@{sym}}
\index{sym@{sym}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint KKey\-Native::sym () const}\label{classKKeyNative_a16}


The native symbol (Key\-Sym) of the key. 

\begin{Desc}
\item[Returns:]the native symbol (Key\-Sym)\end{Desc}


Definition at line 140 of file kkeynative\_\-x11.cpp.\index{KKeyNative@{KKey\-Native}!isNull@{isNull}}
\index{isNull@{isNull}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KKey\-Native::is\-Null () const}\label{classKKeyNative_a17}


Returns true if the key is null (after {\bf clear()}{\rm (p.\,\pageref{classKKeyNative_a6})} or empty constructor). 

\begin{Desc}
\item[Returns:]true if the key is null \end{Desc}
\begin{Desc}
\item[See also:]{\bf clear()}{\rm (p.\,\pageref{classKKeyNative_a6})} 

{\bf null()}{\rm (p.\,\pageref{classKKeyNative_e0})}\end{Desc}


Definition at line 142 of file kkeynative\_\-x11.cpp.

Referenced by null().\index{KKeyNative@{KKey\-Native}!compare@{compare}}
\index{compare@{compare}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KKey\-Native::compare (const {\bf KKey\-Native} \& {\em key}) const}\label{classKKeyNative_a18}


Compares this key with the given KKey\-Native object. 

Returns a negative number if the given KKey\-Native is larger, 0 if they are equal and a positive number this KKey\-Native is larger. The returned value is the difference between the symbol, modifier or code, whatever is non-zero first.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em key}]the key to compare with this key \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a negative number if the given KKey\-Native is larger, 0 if they are equal and a positive number this KKey\-Native is larger\end{Desc}


Definition at line 147 of file kkeynative\_\-x11.cpp.

References key(), KKey::m\_\-mod, and KKey::m\_\-sym.\index{KKeyNative@{KKey\-Native}!operator==@{operator==}}
\index{operator==@{operator==}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KKey\-Native::operator== (const {\bf KKey\-Native} \& {\em key}) const\hspace{0.3cm}{\tt  [inline]}}\label{classKKeyNative_a19}


Compares the symbol, modifiers and code of both keys. 

\begin{Desc}
\item[See also:]{\bf compare()}{\rm (p.\,\pageref{classKKeyNative_a18})}\end{Desc}


Definition at line 176 of file kkeynative.h.\index{KKeyNative@{KKey\-Native}!operator"!=@{operator"!=}}
\index{operator"!=@{operator"!=}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KKey\-Native::operator!= (const {\bf KKey\-Native} \& {\em key}) const\hspace{0.3cm}{\tt  [inline]}}\label{classKKeyNative_a20}


Compares the symbol, modifiers and code of both keys. 

\begin{Desc}
\item[See also:]{\bf compare()}{\rm (p.\,\pageref{classKKeyNative_a18})}\end{Desc}


Definition at line 183 of file kkeynative.h.\index{KKeyNative@{KKey\-Native}!operator<@{operator$<$}}
\index{operator<@{operator$<$}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KKey\-Native::operator$<$ (const {\bf KKey\-Native} \& {\em key}) const\hspace{0.3cm}{\tt  [inline]}}\label{classKKeyNative_a21}


Compares the symbol, modifiers and code of both keys. 

\begin{Desc}
\item[See also:]{\bf compare()}{\rm (p.\,\pageref{classKKeyNative_a18})}\end{Desc}


Definition at line 190 of file kkeynative.h.\index{KKeyNative@{KKey\-Native}!null@{null}}
\index{null@{null}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KKey\-Native} \& KKey\-Native::null ()\hspace{0.3cm}{\tt  [static]}}\label{classKKeyNative_e0}


Returns a null key. 

\begin{Desc}
\item[Returns:]the null key \end{Desc}
\begin{Desc}
\item[See also:]{\bf is\-Null()}{\rm (p.\,\pageref{classKKeyNative_a17})} 

{\bf clear()}{\rm (p.\,\pageref{classKKeyNative_a6})}\end{Desc}


Definition at line 155 of file kkeynative\_\-x11.cpp.

References clear(), and is\-Null().\index{KKeyNative@{KKey\-Native}!keyboardHasWinKey@{keyboardHasWinKey}}
\index{keyboardHasWinKey@{keyboardHasWinKey}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KKey\-Native::keyboard\-Has\-Win\-Key ()\hspace{0.3cm}{\tt  [static]}}\label{classKKeyNative_e1}


Checks whether the keyboard has a Win key. 

\begin{Desc}
\item[Returns:]true if the keyboard has a Win key\end{Desc}


Definition at line 187 of file kkeynative\_\-x11.cpp.

References KKey\-Server::keyboard\-Has\-Win\-Key().\index{KKeyNative@{KKey\-Native}!modX@{modX}}
\index{modX@{modX}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint KKey\-Native::mod\-X ({\bf KKey::Mod\-Flag} {\em mod\-Flag})\hspace{0.3cm}{\tt  [static]}}\label{classKKeyNative_e2}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mod\-Flag}]the mod flags to test \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the equivalent native flags of the window system\end{Desc}


Definition at line 190 of file kkeynative\_\-x11.cpp.

References KKey\-Server::mod\-X().

Referenced by KApplication::keyboard\-Mouse\-State().\index{KKeyNative@{KKey\-Native}!accelModMaskX@{accelModMaskX}}
\index{accelModMaskX@{accelModMaskX}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint KKey\-Native::accel\-Mod\-Mask\-X ()\hspace{0.3cm}{\tt  [static]}}\label{classKKeyNative_e3}


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

\begin{Desc}
\item[Returns:]the mask of Shift, Ctrl, Alt and Win.\end{Desc}


Definition at line 191 of file kkeynative\_\-x11.cpp.

References KKey\-Server::accel\-Mod\-Mask\-X().\index{KKeyNative@{KKey\-Native}!modXNumLock@{modXNumLock}}
\index{modXNumLock@{modXNumLock}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint KKey\-Native::mod\-XNum\-Lock ()\hspace{0.3cm}{\tt  [static]}}\label{classKKeyNative_e4}


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{classKKeyNative_e3})}\end{Desc}


Definition at line 192 of file kkeynative\_\-x11.cpp.

References KKey\-Server::mod\-XNum\-Lock().\index{KKeyNative@{KKey\-Native}!modXLock@{modXLock}}
\index{modXLock@{modXLock}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint KKey\-Native::mod\-XLock ()\hspace{0.3cm}{\tt  [static]}}\label{classKKeyNative_e5}


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{classKKeyNative_e3})}\end{Desc}


Definition at line 193 of file kkeynative\_\-x11.cpp.

References KKey\-Server::mod\-XLock().\index{KKeyNative@{KKey\-Native}!modXScrollLock@{modXScrollLock}}
\index{modXScrollLock@{modXScrollLock}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint KKey\-Native::mod\-XScroll\-Lock ()\hspace{0.3cm}{\tt  [static]}}\label{classKKeyNative_e6}


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{classKKeyNative_e3})}\end{Desc}


Definition at line 194 of file kkeynative\_\-x11.cpp.

References KKey\-Server::mod\-XScroll\-Lock().\index{KKeyNative@{KKey\-Native}!modXModeSwitch@{modXModeSwitch}}
\index{modXModeSwitch@{modXModeSwitch}!KKeyNative@{KKey\-Native}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint KKey\-Native::mod\-XMode\-Switch ()\hspace{0.3cm}{\tt  [static]}}\label{classKKeyNative_e7}


Returns the X11 Mode\_\-switch modifier mask/flag. 

\begin{Desc}
\item[Returns:]the X11 Mode\_\-switch modifier mask/flag. \end{Desc}
\begin{Desc}
\item[See also:]{\bf accel\-Mod\-Mask\-X()}{\rm (p.\,\pageref{classKKeyNative_e3})} \end{Desc}
\begin{Desc}
\item[Since:]3.5\end{Desc}


Definition at line 195 of file kkeynative\_\-x11.cpp.

References KKey\-Server::mod\-XMode\-Switch().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kkeynative.h\item 
kkeynative\_\-x11.cpp\end{CompactItemize}
