Add optional macOS touchpad navigation#1236
Open
AndyParka wants to merge 2 commits into
Open
Conversation
AndyParka
marked this pull request as ready for review
July 22, 2026 08:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Motivation
On macOS TouchPads, LDtk currently treats two-finger vertical movement as zoom input, and ignores horizontal movement. This makes navigation different to common canvas tools, where two-finger movement pans the view, and pinch gestures zoom.
The changes
This implementation reuses LDtk's existing camera movement and zoom paths.
added a settings menu checkbox for this function - so it's opt-in to keep existing mouse controls unchanged.
working in both the main world view, and the sidebar "Tiles" view, and "Project Tilesets" view.
when Touchpad mode is enabled, the existing "Mouse wheel speed" setting controls pinch-to-zoom sensitivity in both the main editor and tileset previews.
when Touchpad mode is enabled, to keep a consistent feeling in both the world view, and sidebar views - this zoom sensitivity also applies to the sidebar views.
This seemed to be the best way to handle this at the time, removing the need for another zoom sensitivity value. People who are regularly swapping between Mouse and Touchpad may not prefer this decision.
Related to #278, #480, #537, and #959.
Testing
launched the compiled Electron development build successfully on macOS and Windows 11 24H2
verified on a physical macOS trackpad: two-finger panning and pinch-to-zoom work as expected
verified with Apple Magic Mouse, usable as expected.
verified with a Logitech G305 on macOS and Windows. Existing pointer and drag controls remain functional; with Touchpad mode enabled, wheel input pans rather than zooms by design.
Implementing this change over top of existing functionality and then removing the toggle checkbox could be an option, however some people who are used to the current trackpad control scheme and people trying windows and linux track-pads may encounter unpredictable results.
AI disclosure: Developed with assistance from OpenAI Codex. The implementation was reviewed, compiled, and manually tested on physical hardware.