18#include <QtGui/qtguiglobal.h>
19#include <QtCore/qstring.h>
20#include <QtCore/qloggingcategory.h>
21#include <QtCore/qlist.h>
22#include <QtCore/private/qglobal_p.h>
24#include <xkbcommon/xkbcommon.h>
39 static QString lookupString(
struct xkb_state *
state, xkb_keycode_t code);
40 static QString lookupStringNoKeysymTransformations(xkb_keysym_t keysym);
44 static int keysymToQtKey(xkb_keysym_t keysym, Qt::KeyboardModifiers
modifiers);
45 static int keysymToQtKey(xkb_keysym_t keysym, Qt::KeyboardModifiers
modifiers,
46 xkb_state *
state, xkb_keycode_t code,
47 bool superAsMeta =
true,
bool hyperAsMeta =
true);
51 static void xkbcommon_XConvertCase(xkb_keysym_t sym, xkb_keysym_t *lower, xkb_keysym_t *upper);
52 static xkb_keysym_t qxkbcommon_xkb_keysym_to_upper(xkb_keysym_t ks);
54 static Qt::KeyboardModifiers
modifiers(
struct xkb_state *
state, xkb_keysym_t keysym = XKB_KEY_VoidSymbol);
57 bool superAsMeta =
false,
bool hyperAsMeta =
false);
59 static void verifyHasLatinLayout(xkb_keymap *keymap);
60 static xkb_keysym_t lookupLatinKeysym(xkb_state *
state, xkb_keycode_t keycode);
63 return sym >= 0x20 && sym <= 0xff;
66 return sym >= XKB_KEY_KP_Space && sym <= XKB_KEY_KP_9;
75 void operator()(
struct xkb_keymap *keymap)
const {
return xkb_keymap_unref(keymap); }
The QKeyEvent class describes a key event.
The QPlatformInputContext class abstracts the input method dependent data and composing state.
\macro QT_RESTRICTED_CAST_FROM_ASCII
std::unique_ptr< struct xkb_context, XKBContextDeleter > ScopedXKBContext
static bool isLatin1(xkb_keysym_t sym)
std::unique_ptr< struct xkb_keymap, XKBKeymapDeleter > ScopedXKBKeymap
std::unique_ptr< struct xkb_state, XKBStateDeleter > ScopedXKBState
static bool isKeypad(xkb_keysym_t sym)
EGLImageKHR int int EGLuint64KHR * modifiers
Combined button and popup list for selecting options.
#define Q_DECLARE_LOGGING_CATEGORY(name)
void operator()(struct xkb_context *context) const
void operator()(struct xkb_keymap *keymap) const
void operator()(struct xkb_state *state) const