mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 05:16:01 +00:00
fix(input): stop L2/R2 keys from overriding analog trigger axes Pads such as the GameSir X2 Pro send KEYCODE_BUTTON_L2/R2 alongside their analog trigger axes. Each key-down and every key repeat set the trigger to full, and the next motion event set it back to the axis value, so a held trigger jumped to full. Android repeats only the most recently pressed key, so with both triggers held one side kept being forced to full while the other tracked its axis. When a device reports an analog axis for a trigger side (LTRIGGER or BRAKE, RTRIGGER or GAS, or the wired Xbox Z/RZ layout), its key no longer drives that trigger. Key repeats never change a trigger value. Pads with digital-only triggers keep the key behaviour unchanged.