mirror of
https://github.com/jonasbark/swiftcontrol.git
synced 2026-12-04 12:42:18 +01:00
Android only delivers gamepad input to the app in front. Behind the trainer
app the accessibility service is the only way in, but it only forwards keys
the keymap handles by their Android name ("KEYCODE_BUTTON_A"), while gamepad
buttons are stored normalized ("a"), and forwarded keys became a separate
HID device. Register the Android names of mapped gamepad buttons and route
keys from a connected gamepad to its GamepadDevice, normalized with the
gamepads Android mapping. Buttons only: sticks and hat d-pads are motion
events the service doesn't get.
Without the accessibility service a gamepad now reports a setup need, so
Ride and Devices warn and offer the accessibility disclosure, instead of a
hint tied to the Local connection method that only showed in the
controller settings. The status is rechecked when the app comes back to
the front.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>