Changeset View
Changeset View
Standalone View
Standalone View
keyboard_input.h
Show All 23 Lines | |||||
24 | 24 | | |||
25 | #include <QObject> | 25 | #include <QObject> | ||
26 | #include <QPointer> | 26 | #include <QPointer> | ||
27 | #include <QPointF> | 27 | #include <QPointF> | ||
28 | 28 | | |||
29 | #include <QLoggingCategory> | 29 | #include <QLoggingCategory> | ||
30 | Q_DECLARE_LOGGING_CATEGORY(KWIN_XKB) | 30 | Q_DECLARE_LOGGING_CATEGORY(KWIN_XKB) | ||
31 | 31 | | |||
32 | #include <KSharedConfig> | ||||
33 | | ||||
32 | class QWindow; | 34 | class QWindow; | ||
33 | struct xkb_context; | 35 | struct xkb_context; | ||
34 | struct xkb_keymap; | 36 | struct xkb_keymap; | ||
35 | struct xkb_state; | 37 | struct xkb_state; | ||
36 | struct xkb_compose_table; | 38 | struct xkb_compose_table; | ||
37 | struct xkb_compose_state; | 39 | struct xkb_compose_state; | ||
38 | typedef uint32_t xkb_mod_index_t; | 40 | typedef uint32_t xkb_mod_index_t; | ||
39 | typedef uint32_t xkb_led_index_t; | 41 | typedef uint32_t xkb_led_index_t; | ||
Show All 13 Lines | |||||
53 | class Device; | 55 | class Device; | ||
54 | } | 56 | } | ||
55 | 57 | | |||
56 | class KWIN_EXPORT Xkb | 58 | class KWIN_EXPORT Xkb | ||
57 | { | 59 | { | ||
58 | public: | 60 | public: | ||
59 | Xkb(InputRedirection *input); | 61 | Xkb(InputRedirection *input); | ||
60 | ~Xkb(); | 62 | ~Xkb(); | ||
63 | void setConfig(KSharedConfigPtr config) { | ||||
64 | m_config = config; | ||||
65 | } | ||||
61 | void reconfigure(); | 66 | void reconfigure(); | ||
62 | 67 | | |||
63 | void installKeymap(int fd, uint32_t size); | 68 | void installKeymap(int fd, uint32_t size); | ||
64 | void updateModifiers(uint32_t modsDepressed, uint32_t modsLatched, uint32_t modsLocked, uint32_t group); | 69 | void updateModifiers(uint32_t modsDepressed, uint32_t modsLatched, uint32_t modsLocked, uint32_t group); | ||
65 | void updateKey(uint32_t key, InputRedirection::KeyboardKeyState state); | 70 | void updateKey(uint32_t key, InputRedirection::KeyboardKeyState state); | ||
66 | xkb_keysym_t toKeysym(uint32_t key); | 71 | xkb_keysym_t toKeysym(uint32_t key); | ||
67 | xkb_keysym_t currentKeysym() const { | 72 | xkb_keysym_t currentKeysym() const { | ||
68 | return m_keysym; | 73 | return m_keysym; | ||
▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Line(s) | 110 | private: | |||
131 | } m_modOnlyShortcut; | 136 | } m_modOnlyShortcut; | ||
132 | quint32 m_currentLayout = 0; | 137 | quint32 m_currentLayout = 0; | ||
133 | 138 | | |||
134 | struct { | 139 | struct { | ||
135 | xkb_compose_table *table = nullptr; | 140 | xkb_compose_table *table = nullptr; | ||
136 | xkb_compose_state *state = nullptr; | 141 | xkb_compose_state *state = nullptr; | ||
137 | } m_compose; | 142 | } m_compose; | ||
138 | LEDs m_leds; | 143 | LEDs m_leds; | ||
144 | KSharedConfigPtr m_config; | ||||
139 | }; | 145 | }; | ||
140 | 146 | | |||
141 | class KWIN_EXPORT KeyboardInputRedirection : public QObject | 147 | class KWIN_EXPORT KeyboardInputRedirection : public QObject | ||
142 | { | 148 | { | ||
143 | Q_OBJECT | 149 | Q_OBJECT | ||
144 | public: | 150 | public: | ||
145 | explicit KeyboardInputRedirection(InputRedirection *parent); | 151 | explicit KeyboardInputRedirection(InputRedirection *parent); | ||
146 | virtual ~KeyboardInputRedirection(); | 152 | virtual ~KeyboardInputRedirection(); | ||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |