this post was submitted on 06 Mar 2025
9 points (100.0% liked)

KDE

6211 readers
50 users here now

KDE is an international technology team creating user-friendly free and open source software for desktop and portable computing. KDE’s software runs on GNU/Linux, BSD and other operating systems, including Windows.

Plasma 6 Bugs

If you encounter a bug, proceed to https://bugs.kde.org/, check whether it has been reported.

If it hasn't, report it yourself.

PLEASE THINK CAREFULLY BEFORE POSTING HERE.

Developers do not look for reports on social media, so they will not see it and all it does is clutter up the feed.

founded 2 years ago
MODERATORS
 

Hi,

I followed this blog post on how to exclude alt+tab from "ignore global shortcuts" since I have a game that behaves a bit weird with global shortcuts but I want to be able to tab out of it.

Since I'm on openSuse, I followed the blog-entry and an openSuse guide to create a patch and I've created one for kglobalaccel-5.x as follows:

***
a/src/runtime/component.cpp	2024-05-04 13:39:39.000000000 +0200
+++ b/src/runtime/component.cpp	2025-03-03 23:56:39.073843737 +0100
@@ -166,6 +166,9 @@
 void Component::deactivateShortcuts(bool temporarily)
 {
     for (GlobalShortcut *shortcut : std::as_const(_current->_actionsMap)) {
+        if (shortcut->uniqueName() == QLatin1String("Walk Through Windows")){
+            continue;
+        }
         if (temporarily //
             && _uniqueName == QLatin1String("kwin") //
             && shortcut->uniqueName() == QLatin1String("Block Global Shortcuts")) {

Just to realize afterwards that I'm using KDE6 and not KDE5...

I've downloaded the source for kglobalaccel-6.x afterwards to change it there, but there is no component.cpp...

Does anyone know where I can insert this or a similar (if possible with the code) if-clause for the alt+tab shortcut to be excluded from ignoring all shortcuts for a specific window?

I've found a component.cpp in kglobacceld with this method, but I'm not sure if I did it right since it doesn't exclude the shortcut. If it makes a difference, my system language is set to German.

Thanks in advance for any help :)

top 1 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 2 weeks ago

It seems the function has been moved to kglobalacceld/src/component.cpp: https://github.com/KDE/kglobalacceld/blob/master/src/component.cpp#L162