Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwasmkeytranslator.h
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QWASMKEYTRANSLATOR_H
5#define QWASMKEYTRANSLATOR_H
6
7#include <QtCore/qnamespace.h>
8#include <QtCore/qtypes.h>
9
10#include <optional>
11
12QT_BEGIN_NAMESPACE
13
14struct KeyEvent;
15
17std::optional<Qt::Key> mapWebKeyTextToQtKey(const char *toFind);
18}
19
21{
22public:
25
27
28private:
29 Qt::Key m_activeDeadKey = Qt::Key_unknown;
30 Qt::Key m_keyModifiedByDeadKeyOnPress = Qt::Key_unknown;
31};
32
33QT_END_NAMESPACE
34#endif // QWASMKEYTRANSLATOR_H
void applyDeadKeyTranslations(KeyEvent *event)
QFlags< Qt::KeyboardModifier > getKeyboardModifiers(const emscripten::val &event)
constexpr std::string_view WebDeadKeyValue
bool isDeadKeyEvent(const char *key)
Qt::Key webKeyToQtKey(const std::string &code, const std::string &key, bool isDeadKey, QFlags< Qt::KeyboardModifier > modifiers)
Qt::Key getKeyFromCode(const std::string &code)
std::optional< Qt::Key > mapWebKeyTextToQtKey(const char *toFind)
DeltaMode
Definition qwasmevent.h:53
PointerType
Definition qwasmevent.h:41
EventType
Definition qwasmevent.h:24
DragEvent(EventType type, emscripten::val webEvent, QWindow *targetQWindow)
void acceptDrop()
void acceptDragOver()
void cancelDragStart()
QWindow * targetWindow
Definition qwasmevent.h:150
bool isTargetedForQtElement() const
Event(EventType type, emscripten::val webEvent)
EventType type
Definition qwasmevent.h:62
bool deadKey
Definition qwasmevent.h:72
bool autoRepeat
Definition qwasmevent.h:74
KeyEvent(EventType type, emscripten::val webEvent, QWasmDeadKeySupport *deadKeySupport)
MouseEvent(EventType type, emscripten::val webEvent)
PointerType pointerType
Definition qwasmevent.h:128
PointerEvent(EventType type, emscripten::val webEvent)
DeltaMode deltaMode
Definition qwasmevent.h:157
WheelEvent(EventType type, emscripten::val webEvent)
bool webkitDirectionInvertedFromDevice
Definition qwasmevent.h:158