Have one keybind do two default actions?

To make the title clear: I am looking for a way to have one keybind do two things that are already bound by default to two seperate things. Those being (rough polish translation), “Move mouse to active window” (Przenieś mysz do uaktywnienia), and “Switch to window on the right” (Przełącz do okna z prawej)

Now, I know you can’t bind a key/key combo to the same thing and I’d need to make a script that would somehow do both of those things at the same time. I don’t know where to begin when it comes to even starting something like this, the base functionality for this by default in the plasma desktop, but I’m not sure how I’d make the two things happen under one keybind. Has anyone else tried this?

This is pretty important to me as that was an extremely useful feature to me during my time using hyprland and being able to switch windows like that is pretty central to my workflow.
Although the mouse switching is to the current active window is more so a convince thing as it’s hard for me to tell what window I am focused on otherwise.

Thank you in advance!

Hi. I don’t have a real answer to that but I would also be interested. Actually I have a keybinding for cursor go to active windows (so when I focus a windows I can have the cursor come here).
To me I would prefer to have a settings like cursor/mouse follow active/focused window along side focus follow mouse.

A workaround (as often) would be a kwin script adding keybindings that does just what you say. It doesn’t seem too complicate but someone knowing how to write such script need to do it. I unfortunately don’t have such knowledge.

I saw your post and looked for scripting options.
This came up in my web searching KWin scripting tutorial | Developer a tutorial on scripting kwin.

Someone (not me) just create a kwin script to do that

not tested yet it is really new …