KWin
Loading...
Searching...
No Matches
keyboard.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6#pragma once
7
8#include "kwin_export.h"
9
10#include <QObject>
11
12namespace KWin
13{
14class ClientConnection;
15class SeatInterface;
16class SurfaceInterface;
17class KeyboardInterfacePrivate;
18
19enum class KeyboardKeyState : quint32;
20
24class KWIN_EXPORT KeyboardInterface : public QObject
25{
26 Q_OBJECT
27public:
29
33 SurfaceInterface *focusedSurface() const;
34
38 qint32 keyRepeatRate() const;
42 qint32 keyRepeatDelay() const;
43 void setKeymap(const QByteArray &content);
44
55 void setRepeatInfo(qint32 charactersPerSecond, qint32 delay);
56
57 void sendKey(quint32 key, KeyboardKeyState state);
58 void sendKey(quint32 key, KeyboardKeyState state, ClientConnection *client);
59 void sendModifiers(quint32 depressed, quint32 latched, quint32 locked, quint32 group);
60
61private:
62 void setFocusedSurface(SurfaceInterface *surface, quint32 serial);
63 void setModifierFocusSurface(SurfaceInterface *surface);
64 friend class SeatInterface;
67 explicit KeyboardInterface(SeatInterface *seat);
68
69 std::unique_ptr<KeyboardInterfacePrivate> d;
70};
71
72}
73
Convenient Class which represents a wl_client.
Resource for the wl_keyboard interface.
Definition keyboard.h:25
~KeyboardInterface() override
Represents a Seat on the Wayland Display.
Definition seat.h:134
Resource representing a wl_surface.
Definition surface.h:80
Q_DECLARE_METATYPE(KWin::SwitchEvent::State)
KeyboardKeyState
Definition seat.h:82