Diagonal Swipe Gesture Support

I regularly use the Command+Three-Finger-Swipes gestures to move my windows to the left/right/top/bottom halves of the screen. But something occurred to me today. If BTT had the option to use diagonal swipes (maybe this could be enabled in settings as to leave the current direction-detection algorithm alone if wanted), then I could also quickly/easily fling a window into a corner of the screen! For instance 'Three Finger Swipe Up-Left would go to the top left, etc.

Just a thought

This might already be possible with advanced trigger conditions, I'll have a look.

Personally I'm using this simple floating menu, maybe that could also work for you:

In this setup it is triggered by a two finger swipe up, but only when a window's titlebar is hovered:
window-management.bttpreset (122.0 KB)

Awesome! Lemme know what you find! I'll take a look at that from my side too.

I ended up doing it via keyboard sequences. I had been using your keyboard shortcuts feature for years for window management, but for anything more than 'halves' or 'maximize', it never really felt intuitive since it required remembering various modifiers, especially with 'quarters' and 'thirds'.

But... changing it to keyboard sequences with careful use of 'key up' requirements on the modifier key specifically, as well as regular keyboard shortcuts to 'swallow' them (as not to pass through to macOS), I now have something that feels both simple and intuitive with only a single modifier key, Control!

As an example, I can now do things like...

Control-Left -> Left Half
Control-Left, Left -> Left third
Control-Left, Left, Left -> Left two-thirds
Control-Left, Right -> Left two-thirds (alternate that's shorter to type)
Control-Left, Up -> Top Left corner
Control-Up, Left -> Top Left Corner (alternate since up-left is the same as left-up)
etc.

As for how to have sequences whose chains 'overlap', the short of it was figuring this out...

  1. Ignore all 'up' key events except for the last modifier-up.
  2. If you're at the end of a sequence chain (i.e. Command-Left, Left, Left is at the end whereas Command-Left and Command-Left, Left are not since they're part of the same sequence) you can remove the modifier-up making that last one more responsive.
  3. You still use keyboard shortcuts to 'swallow' the first part of all the chains (i.e. define Command-Left with no action assigned to it) to keep it from being passed thru to macOS meaning triggering a sequence will never have side-effects on the os.

I'm attaching my config specifically around window management here. Happy to share this with your site's visitors too if you think it's worth it. I have to say... it's really improved things for me.

Mark's Window Management.bttpreset (125.6 KB)

1 Like