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
7QT_BEGIN_NAMESPACE
8namespace QtVirtualKeyboard {
9
10/*!
11 \class QtVirtualKeyboard::DefaultInputMethod
12 \internal
13*/
14
15FallbackInputMethod::FallbackInputMethod(QObject *parent) :
16 QVirtualKeyboardAbstractInputMethod(parent)
17{
18}
19
20QList<QVirtualKeyboardInputEngine::InputMode> FallbackInputMethod::inputModes(const QString &locale)
21{
22 Q_UNUSED(locale);
23 return QList<QVirtualKeyboardInputEngine::InputMode>();
24}
25
26bool FallbackInputMethod::setInputMode(const QString &locale, QVirtualKeyboardInputEngine::InputMode inputMode)
27{
28 Q_UNUSED(locale);
29 Q_UNUSED(inputMode);
30 return true;
31}
32
33bool FallbackInputMethod::setTextCase(QVirtualKeyboardInputEngine::TextCase textCase)
34{
35 Q_UNUSED(textCase);
36 return true;
37}
38
39bool 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
46void FallbackInputMethod::reset()
47{
48}
49
50void FallbackInputMethod::update()
51{
52}
53
54} // namespace QtVirtualKeyboard
55QT_END_NAMESPACE
56

source code of qtvirtualkeyboard/src/virtualkeyboard/fallbackinputmethod.cpp