KWin
Loading...
Searching...
No Matches
stickykeys.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2022 Nicolas Fella <nicolas.fella@gmx.de>
3
4 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
5*/
6
7#pragma once
8
9#include "plugin.h"
10
11#include "input.h"
12#include "input_event.h"
13
15{
16 Q_OBJECT
17public:
18 explicit StickyKeysFilter();
19
20 bool keyEvent(KWin::KeyEvent *event) override;
21
27
28private:
29 void loadConfig(const KConfigGroup &group);
30
31 KConfigWatcher::Ptr m_configWatcher;
32 QMap<int, KeyState> m_keyStates;
33 QList<int> m_modifiers = {Qt::Key_Shift, Qt::Key_Control, Qt::Key_Alt, Qt::Key_AltGr, Qt::Key_Meta};
34 bool m_lockKeys = false;
35};
bool keyEvent(KWin::KeyEvent *event) override