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
QWindowsKeyMapper Class Reference

Translates Windows keys to QWindowSystemInterface events. More...

#include <qwindowskeymapper.h>

+ Inheritance diagram for QWindowsKeyMapper:
+ 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)
 
Qt::KeyboardModifiers queryKeyboardModifiers () const override
 
QList< QKeyCombinationpossibleKeyCombinations (const QKeyEvent *e) const override
 
- Public Member Functions inherited from QPlatformKeyMapper
virtual ~QPlatformKeyMapper ()
 

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 38 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 603 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 51 of file qwindowskeymapper.h.

◆ keyGrabber()

QWindow * QWindowsKeyMapper::keyGrabber ( ) const
inline

Definition at line 55 of file qwindowskeymapper.h.

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

+ Here is the caller graph for this function:

◆ possibleKeyCombinations()

QList< QKeyCombination > QWindowsKeyMapper::possibleKeyCombinations ( const QKeyEvent * e) const
overridevirtual

Reimplemented from QPlatformKeyMapper.

Definition at line 1337 of file qwindowskeymapper.cpp.

References Qt::dec(), QSet< T >::end(), ExtendedKey, QKeyCombination::fromCombined(), Qt::hex(), i, it, Qt::Key_Enter, Qt::Key_Return, QKeyEvent::modifiers(), ModsTbl, QKeyEvent::nativeModifiers(), QKeyEvent::nativeVirtualKey(), Qt::noshowbase(), NumMods, qCDebug, KeyboardLayoutItem::qtKey, and Qt::showbase().

+ Here is the call graph for this function:

◆ queryKeyboardModifiers()

Qt::KeyboardModifiers QWindowsKeyMapper::queryKeyboardModifiers ( ) const
overridevirtual

◆ setDetectAltGrModifier()

void QWindowsKeyMapper::setDetectAltGrModifier ( bool a)
inline

Definition at line 50 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 56 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 47 of file qwindowskeymapper.h.

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 821 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 48 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: