Keyboard shortcuts for new tiling feature

Hi all.

Coming from Windows and FancyZones, I’m a huge fan of the new tiling feature added in Plasma 5.27. However one issue I am facing is the ability to bind keyboard shortcuts to snapping windows into the new predefined tile zones.

I’m aware this may not be an existing feature, however from what I have read online, the new tiling implementation is supposed to have some sort of API that be consumed with KWin scripts. I’m totally happy to get my hands dirty if someone can point me in the right direction.

Thanks in advance.

3 Likes

You can generally snap them in place by dragging them while holding shift (just in case that is what you or someone who is stumbling on this mean).
I would also be interested if you found general keyboard shortcuts here, or even a way to overwrite the windows+arrow key shortcuts to use the defined zones instead of the default half/quarter behavior.

1 Like

Did anything ever come of this? I would be very interested in shortcuts for this tiling option, or a native ability to have gaps with the zones shortcuts.

1 Like

+1

I use :window: plus one of the arrow keys to quickly shove windows to the left or right all the time, but sometimes custom tiling (rather than half the screen size) would be more useful. Ideally. :window: :arrow_up: and one of the arrow keys should do this, but there is no option to bind these keys to the custom tiling functions.

My mouse has a tendency to hide somewhere :wink:

1 Like

Reviving this thread to say that keyboard shortcuts for the Custom Tiling (introduced in 5.27) would be fantastic, and are a must to fully complete this feature.

I’ve also grown accustomed to the PowerToys FancyZones applet on Windows, and it has two options that I’d like to highlight as great additions to Plasma:

  1. Customizing the binding that held to activate Custom Tiling when dragging a window.

    In FancyZones, this can be bound to Right Click, allowing the user to snap windows to their custom tiles entirely from the mouse, no keyboard input required.
    In Plasma, the default binding of Shift is great, but at a minimum, this should be customizable like all other KWin keyboard shortcuts in the Settings app.

  2. Keyboard shortcuts for moving apps between the custom tiles.

    Both Windows and Plasma use the default shortcuts of Meta+Left Arrow and Meta+Right Arrow to move a window to the left / right half of the current display.
    With FancyZones, these shortcuts can be overridden so that they instead move a window to the previous / next custom tiling zone.
    In Plasma, it might be better to provide alternative default bindings for moving between custom tiling zones. Perhaps Meta+Ctrl+Left and Meta+Ctrl+Right?
    It might be even better to have 4 shortcuts for moving between custom tiles in all cardinal directions, instead of simply previous / next tile, although I imagine this would be more complex to implement.

Both of these features seem like essential additions to Plasma, but number 1 seems a lot easier to implement. Somewhere in the codebase, the Shift key must be hard-coded as the button to activate custom tiling, and it would just be a matter of changing this to a keyboard shortcut via the Settings app. Then again, I’m not a Plasma contributor, so maybe I’m mistaken.

It’s coming :slight_smile:

3 Likes

:astonished: Oh sweet! I missed that newsletter entirely in my searching, thanks for letting me know. Can’t wait for 6.3!

Hey, I’ve tried using the new shortcuts for Custom Tiling, but I’m struggling with getting them to work:

  1. When I press any of my configured shortcuts (up/down/left/right), the window always moves to the same tile position - seemingly the nearest custom tile - regardless of the direction I specified.

  2. Once a window is placed in a custom tile, none of my shortcuts can move it to a different tile position.

Has anyone tested this functionality? Am I missing something in the setup?​​​​​​​​​​​​​​​​

Works very well over here. I have a layout with a wide left column that is split into a top part (~2/3) and a bottom part (~1/3) and a smaller right column.

Even though it may be obvious – just to make sure:

  • Did you actually define a custom layout? I would expect so, but maybe double-check by pressing METAT.
  • Are your keyboard shortcuts configured correctly? Actually, on my system, I either configured only 2 of the 4 shortcuts, or they got lost inbetween. I had to re-configure the shortcuts, now it’s working very well.

HTH

1 Like

Thanks for the reply, i double checked your suggestions but everything’s ok here.

I’ve begun to experiment and found that having display scale different (both less and more) than 100% causes the mentioned behavior.

Could you try to reproduce?

Good catch!

Indeed, when I use my laptop’s screen (scale factor 1.5, 3k, 14"), the shortcuts no longer work. Or rather, at first it works, making the window jump to a custom tile, but afterwards, all shortcuts do nothing.

When switching back to the external screen (scale factor 1.0), the keyboard shortcuts work again, but my custom layout is gone.

I guess we should open a bug report so the KDE programmers can have a look at it – are you going to do it? I can do it, too, but not right now :wink:

Happy to open a bug :bug:

Thanks!

https://bugs.kde.org/show_bug.cgi?id=500666

Amazing, that got fixed really quick :flushed: Coming in 6.3.3 as I understand.