The KeyboardUtils class provides functions related to keyboard and input method.
More...
#include "framework/keyboard/internal/KeyboardUtils.h"
|
enum | KeyType {
KeyType_Any = 0
, KeyType_Tab = 1
, KeyType_CapsLock = 2
, KeyType_Return = 3
,
KeyType_LShift = 4
, KeyType_RShift = 5
, KeyType_Ctrl = 6
, KeyType_LAlt = 7
,
KeyType_RAlt = 8
, KeyType_Space = 9
, KeyType_Backspace = 10
} |
|
|
static Q_INVOKABLE bool | isSpecialKey (const KeyEvent &event) |
|
static Q_INVOKABLE bool | isDeadKey (int key) |
|
static Q_INVOKABLE QString | deadKeyToString (Qt::Key key) |
|
static Q_INVOKABLE QString | deadKeyToReadableString (Qt::Key key) |
|
static Q_INVOKABLE bool | isRShift (int nativeScanCode, int nativeVirtualKey) |
|
static Q_INVOKABLE bool | isRControl (int nativeScanCode, int nativeVirtualKey) |
|
static Q_INVOKABLE KeyEvent | createKeyEvent (Qt::Key key=Qt::Key_unknown, Qt::KeyboardModifiers modifiers=Qt::NoModifier, quint32 nativeScanCode=0, quint32 nativeVirtualKey=0, const QString &text=QString()) |
|
The KeyboardUtils class provides functions related to keyboard and input method.
◆ deadKeyToReadableString()
QString KeyboardUtils::deadKeyToReadableString |
( |
Qt::Key |
key | ) |
|
|
static |
Returns the human readable text for the given dead key.
◆ deadKeyToString()
QString KeyboardUtils::deadKeyToString |
( |
Qt::Key |
key | ) |
|
|
static |
Returns the text for the given dead key.
◆ isDeadKey()
bool KeyboardUtils::isDeadKey |
( |
int |
key | ) |
|
|
static |
Returns true if the key code belongs to a dead key.
◆ isRControl()
bool KeyboardUtils::isRControl |
( |
int |
nativeScanCode, |
|
|
int |
nativeVirtualKey |
|
) |
| |
|
static |
Returns true if the given native virtual key code or scan code belongs to right control.
Pass both values to this function; it'll use native scan code or virtual key depending on the platform.
- Since
- Open-Typer 5.0.1
◆ isRShift()
bool KeyboardUtils::isRShift |
( |
int |
nativeScanCode, |
|
|
int |
nativeVirtualKey |
|
) |
| |
|
static |
Returns true if the given native virtual key code or scan code belongs to right shift.
Pass both values to this function; it'll use native scan code or virtual key depending on the platform.
- Since
- Open-Typer 5.0.1
◆ isSpecialKey()
bool KeyboardUtils::isSpecialKey |
( |
const KeyEvent & |
event | ) |
|
|
static |
Returns true if the key is a special key.
Special keys are ignored by default.
The documentation for this class was generated from the following files:
- src/framework/keyboard/internal/KeyboardUtils.h
- src/framework/keyboard/internal/KeyboardUtils.cpp