Skip to content

✨ Trackpad gestures#1064

Draft
MrKai77 wants to merge 14 commits intodevelopfrom
subsurface-gestures
Draft

✨ Trackpad gestures#1064
MrKai77 wants to merge 14 commits intodevelopfrom
subsurface-gestures

Conversation

@MrKai77
Copy link
Copy Markdown
Owner

@MrKai77 MrKai77 commented Mar 5, 2026

Adds trackpad gestures!

Subsurface is a Swift package that provides a clean interface to the private MultitouchSupport framework. I haven’t made the package public just yet, but it’ll be fully available to everyone once this PR is merged :) I just want to do a bit more testing first to make sure everything works reliably.

Anyway, here’s a small demo. The plan is for it to trigger only when the cursor is over the title bar, similar to Swish:

gestures.mp4

@MrKai77 MrKai77 self-assigned this Mar 5, 2026
@MrKai77 MrKai77 changed the title ✨ Subsurface trackpad gestures ✨ Trackpad gestures Mar 5, 2026
@MrKai77 MrKai77 linked an issue Mar 5, 2026 that may be closed by this pull request
2 tasks
@MrKai77 MrKai77 added the Feature label Mar 5, 2026
@SenpaiHunters SenpaiHunters marked this pull request as draft March 5, 2026 04:45
@SenpaiHunters
Copy link
Copy Markdown
Collaborator

Remember to update the readme table, to now show that we support trackpad gestures! 🎉

@JaceThings
Copy link
Copy Markdown
Contributor

Goated

MrKai77 added 5 commits March 8, 2026 18:19
# Conflicts:
#	Loop.xcodeproj/project.pbxproj
# Conflicts:
#	Loop/Window Management/Window Manipulation/WindowFrameResolver.swift
@MrKai77 MrKai77 force-pushed the subsurface-gestures branch from 8396cd0 to 2768be8 Compare March 9, 2026 00:22
@AlejandroVolkova
Copy link
Copy Markdown

Wow, this is awesome! It’s exciting to see it coming together! I just had a couple of thoughts after watching the demo. In the video, I noticed that windows move and resize instantly with the gestures. Would it be possible to instead show the preview animation before the actual move? Especially for circle gestures, previewing the desired position before the actual window move would be helpful and could make the overall experience feel smoother (essentially the same behavior you get when using the trigger key or window snapping.)

I was also wondering if custom gestures might be supported. For example, being able to assign a gesture to maximize or minimize windows. Personally, I’d love to disable Mission Control and Exposé so I could use a four-finger drag up/down gesture for maximize/minimize instead.

And finally, will haptic feedback be part of this feature? It could add a really nice touch to the interaction.I know this is still under development, so please take these just as friendly suggestions in case they’re helpful 😅 Thanks for making this possible!

@MrKai77
Copy link
Copy Markdown
Owner Author

MrKai77 commented Mar 11, 2026

Thanks @AlejandroVolkova!

In the video, I noticed that windows move and resize instantly with the gestures. Would it be possible to instead show the preview animation before the actual move?

Definitely, this will stay consistent with Loop’s existing settings :)
I just happened to have “Show preview when looping” turned off in the demo, which is why the windows moved instantly instead of showing the preview first.

I was also wondering if custom gestures might be supported. For example, being able to assign a gesture to maximize or minimize windows. Personally, I’d love to disable Mission Control and Exposé so I could use a four-finger drag up/down gesture for maximize/minimize instead.

We’re definitely considering that as well. The rough idea I have right now is a dedicated Gestures tab in Settings, where you could assign a list of gestures to actions, similar to the Keybinds tab. For example, a two-finger slide (in any direction) to open the radial menu, a three-finger slide right to trigger a different action, or a four-finger swipe up to trigger another one.

I’m still very much in the brainstorming stage for how all of this would be configured, though, so that’s just the direction I’ve been thinking in so far. I’d love to hear any ideas you have on how that should work!

And finally, will haptic feedback be part of this feature?

Absolutely :)

@AlejandroVolkova
Copy link
Copy Markdown

@MrKai77 I think the implementation is brilliant. Invoking the radial menu from the title bar is a great choice, since it avoids false triggers in the app’s content view, which is one of the challenges with custom trackpad gestures.

Maybe it would feel even more natural to use a two‑finger pinch‑in to invoke the radial menu. I can imagine that once the radial menu is invoked via a trackpad gesture, it could stay persistent so the user can decide the next action, for example, a one‑finger swipe left to move a window to half the screen, similar to how the trigger key works currently with directional input from the trackpad.

On iPadOS there’s a gesture to minimize all other app windows when using “Windowed Apps.” Perhaps something similar could be achieved here by invoking the radial menu and swiping down with Three‑finger to trigger “Minimize others.”

Some actions might work best without invoking the radial menu at all. For instance, maximize or minimize could be triggered frictionlessly, just like swiping between spaces. That’s why I think Four‑Swipe‑Up → Maximize | Four‑Swipe‑Down → Minimize would be ideal, since those gestures can be triggered anywhere without interfering with app content. It would also be nice to keep the preview animation when maximizing, to stay consistent with Loop’s aesthetic and refinement.

Overall, the idea of a dedicated Gestures tab in Settings already sounds like the right direction. Other possible actions when invoked with the radial menu could be:

• Hide → Pinch out (Spread With Thumb And 3 Fingers)
• Center app → Three‑finger swipe up
• Stash → Three‑finger swipe right

It’s also worth mentioning that three‑finger gestures can sometimes cause conflicts when using the option Accessibility → Pointer Control → Trackpad Options… → Dragging style → Three Finger Drag

Of course, all of these suggestions ultimately depend on how they feel in practice when testing the software :) They just came to mind from my past experiments with custom gestures, so thank you so much for being open to feedback. I really appreciate the chance to contribute ideas :) !

@343max
Copy link
Copy Markdown

343max commented Mar 19, 2026

I just came looking here because I was wondering if I should implement this feature. Please please please make it so that I can use four finger gestures to trigger the actions. I'd love to see the implementation exactly as it is right now, but instead of doing a Modifier-Drag gesture I could just do a multitouch-drag without a modifier.

MrKai77 added 2 commits April 5, 2026 00:03
# Conflicts:
#	Loop.xcodeproj/project.pbxproj
#	Loop/Settings Window/Settings/Keybinds/Modal Views/CustomActionConfigurationView.swift
#	Loop/Settings Window/Settings/Keybinds/Modal Views/StashActionConfigurationView.swift
#	Loop/Stashing/StashManager.swift
#	Loop/Window Management/Window Manipulation/ResizeContext.swift
#	Loop/Window Management/Window Manipulation/WindowActionEngine.swift
#	Loop/Window Management/Window Manipulation/WindowEngine.swift
#	Loop/Window Management/Window Manipulation/WindowFrameResolver.swift
#	Loop/Window Management/Window Manipulation/WindowRecords.swift
@MrKai77 MrKai77 force-pushed the subsurface-gestures branch from 357ca2b to 7267e37 Compare April 5, 2026 09:42
@MrKai77 MrKai77 force-pushed the subsurface-gestures branch from 7267e37 to 92cd898 Compare April 5, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ Trackpad gestures to trigger Loop

5 participants