Follow-up to #203, from a discussion with @lvcabral.
Description
- Currently one analog stick (axes 0/1) is mapped, and only to d-pad directions - no right stick, no L1/L2/R1/R2, no X/Y face buttons, no analog trigger values
- Each connected pad gets a distinct
remote id (getRemoteID()), but there's no per-controller button mapping, and all pads share the same 5-slot key ring buffer - simultaneous input from >1 pad can clobber each other's queued events, which matters once we're actually treating each pad as its own player
roUniversalControlEvent has no analog fields (matching the real Roku API), so analog data needs a different exposure than overloading getKey()'s existing key vocabulary
Proposal
- Support more than one active controller at the same time (eg. for multiplayer games)
- Support analog sticks and all typical controller buttons (A/B/X/Y, DPad, L1/L2/R1/R2, dual analog sticks, etc)
- Gate all of this behind a manifest flag, similar to
multi_key_events - off by default, no behavior change for existing apps
- Should be exposed via
roUniversalControlEvent (or similar) so apps consume it the same way as any other remote input
- Add
getValue(...) as float returning [-1, 1] for analog axes
- Keep it back compatible for discrete buttons/DPad by just returning
0 or 1 there
Happy to help test once I get a controller that pairs with my laptop.
Follow-up to #203, from a discussion with @lvcabral.
Description
remoteid (getRemoteID()), but there's no per-controller button mapping, and all pads share the same 5-slot key ring buffer - simultaneous input from >1 pad can clobber each other's queued events, which matters once we're actually treating each pad as its own playerroUniversalControlEventhas no analog fields (matching the real Roku API), so analog data needs a different exposure than overloadinggetKey()'s existing key vocabularyProposal
multi_key_events- off by default, no behavior change for existing appsroUniversalControlEvent(or similar) so apps consume it the same way as any other remote inputgetValue(...) as floatreturning[-1, 1]for analog axes0or1thereHappy to help test once I get a controller that pairs with my laptop.