Skip to content

Make the settings tap sequence deterministic - #111

Merged
RapierXbox merged 1 commit into
RapierXbox:mainfrom
phischmi:fix/settings-tap-sequence
Sep 24, 2026
Merged

RapierXbox merged 1 commit into
RapierXbox:mainfrom
phischmi:fix/settings-tap-sequence

Conversation

@phischmi

Copy link
Copy Markdown
Contributor

Problem

The gesture that opens the settings — 10 taps on the bottom-right overlay, then 10 on the bottom-left — is hard to trigger in practice. Two things make it non-deterministic.

The counters never expire. Both overlays return false from their touch listener, so the touch also reaches the dashboard underneath. The overlays are 15% × 15% of the screen in the bottom corners, which on a normal dashboard is live content: an ordinary tap on a card in either corner increments the counter. Nothing ever resets it, so each attempt starts from a state that depends on how the display was used before.

The threshold is an equality check. One tap too many leaves clicksButtonRight at 11. Every subsequent tap on the left overlay then takes the else branch and resets, so the gesture cannot be completed at all until the app restarts.

if (event.action == MotionEvent.ACTION_DOWN) clicksButtonRight++
...
if (clicksButtonRight == 10) clicksButtonLeft++ else resetClicks()

Change

Expire the counters after 2 s without a tap, and compare with >=.

The timeout is what separates the gesture from ordinary use: taps that belong to the sequence come in quick succession, taps minutes apart do not. >= means overshooting no longer wedges the gesture.

The sequence itself is unchanged — 10 taps per corner, bottom right first — it just has to be entered without long pauses now.

Note

This does not address the root cause, that the overlays sit on top of live dashboard content and count taps meant for it. Fixing that needs a gesture that cannot collide with the dashboard, which is a larger change; the multi-finger swipes SwipeHelper already classifies would be one candidate. Happy to follow up if that direction is welcome.

Verified on a Wall Display Stargate.

🤖 Generated with Claude Code

The sequence (10 taps bottom right, then 10 bottom left) was hard to
trigger for two reasons.

The counters never expired. The overlays return false, so the touch also
reaches the dashboard underneath and an ordinary tap on a card in either
corner increments them. Between attempts the sequence therefore started
from an unknown state.

And the threshold was an equality check: one tap too many left
clicksButtonRight at 11, after which every tap on the left overlay hit
the else branch and reset, wedging the gesture until the app restarted.

Expire the counters after 2 s without a tap and compare with >=.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@RapierXbox
RapierXbox merged commit 365aa8e into RapierXbox:main Sep 24, 2026
1 check failed
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.

2 participants