Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QWindowsKeyMapper Class Reference

Translates Windows keys to QWindowSystemInterface events. More...

#include <qwindowskeymapper.h>

+ Collaboration diagram for QWindowsKeyMapper:

Public Member Functions

 QWindowsKeyMapper ()
 
 ~QWindowsKeyMapper ()
 
void changeKeyboard ()
 
void setUseRTLExtensions (bool e)
 
bool useRTLExtensions () const
 
void setDetectAltGrModifier (bool a)
 
bool detectAltGrModifier () const
 
bool translateKeyEvent (QWindow *widget, HWND hwnd, const MSG &msg, LRESULT *result)
 To be called from the window procedure.
 
QWindowkeyGrabber () const
 
void setKeyGrabber (QWindow *w)
 
QList< int > possibleKeys (const QKeyEvent *e) const
 

Static Public Member Functions

static Qt::KeyboardModifiers queryKeyboardModifiers ()
 

Detailed Description

Translates Windows keys to QWindowSystemInterface events.

In addition, handles some special keys to display system menus, etc. The code originates from qkeymapper_win.cpp.

Definition at line 36 of file qwindowskeymapper.h.

Constructor & Destructor Documentation

◆ QWindowsKeyMapper()

QWindowsKeyMapper::QWindowsKeyMapper ( )
explicit

Definition at line 63 of file qwindowskeymapper.cpp.

References app, QGuiApplication::applicationStateChanged(), changeKeyboard(), clearKeyRecorderOnApplicationInActive(), QObject::connect(), and QCoreApplication::instance().

+ Here is the call graph for this function:

◆ ~QWindowsKeyMapper()

QWindowsKeyMapper::~QWindowsKeyMapper ( )
default

Member Function Documentation

◆ changeKeyboard()

void QWindowsKeyMapper::changeKeyboard ( )

Definition at line 622 of file qwindowskeymapper.cpp.

References Qt::LeftToRight, and Qt::RightToLeft.

Referenced by QWindowsKeyMapper(), and translateKeyEvent().

+ Here is the caller graph for this function:

◆ detectAltGrModifier()

bool QWindowsKeyMapper::detectAltGrModifier ( ) const
inline

Definition at line 49 of file qwindowskeymapper.h.

◆ keyGrabber()

QWindow * QWindowsKeyMapper::keyGrabber ( ) const
inline

Definition at line 53 of file qwindowskeymapper.h.

Referenced by QWindowsContext::keyGrabber(), and QWindowsContext::removeWindow().

+ Here is the caller graph for this function:

◆ possibleKeys()

QList< int > QWindowsKeyMapper::possibleKeys ( const QKeyEvent e) const

Definition at line 1356 of file qwindowskeymapper.cpp.

References Qt::dec(), e, QSet< T >::end(), KeyboardLayoutItem::exists, ExtendedKey, Qt::hex(), i, it, Qt::Key_Enter, Qt::Key_Return, Qt::KeyboardModifierMask, ModsTbl, Qt::noshowbase(), NumMods, qCDebug, KeyboardLayoutItem::qtKey, and Qt::showbase().

Referenced by QWindowsContext::possibleKeys().

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

◆ queryKeyboardModifiers()

Qt::KeyboardModifiers QWindowsKeyMapper::queryKeyboardModifiers ( )
static

◆ setDetectAltGrModifier()

void QWindowsKeyMapper::setDetectAltGrModifier ( bool  a)
inline

Definition at line 48 of file qwindowskeymapper.h.

Referenced by QWindowsContext::setDetectAltGrModifier().

+ Here is the caller graph for this function:

◆ setKeyGrabber()

void QWindowsKeyMapper::setKeyGrabber ( QWindow w)
inline

Definition at line 54 of file qwindowskeymapper.h.

Referenced by QWindowsContext::removeWindow(), and QWindowsContext::setKeyGrabber().

+ Here is the caller graph for this function:

◆ setUseRTLExtensions()

void QWindowsKeyMapper::setUseRTLExtensions ( bool  e)
inline

Definition at line 45 of file qwindowskeymapper.h.

References e.

Referenced by QWindowsContextPrivate::QWindowsContextPrivate().

+ Here is the caller graph for this function:

◆ translateKeyEvent()

bool QWindowsKeyMapper::translateKeyEvent ( QWindow widget,
HWND  hwnd,
const MSG msg,
LRESULT *  result 
)

To be called from the window procedure.

Definition at line 840 of file qwindowskeymapper.cpp.

References changeKeyboard(), and widget.

Referenced by QWindowsContext::windowsProc().

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

◆ useRTLExtensions()

bool QWindowsKeyMapper::useRTLExtensions ( ) const
inline

Definition at line 46 of file qwindowskeymapper.h.

Referenced by QWindowsContext::useRTLExtensions().

+ Here is the caller graph for this function:

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