Closed RedBearAK closed 2 years ago
It is possible to define a keyboard shortcut to trigger some window management action with a KWin script.
But, in case that was your idea, I'm not going to do a complete reimplementation of the task switcher with a KWin script. I know nothing about UI development so you wouldn't get any visualization, it would be a massive duplication of efforts when it is much easier to adapt the existing task switcher code, and it wouldn't solve the problem related to holding Alt pressed (which, from what I understand, is the only problem remaining) anyway because the scripting API's shortcut functionality can only register simple shortcuts triggered on key release.
@nclarius
Right, that would lose the visualization. I was just curious if it was possible.
the scripting API's shortcut functionality can only register simple shortcuts triggered on key release.
I see. Yes, the best place for continued discussion would probably be the KDE bug thread. You mentioned there that the task switcher is actually capable of knowing which keys are pressed and thus performing different actions. So that would be the best way to move forward.
Closing.
@nclarius
Hey, question. I just had a thought, and it's probably a bad one, but would the Kwin script be able to watch for a specific keyboard shortcut, separate from the system keyboard shortcut that triggers the window activation events? Or is the script only capable of watching for the actual window switching/activation events that result from using the system shortcut?
Like, what if I removed the standard keyboard shortcuts from the task switcher settings, and just let the app switcher script entirely take over window switching logic, from beginning to end?
Or would that be stepping completely outside of what Kwin scripting can do?