| 1 |
// SPDX-FileCopyrightText: 2022 Uniontech Software Technology Co.,Ltd. |
| 2 |
// |
| 3 |
// SPDX-License-Identifier: LGPL-3.0-or-later |
| 4 |
|
| 5 |
#ifndef DKEYBOARD_H |
| 6 |
#define DKEYBOARD_H |
| 7 |
|
| 8 |
#include <QObject> |
| 9 |
#ifndef D_DEEPIN_IS_DWAYLAND |
| 10 |
#include <KWayland/Client/ddekeyboard.h> |
| 11 |
#else |
| 12 |
#include <DWayland/Client/ddekeyboard.h> |
| 13 |
#endif |
| 14 |
using namespace KWayland::Client; |
| 15 |
|
| 16 |
namespace QtWaylandClient { |
| 17 |
|
| 18 |
class DKeyboard : public QObject |
| 19 |
{ |
| 20 |
Q_OBJECT |
| 21 |
public: |
| 22 |
explicit DKeyboard(QObject *parent = nullptr); |
| 23 |
virtual ~DKeyboard(); |
| 24 |
|
| 25 |
public slots: |
| 26 |
void handleKeyEvent(quint32 key, DDEKeyboard::KeyState state, quint32 time); |
| 27 |
void handleModifiersChanged(quint32 depressed, quint32 latched, quint32 locked, quint32 group); |
| 28 |
}; |
| 29 |
|
| 30 |
} |
| 31 |
|
| 32 |
#endif // DKEYBOARD_H |