KWin
Loading...
Searching...
No Matches
x11_standalone_keyboard.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2022 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "x11eventfilter.h"
10
11#include <xkbcommon/xkbcommon.h>
12
13#include <memory>
14
15namespace KWin
16{
17
18class X11KeyboardFilter;
19
21{
22public:
25
26 xkb_keymap *xkbKeymap() const;
27 xkb_state *xkbState() const;
28 Qt::KeyboardModifiers modifiers() const;
29
30 bool event(xcb_generic_event_t *event);
31
32private:
33 void updateKeymap();
34
35 xkb_context *m_xkbContext = nullptr;
36 xkb_keymap *m_xkbKeymap = nullptr;
37 xkb_state *m_xkbState = nullptr;
38 int32_t m_deviceId = 0;
39
40 std::unique_ptr<X11KeyboardFilter> m_filter;
41};
42
43} // namespace KWin
xkb_state * xkbState() const
xkb_keymap * xkbKeymap() const
Qt::KeyboardModifiers modifiers() const
bool event(xcb_generic_event_t *event)