Skip to content

Implement Option A long press for all controls#62

Merged
c0dev0id merged 1 commit intomainfrom
claude/android-longpress-events-T9ZqR
Mar 7, 2026
Merged

Implement Option A long press for all controls#62
c0dev0id merged 1 commit intomainfrom
claude/android-longpress-events-T9ZqR

Conversation

@c0dev0id
Copy link
Owner

@c0dev0id c0dev0id commented Mar 7, 2026

  • Change injection source from SOURCE_KEYBOARD to SOURCE_GAMEPAD so that KEYCODE_ENTER ACTION_DOWN is no longer routed to the IME (fixing the missing initial KEY_DOWN for the top button) and DPAD ACTION_DOWN events are no longer consumed by Android focus-navigation (fixing missing KEY_DOWN for joystick directions).

  • Add long press support to JoystickView and LeverView: when a direction threshold is crossed, KEY_DOWN is sent immediately and FLAG_LONG_PRESS is sent 500 ms later if the direction is still held, mirroring the existing ButtonView behaviour.

- Change injection source from SOURCE_KEYBOARD to SOURCE_GAMEPAD so that
  KEYCODE_ENTER ACTION_DOWN is no longer routed to the IME (fixing the
  missing initial KEY_DOWN for the top button) and DPAD ACTION_DOWN events
  are no longer consumed by Android focus-navigation (fixing missing
  KEY_DOWN for joystick directions).

- Add long press support to JoystickView and LeverView: when a direction
  threshold is crossed, KEY_DOWN is sent immediately and FLAG_LONG_PRESS is
  sent 500 ms later if the direction is still held, mirroring the existing
  ButtonView behaviour.

https://claude.ai/code/session_01QPq7C3K71MZzKsRVGE5sac
@c0dev0id c0dev0id merged commit 01363e0 into main Mar 7, 2026
1 check passed
@c0dev0id c0dev0id deleted the claude/android-longpress-events-T9ZqR branch March 7, 2026 15:40
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