23 #include <tqnamespace.h>
24 #include <tqwindowdefs.h>
26 #if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_WS_MACX) // Only compile this module if we're compiling for X11, mac or win32
28 #include "kkeynative.h"
29 #include "kkeyserver_x11.h"
32 #include <tqstringlist.h>
42 #include <X11/Xutil.h>
43 #include <X11/keysymdef.h>
69 KKeyNative::~KKeyNative()
83 m_code = pEvent->xkey.keycode;
84 m_mod = pEvent->xkey.state;
85 XLookupString( (XKeyEvent*) pEvent, 0, 0, &keySym, 0 );
86 m_sym = (uint) keySym;
97 #elif !defined(Q_WS_WIN) && !defined(Q_WS_MACX)
113 if( m_sym == XK_Print && !(m_mod & Mod1Mask) &&
114 XKeycodeToKeysym( qt_xdisplay(), 111, 0 ) == XK_Print )
116 else if( m_sym == XK_Break || (m_sym == XK_Pause && (m_mod & ControlMask)) &&
117 XKeycodeToKeysym( qt_xdisplay(), 114, 0 ) == XK_Pause )
120 m_code = XKeysymToKeycode( qt_xdisplay(), m_sym );
122 if( !m_code && m_sym )
123 kdDebug(125) <<
"Couldn't get code for sym" <<
endl;
126 if( key.modFlags() && ( ( m_sym < XK_Home || m_sym > XK_Begin ) &&
127 m_sym != XK_Insert && m_sym != XK_Delete ))
152 if( m_sym != key.m_sym )
return m_sym - key.m_sym;
153 if( m_mod != key.m_mod )
return m_mod - key.m_mod;
154 if( m_code != key.m_code )
return m_code - key.m_code;
170 return KKey( m_sym, m_mod );
174 return KKey( m_sym, modSpec );
185 return keyQt | modQt;