Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QXkbCommon Class Reference

#include <qxkbcommon_p.h>

+ Collaboration diagram for QXkbCommon:

Classes

struct  XKBContextDeleter
 
struct  XKBKeymapDeleter
 
struct  XKBStateDeleter
 

Public Types

using ScopedXKBState = std::unique_ptr<struct xkb_state, XKBStateDeleter>
 
using ScopedXKBKeymap = std::unique_ptr<struct xkb_keymap, XKBKeymapDeleter>
 
using ScopedXKBContext = std::unique_ptr<struct xkb_context, XKBContextDeleter>
 

Static Public Member Functions

static QString lookupString (struct xkb_state *state, xkb_keycode_t code)
 
static QString lookupStringNoKeysymTransformations (xkb_keysym_t keysym)
 
static QList< xkb_keysym_t > toKeysym (QKeyEvent *event)
 
static int keysymToQtKey (xkb_keysym_t keysym, Qt::KeyboardModifiers modifiers)
 
static int keysymToQtKey (xkb_keysym_t keysym, Qt::KeyboardModifiers modifiers, xkb_state *state, xkb_keycode_t code, bool superAsMeta=true, bool hyperAsMeta=true)
 
static void xkbcommon_XConvertCase (xkb_keysym_t sym, xkb_keysym_t *lower, xkb_keysym_t *upper)
 
static xkb_keysym_t qxkbcommon_xkb_keysym_to_upper (xkb_keysym_t ks)
 
static Qt::KeyboardModifiers modifiers (struct xkb_state *state, xkb_keysym_t keysym=XKB_KEY_VoidSymbol)
 
static QList< int > possibleKeys (xkb_state *state, const QKeyEvent *event, bool superAsMeta=false, bool hyperAsMeta=false)
 
static QList< QKeyCombinationpossibleKeyCombinations (xkb_state *state, const QKeyEvent *event, bool superAsMeta=false, bool hyperAsMeta=false)
 
static void verifyHasLatinLayout (xkb_keymap *keymap)
 
static xkb_keysym_t lookupLatinKeysym (xkb_state *state, xkb_keycode_t keycode)
 
static bool isLatin1 (xkb_keysym_t sym)
 
static bool isKeypad (xkb_keysym_t sym)
 
static void setXkbContext (QPlatformInputContext *inputContext, struct xkb_context *context)
 

Detailed Description

Definition at line 36 of file qxkbcommon_p.h.

Member Typedef Documentation

◆ ScopedXKBContext

using QXkbCommon::ScopedXKBContext = std::unique_ptr<struct xkb_context, XKBContextDeleter>

Definition at line 123 of file qxkbcommon_p.h.

◆ ScopedXKBKeymap

using QXkbCommon::ScopedXKBKeymap = std::unique_ptr<struct xkb_keymap, XKBKeymapDeleter>

Definition at line 122 of file qxkbcommon_p.h.

◆ ScopedXKBState

using QXkbCommon::ScopedXKBState = std::unique_ptr<struct xkb_state, XKBStateDeleter>

Definition at line 121 of file qxkbcommon_p.h.

Member Function Documentation

◆ isKeypad()

static bool QXkbCommon::isKeypad ( xkb_keysym_t sym)
inlinestatic

Definition at line 67 of file qxkbcommon_p.h.

Referenced by QXcbKeyboard::handleKeyEvent(), and modifiers().

+ Here is the caller graph for this function:

◆ isLatin1()

static bool QXkbCommon::isLatin1 ( xkb_keysym_t sym)
inlinestatic

Definition at line 64 of file qxkbcommon_p.h.

Referenced by keysymToQtKey(), keysymToQtKey_internal(), lookupLatinKeysym(), possibleKeyCombinations(), toKeysym(), and verifyHasLatinLayout().

+ Here is the caller graph for this function:

◆ keysymToQtKey() [1/2]

int QXkbCommon::keysymToQtKey ( xkb_keysym_t keysym,
Qt::KeyboardModifiers modifiers )
static

Definition at line 473 of file qxkbcommon.cpp.

References keysymToQtKey().

Referenced by QIBusPlatformInputContext::forwardKeyEvent(), QtWayland::WindowSystemEventHandler::handleKeyEvent(), QXcbKeyboard::handleKeyEvent(), keysymToQtKey(), QLibInputKeyboard::processKey(), QtWaylandClient::QWaylandTextInputv1::zwp_text_input_v1_keysym(), and QtWaylandClient::QWaylandTextInputv2::zwp_text_input_v2_keysym().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ keysymToQtKey() [2/2]

int QXkbCommon::keysymToQtKey ( xkb_keysym_t keysym,
Qt::KeyboardModifiers modifiers,
xkb_state * state,
xkb_keycode_t code,
bool superAsMeta = true,
bool hyperAsMeta = true )
static

Definition at line 478 of file qxkbcommon.cpp.

References Qt::ControlModifier, isLatin1(), keysymToQtKey_internal(), lookupLatinKeysym(), and state.

+ Here is the call graph for this function:

◆ lookupLatinKeysym()

xkb_keysym_t QXkbCommon::lookupLatinKeysym ( xkb_state * state,
xkb_keycode_t keycode )
static

Definition at line 750 of file qxkbcommon.cpp.

References isLatin1(), layout, and state.

Referenced by keysymToQtKey(), and possibleKeyCombinations().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lookupString()

QString QXkbCommon::lookupString ( struct xkb_state * state,
xkb_keycode_t code )
static

Definition at line 407 of file qxkbcommon.cpp.

References QString::fromUtf8(), Q_UNLIKELY, and state.

Referenced by QtWayland::WindowSystemEventHandler::handleKeyEvent(), QXcbKeyboard::handleKeyEvent(), keysymToQtKey_internal(), and QLibInputKeyboard::processKey().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lookupStringNoKeysymTransformations()

QString QXkbCommon::lookupStringNoKeysymTransformations ( xkb_keysym_t keysym)
static

Definition at line 418 of file qxkbcommon.cpp.

References QString::fromUtf8(), and Q_UNLIKELY.

Referenced by QIBusPlatformInputContext::forwardKeyEvent(), keysymToQtKey_internal(), QtWaylandClient::QWaylandTextInputv1::zwp_text_input_v1_keysym(), and QtWaylandClient::QWaylandTextInputv2::zwp_text_input_v2_keysym().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ modifiers()

Qt::KeyboardModifiers QXkbCommon::modifiers ( struct xkb_state * state,
xkb_keysym_t keysym = XKB_KEY_VoidSymbol )
static

Definition at line 570 of file qxkbcommon.cpp.

References Qt::AltModifier, Qt::ControlModifier, isKeypad(), Qt::KeypadModifier, Qt::MetaModifier, Qt::NoModifier, Qt::ShiftModifier, state, XKB_MOD_NAME_ALT, XKB_MOD_NAME_CTRL, XKB_MOD_NAME_LOGO, and XKB_MOD_NAME_SHIFT.

Referenced by QtWayland::WindowSystemEventHandler::handleKeyEvent(), and QLibInputKeyboard::processKey().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ possibleKeyCombinations()

QList< QKeyCombination > QXkbCommon::possibleKeyCombinations ( xkb_state * state,
const QKeyEvent * event,
bool superAsMeta = false,
bool hyperAsMeta = false )
static

Definition at line 616 of file qxkbcommon.cpp.

References Qt::AltModifier, Qt::ControlModifier, QKeyCombination::fromCombined(), Qt::GroupSwitchModifier, i, isLatin1(), Qt::KeypadModifier, keysymToQtKey_internal(), lookupLatinKeysym(), Qt::MetaModifier, ModsTbl, Q_ASSERT, Q_FUNC_INFO, qCWarning, qtKey(), Qt::ShiftModifier, and state.

Referenced by QXcbKeyboard::possibleKeyCombinations(), and possibleKeys().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ possibleKeys()

QList< int > QXkbCommon::possibleKeys ( xkb_state * state,
const QKeyEvent * event,
bool superAsMeta = false,
bool hyperAsMeta = false )
static

Definition at line 605 of file qxkbcommon.cpp.

References possibleKeyCombinations(), and state.

Referenced by QtWaylandClient::QWaylandInputDevice::possibleKeys().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qxkbcommon_xkb_keysym_to_upper()

xkb_keysym_t QXkbCommon::qxkbcommon_xkb_keysym_to_upper ( xkb_keysym_t ks)
static

Definition at line 398 of file qxkbcommon.cpp.

References xkbcommon_XConvertCase().

Referenced by keysymToQtKey_internal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setXkbContext()

void QXkbCommon::setXkbContext ( QPlatformInputContext * inputContext,
struct xkb_context * context )
static

Definition at line 805 of file qxkbcommon.cpp.

References context, Qt::DirectConnection, method, QObject::objectName, Q_ARG, Q_ASSERT, qCWarning, and setXkbContext().

Referenced by QXcbKeyboard::initialize(), QtWaylandClient::QWaylandIntegration::reconfigureInputContext(), and setXkbContext().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toKeysym()

QList< xkb_keysym_t > QXkbCommon::toKeysym ( QKeyEvent * event)
static

Definition at line 432 of file qxkbcommon.cpp.

References isLatin1(), it, Qt::Key_0, Qt::Key_9, Qt::Key_F1, Qt::Key_F35, Qt::KeypadModifier, KeyTbl, and qtKey().

Referenced by QWaylandTextInputPrivate::sendKeyEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ verifyHasLatinLayout()

void QXkbCommon::verifyHasLatinLayout ( xkb_keymap * keymap)
static

Definition at line 722 of file qxkbcommon.cpp.

References isLatin1(), layout, and qCDebug.

Referenced by QXcbKeyboard::updateKeymap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xkbcommon_XConvertCase()

void QXkbCommon::xkbcommon_XConvertCase ( xkb_keysym_t sym,
xkb_keysym_t * lower,
xkb_keysym_t * upper )
static

Definition at line 76 of file qxkbcommon_3rdparty.cpp.

References qt_UCSConvertCase().

Referenced by getUnshiftedXKey(), and qxkbcommon_xkb_keysym_to_upper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: