Skip to content

feat(controls): hold remote buttons on Core 2.17+ - #278

Draft
wizzomafizzo wants to merge 1 commit into
mainfrom
feat/controls-held-input
Draft

wizzomafizzo wants to merge 1 commit into
mainfrom
feat/controls-held-input

Conversation

@wizzomafizzo

Copy link
Copy Markdown
Member
  • The Controls remote pad sends {press:key} when a pointer goes down and {release:key} when the last pointer on that button lifts. Held buttons auto-repeat on the host, and several buttons can be held at once.
  • Presses, releases and taps share one queue so Core receives them in order, and a release waits at least 40ms after its press to match Core's tap duration.
  • Held keys are released when the modal closes, the pad unmounts or the page is hidden. After a failed request or a dropped socket they are forgotten without sending releases, because Core has already released them.
  • When Core rejects held input on a platform that can't hold keys (for example desktop Linux or Mac), the pad falls back to taps for that connection. That rejection is no longer reported as an error.
  • Pad buttons capture their pointer. Keyboard and screen reader activation still sends taps, and presses no longer scroll, zoom, select text or open long-press menus.
  • The behaviour is gated behind Core 2.17.0 (heldInput). Older Cores and the Keyboard tab keep sending taps. Holding Shift-modified keys needs Core support, tracked in fix(input): support Shift-modified characters and modifier combos in press/release zaparoo-core#1499.
  • Adds a 1.14.0 What's New item for held remote buttons.

Core 2.17.0 keeps keys held across WebSocket requests with {press:key}
and {release:key}. The Controls remote pad now sends a press when a
pointer goes down and a release when the last pointer on that button
lifts, so held buttons auto-repeat on the host and several buttons can
be held at once.

- Track held keys per pointer and send presses, releases and taps
  through one queue so Core receives them in order. Releases wait at
  least 40ms after their press, matching Core's tap duration.
- Release everything when the modal closes, the pad unmounts, the page
  is hidden or the hook unmounts, and forget held keys without sending
  releases after a failed request or a dropped socket, since Core has
  already released them.
- Fall back to taps for the connection when Core rejects held input on
  a platform that cannot hold keys, and keep that rejection out of
  error reporting.
- Capture each pointer on its button, keep keyboard and screen reader
  activation as taps, and stop pad presses from scrolling, zooming,
  selecting text or opening long-press menus.
- Gate the behaviour behind Core 2.17.0. Older Cores and the Keyboard
  tab keep sending taps.
- Add a 1.14.0 What's New item.
@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 5eea15c6-152b-4364-a439-e1947be35f2d

📥 Commits

Reviewing files that changed from the base of the PR and between f0f3df2 and ed7f367.

📒 Files selected for processing (18)
  • src/__tests__/unit/components/RemoteKeyboardModal.test.tsx
  • src/__tests__/unit/featureGates.test.ts
  • src/__tests__/unit/lib/coreApi.test.ts
  • src/components/RemoteKeyboardModal.tsx
  • src/hooks/useHeldRemoteInput.ts
  • src/index.css
  • src/lib/coreApi.ts
  • src/lib/featureGates.ts
  • src/lib/whatsNew.ts
  • src/translations/de-DE.json
  • src/translations/en-GB.json
  • src/translations/en-US.json
  • src/translations/es-ES.json
  • src/translations/fr-FR.json
  • src/translations/ja-JP.json
  • src/translations/ko-KR.json
  • src/translations/nl-NL.json
  • src/translations/zh-CN.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.57143% with 13 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/hooks/useHeldRemoteInput.ts 92.43% 9 Missing ⚠️
src/components/RemoteKeyboardModal.tsx 92.00% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

@wizzomafizzo

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@wizzomafizzo
wizzomafizzo marked this pull request as draft September 15, 2026 06:39
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.

1 participant