Skip to content

Tap three fingers for the keyboard, four for the menu - #8

Open
thewhoareyou wants to merge 1 commit into
SicarioGaming:mainfrom
thewhoareyou:feature/three-finger-keyboard
Open

thewhoareyou wants to merge 1 commit into
SicarioGaming:mainfrom
thewhoareyou:feature/three-finger-keyboard

Conversation

@thewhoareyou

Copy link
Copy Markdown

Summary

Closes #6 — matches upstream Moonlight's gesture mapping:

  • Three-finger tap toggles the on-screen keyboard (previously opened the menu)
  • Four-or-more-finger tap opens the stream menu (previously a fast four-finger tap could also trip it, since the timer started at finger three)
  • The floating menu button and holding Select on a controller are unchanged

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 JVM
  • PanZoomHandlerTest (new, Robolectric): synthesized 2-finger pinch reverts when extra fingers arrive; a zoom from an earlier gesture survives
  • lintNonRootDebug clean; assembleNonRootDebug builds
  • Device-tested on a Galaxy Tab S9+: three-finger tap toggles the keyboard, four-finger tap opens the menu, and the tap no longer zooms the stream
  • Note: tested on a build without the pointer-capture fix in fix(stream-menu): keep the mouse working while the menu is up #4; the changes touch different code paths and merge cleanly

Generated with Devin

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keyboard Gesture

1 participant