1 | // Copyright (C) 2016 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
3 | |
4 | #include <QtVirtualKeyboard/private/fallbackinputmethod_p.h> |
5 | #include <QtVirtualKeyboard/qvirtualkeyboardinputcontext.h> |
6 | |
7 | QT_BEGIN_NAMESPACE |
8 | namespace QtVirtualKeyboard { |
9 | |
10 | /*! |
11 | \class QtVirtualKeyboard::DefaultInputMethod |
12 | \internal |
13 | */ |
14 | |
15 | FallbackInputMethod::FallbackInputMethod(QObject *parent) : |
16 | QVirtualKeyboardAbstractInputMethod(parent) |
17 | { |
18 | } |
19 | |
20 | QList<QVirtualKeyboardInputEngine::InputMode> FallbackInputMethod::inputModes(const QString &locale) |
21 | { |
22 | Q_UNUSED(locale); |
23 | return QList<QVirtualKeyboardInputEngine::InputMode>(); |
24 | } |
25 | |
26 | bool FallbackInputMethod::setInputMode(const QString &locale, QVirtualKeyboardInputEngine::InputMode inputMode) |
27 | { |
28 | Q_UNUSED(locale); |
29 | Q_UNUSED(inputMode); |
30 | return true; |
31 | } |
32 | |
33 | bool FallbackInputMethod::setTextCase(QVirtualKeyboardInputEngine::TextCase textCase) |
34 | { |
35 | Q_UNUSED(textCase); |
36 | return true; |
37 | } |
38 | |
39 | bool FallbackInputMethod::keyEvent(Qt::Key key, const QString &text, Qt::KeyboardModifiers modifiers) |
40 | { |
41 | const Qt::KeyboardModifiers mods = (key == Qt::Key_Return) ? Qt::NoModifier : modifiers; |
42 | inputContext()->sendKeyClick(key, text, modifiers: mods); |
43 | return true; |
44 | } |
45 | |
46 | void FallbackInputMethod::reset() |
47 | { |
48 | } |
49 | |
50 | void FallbackInputMethod::update() |
51 | { |
52 | } |
53 | |
54 | } // namespace QtVirtualKeyboard |
55 | QT_END_NAMESPACE |
56 |