Skip to content

feat(events): implement scroll wheel interception and key mapping#218

Open
Cidy20 wants to merge 1 commit intoPlayCover:masterfrom
Cidy20:feature/scroll-wheel-mapping
Open

feat(events): implement scroll wheel interception and key mapping#218
Cidy20 wants to merge 1 commit intoPlayCover:masterfrom
Cidy20:feature/scroll-wheel-mapping

Conversation

@Cidy20
Copy link
Copy Markdown

@Cidy20 Cidy20 commented Apr 1, 2026

Overview

This PR updates the HID event adapters to support mapping mouse scroll wheel rotations to virtual key presses, complementing the UI changes in PlayCover.

Key Changes

  • [Interception] Event Interception: Modified TouchscreenMouseEventAdapter and CameraControlMouseEventAdapter to check for enableScrollWheelMapping.
  • [Logic] Scroll-to-Key Logic: When mapping is enabled, scroll wheel events are intercepted and converted into ScrU (scroll up) or ScrD (scroll down) virtual keys.
  • [Safety] Event Consumption: Ensuring that intercepted scroll events are fully consumed when mapping is active to prevent unintended zoom actions in-game.

Important

Dependency Note: This PR is designed to work in tandem with the updated setting schema in PlayCover.
Compatibility Warning: As the setting key has been migrated from enableScrollWheel to enableScrollWheelZoom, this version of PlayTools will not be compatible with older versions of PlayCover. Please ensure both PRs are merged at the same time to maintain functional integrity.

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