KWin
Loading...
Searching...
No Matches
kwin-6.0-delete-desktop-switching-shortcuts.cpp
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2023 Marco Martin <mart@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include <KGlobalAccel>
8
9#include <QAction>
10#include <QGuiApplication>
11#include <QStandardPaths>
12
13int main(int argc, char **argv)
14{
15 QGuiApplication app(argc, argv);
16
17 const QStringList actionNames{
18 QStringLiteral("Walk Through Desktops"),
19 QStringLiteral("Walk Through Desktops (Reverse)"),
20 QStringLiteral("Walk Through Desktop List"),
21 QStringLiteral("Walk Through Desktop List (Reverse)"),
22 };
23
24 for (const QString &actionName : actionNames) {
25 QAction action;
26 action.setObjectName(actionName);
27 action.setProperty("componentName", QStringLiteral("kwin"));
28 KGlobalAccel::self()->setShortcut(&action, {QKeySequence()}, KGlobalAccel::NoAutoloading);
29 KGlobalAccel::self()->removeAllShortcuts(&action);
30 }
31
32 return 0;
33}