KWin
Loading...
Searching...
No Matches
bouncekeys.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2023 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 BounceKeysFilter();
19
20 bool keyEvent(KWin::KeyEvent *event) override;
21
22private:
23 void loadConfig(const KConfigGroup &group);
24
25 KConfigWatcher::Ptr m_configWatcher;
26 std::chrono::milliseconds m_delay;
27 QHash<int, std::chrono::microseconds> m_lastEvent;
28};
bool keyEvent(KWin::KeyEvent *event) override