Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qplatformkeymapper.cpp
Go to the documentation of this file.
1
// Copyright (C) 2023 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
include
"qplatformkeymapper.h"
6
7
#
include
<
private
/
qguiapplication_p
.
h
>
8
#
include
<
qpa
/
qplatformintegration
.
h
>
9
10
QT_BEGIN_NAMESPACE
11
12
Q_LOGGING_CATEGORY(lcQpaKeyMapper,
"qt.qpa.keymapper"
)
13
14
QPlatformKeyMapper::~QPlatformKeyMapper()
15
{
16
}
17
18
/*
19
Should return a list of possible key combinations for the given key event.
20
21
For example, given a US English keyboard layout, the key event Shift+5
22
can represent both a "Shift+5" key combination, as well as just "%".
23
*/
24
QList<QKeyCombination> QPlatformKeyMapper::possibleKeyCombinations(
const
QKeyEvent *event)
const
25
{
26
auto
*platformIntegration = QGuiApplicationPrivate::platformIntegration();
27
QList<
int
> possibleKeys = platformIntegration->possibleKeys(event);
28
QList<QKeyCombination> combinations;
29
for
(
int
key : possibleKeys)
30
combinations << QKeyCombination::fromCombined(key);
31
return
combinations;
32
}
33
34
Qt::KeyboardModifiers QPlatformKeyMapper::queryKeyboardModifiers()
const
35
{
36
return
QGuiApplicationPrivate::platformIntegration()->queryKeyboardModifiers();
37
}
38
39
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtbase
src
gui
kernel
qplatformkeymapper.cpp
Generated on
for Qt by
1.18.0