6#include <QtInputSupport/private/qevdevutil_p.h>
9#include <QCoreApplication>
10#include <QLoggingCategory>
12#include <private/qguiapplication_p.h>
13#include <private/qinputdevicemanager_p_p.h>
33 m_spec = std::move(parsed.spec);
39 if (parsed.devices.isEmpty()) {
40 qCDebug(qLcEvdevKey,
"evdevkeyboard: Using device discovery");
64 m_keyboards.
add(deviceNode, std::move(keyboard));
73 if (m_keyboards.
remove(deviceNode)) {
79void QEvdevKeyboardManager::updateDeviceCount()
87 m_defaultKeymapFile =
file;
94 for (
const auto &
arg : specs) {
95 if (
arg.startsWith(
"keymap="_L1))
96 keymapFromSpec =
arg.mid(7).toString();
98 for (
const auto &keyboard : m_keyboards) {
100 keyboard.handler->unloadKeymap();
102 keyboard.handler->loadKeymap(keymapFromSpec);
105 for (
const auto &keyboard : m_keyboards)
106 keyboard.handler->loadKeymap(
file);
112 for (
const auto &keyboard : m_keyboards)
113 keyboard.handler->switchLang();
IOBluetoothDevice * device
void deviceDetected(const QString &deviceNode)
static QDeviceDiscovery * create(QDeviceTypes type, QObject *parent=nullptr)
void deviceRemoved(const QString &deviceNode)
static std::unique_ptr< QEvdevKeyboardHandler > create(const QString &device, const QString &specification, const QString &defaultKeymapFile=QString())
void removeKeyboard(const QString &deviceNode)
void addKeyboard(const QString &deviceNode=QString())
void loadKeymap(const QString &file)
static QInputDeviceManager * inputDeviceManager()
\macro QT_RESTRICTED_CAST_FROM_ASCII
QStringList split(const QString &sep, Qt::SplitBehavior behavior=Qt::KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Splits the string into substrings wherever sep occurs, and returns the list of those strings.
static QString fromLocal8Bit(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
ParsedSpecification parseSpecification(const QString &specification)
Combined button and popup list for selecting options.
#define qCDebug(category,...)
#define Q_DECLARE_LOGGING_CATEGORY(name)
#define qUtf16Printable(string)
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
connect(quitButton, &QPushButton::clicked, &app, &QCoreApplication::quit, Qt::QueuedConnection)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent