Repository navigation
Tap three fingers for the keyboard, four for the menu - #8
Open
thewhoareyou wants to merge 1 commit into
Open
thewhoareyou wants to merge 1 commit into
thewhoareyou wants to merge 1 commit into
Conversation
Issue SicarioGaming#6: match upstream Moonlight. A three-finger tap toggles the soft keyboard and four or more fingers open the overlay menu; both used to open the menu. The tap check now runs ahead of every mouse/touch mode, so pan/zoom and touch-disabled get the same gestures, and a tap that began as a two-finger pinch puts the stream view back instead of zooming. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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
Closes #6 — matches upstream Moonlight's gesture mapping:
The tap detector (
handleMultiFingerTap) now runs ahead of every mouse/touch mode, so pan/zoom and touch-disabled get the same gestures as the rest, and it consumes the extra fingers so no part of a tap reaches the host. One deliberate behavior change: in multi-touch mode, 3+ finger touches are now claimed by the gesture detector before they can be forwarded to a host with native touch support — the same trade-off upstream makes.It also fixes a side effect the new gesture exposes: the first two fingers of a tap land before the third and briefly read as a pinch, zooming the stream. The stream view now remembers its state at gesture start (
PanZoomHandler.rememberGestureStart/revertToGestureStart), and the extra fingers put it back — including restoring a legitimate zoom left by an earlier pinch rather than resetting it.Test plan
GameRulesTest: tap-action matrix (3 -> keyboard, 4/5+ -> menu, slow/short -> none) — 7/7 on JVMPanZoomHandlerTest(new, Robolectric): synthesized 2-finger pinch reverts when extra fingers arrive; a zoom from an earlier gesture surviveslintNonRootDebugclean;assembleNonRootDebugbuildsGenerated with Devin