I did find the QKeySequence in the code and was about to look it up. So it was pretty much what I was assuming, multiple combos or a combo and then keys in a sequence, which is why they are usually “0, 0, 0” for conventional shortcuts. Makes sense. I never really got into multi-combo sequences because it’s just too much to remember. But nice that they are supported by the infrastructure.
That treatise on logical task switching was excellent. I enjoyed that. Very well though out. I’m sure it works well for you.
I used Windows for over a decade during the 90s and early 2000s, so of course my understanding of task switching was just Alt+Tabbing through potentially a couple of dozen different individual windows. Usually when there were more than a few windows, clicking on the right window in the task bar was far more efficient. I didn’t really use keyboard shortcuts until I started using BeOS, which had based their keyboard shortcuts on macOS. So on a PC laptop, BeOS used the Alt key as the primary modifier.
Moving to Mac OS X after that was quite smooth, since the shortcuts were physically the same. Then I spent 20 years slowly building up common shortcuts as reflexes in muscle memory. Attempting to use Linux for anything productive was painful, because it uses the Windows-style task switching (between windows).
The app overviews in GNOME and now Plasma are quite nice, but just like in macOS I don’t usually find them very useful. I rarely used Exposé in macOS. For one thing, my eyes are not “fast”, and get overwhelmed by too much detail on the screen, and a lot of windows tend to start really looking the same, especially as they shrink. I also have a poor working memory, so if I had to remember the name of each window I wanted to switch to, even partially, I’d be far less efficient.
The task switching style I got used to in macOS is something that seems to aggravate an awful lot of folks who try to use macOS after coming from Windows or Linux, because it feels “constrictive” if you’re used to individual window switching. But once I started to finally work with it instead of against it, grouped-application task switching became a much simpler thing for me. Maybe not always as efficient as possible, but understandable, and requiring limited mental effort. Because all I’m doing when switching apps is looking at a unique icon. Not window contents or previews. Until I switch windows within one “app”. Where distinguishing between those windows tends to be much easier. Or there are just one, two, or three windows of the app open, so it’s easy to remember and get to the right one in that limited “corral”.
I like to think about it like a farmyard where each type of animal is herded into their own corral. If I want to see the horses, I go to the horse corral. If the horse I want to see isn’t next to the fence already, I call over the one I want with Alt+Grave. No big deal. It’s a very calming way of task switching, for me.
This can of course also work with multiple workspaces, but I spent a long time on macOS having no real need for more than one workspace with this “grouped” way of moving around between tasks. It was very disappointing coming to Linux and not having that task switching style available as an option.
I did eventually discover that GNOME can do this, and even better than macOS, if you have the “Switch applications” shortcut as the main task switching shortcut. It completely changes the task switcher dialog in GNOME, so that each “application” is represented by its icon, just like in macOS. Unfortunately most distros have the “Switch windows” shortcut as the main shortcut, so it took me a long time to realize there was an alternative.
So I was stuck in GNOME for a long time, partly because I like that style of task switching. Then Natalie Clarius put together a KWin script for me that mimics this in Plasma 5, and later I adapted the script to work with both Plasma 5 and 6. But the Plasma task switcher settings also have to be tweaked to make everything make sense when combined with the KWin script. Thus why I disable the in-app shortcuts on “Main” and enable them on the “Alternative” tab.
One of the main problems I still have is a bug with the Plasma task switcher continuing to use the “Main” tab box UI (large icons) when I don’t let go of the Alt key before moving from Alt+Tabbing to Alt+Graving, where it should use the “Alternative” tab box UI choice (thumbnail grid). That bug still hasn’t been addressed at all in Plasma 6.
Another one is this bug, where switching from Alt+Tabbing to Alt+Graving without letting go of the Alt key will unexpectedly switch to the application whose windows you’re Alt+Graving through.
https://bugs.kde.org/show_bug.cgi?id=454413
That doesn’t happen in GNOME, where you can Alt+Tab to the app icon, then Alt+Grave through its window thumbnails, and no switching happens until you finally release the Alt key. In this way, you can choose to bring only a single window of an app forward, rather than the entire app group. This is useful on occasion, but I can’t do it in Plasma.
In GNOME, you can even hit Escape while holding the Alt key and it won’t switch windows at all. Nice if you just want to remind yourself something about a window that is open in another “app”, but don’t actually want to switch to it right then. This is not the case in Plasma, even with the KWin script, which can’t stop the task switcher from immediately switching apps when changing the shortcut.
Anway, Plasma 6.1 is still more than good enough in combination with the KWin script that I’ve finally broken free of years of GNOME.
And I guess I should follow up on the talk about all the macOS shortcuts I have in muscle memory, because that’s an important part of this puzzle. Years ago I found Kinto.sh by Ben Reaves, and it worked so well that I contributed to it and then eventually created my own project that used its keymapper config as a base. I called my project Toshy. Just like Kinto, it does a great job at overlaying all kinds of general and app-specific shortcuts in Linux with non-destructive remaps that get Linux to react like macOS would when using an Apple keyboard on a Mac.
GitHub - RedBearAK/toshy: Keymapper config to make Linux work like a 'Tosh! (short URL https://toshy.app)
This plus the task switching fixes allows me to live in Linux with limited irritation, at least as far as keyboard shortcuts and task switching goes. But that makes up for a lot of other minor irritations.
One of the few things the keymapper config can’t fix is this issue with having dual visualization options in Plasma’s task switcher. I have a special option for the Toshy installer that tries to fix all that automatically. That’s going to require a log out until I can perfect the D-Bus calls without causing the in-app task switching bug.