cockpit icon indicating copy to clipboard operation
cockpit copied to clipboard

Support trackpad regions as axis inputs/sliders

Open ES-Alexander opened this issue 2 years ago • 3 comments

No idea if this is possible (I'm not sure what the browser gets access to), but it'd be really cool to be able to assign regions of the trackpad as input sliders for controls, e.g. if I slide my finger up/down the right edge then I can make my lights1 dimmer/brighter, but if I do it on the left edge it does lights2 instead...

We could also then have the left and right halves of the trackpad used for motion control, which could be useful for testing purposes, or in emergencies if the joystick dies or something.

ES-Alexander avatar Dec 18 '23 01:12 ES-Alexander

May be possible using the Touch events API, but from an initial read I'm unsure whether it provides access to touch positions relative to the pad, or just something based on previous mouse positions or something. The descriptions seem to be focused on what a touchscreen would have (where you literally touch parts of the page), but the API does specify it can apply to both touch screens and trackpads...

ES-Alexander avatar Dec 18 '23 01:12 ES-Alexander

Oh you went far with that one 😅

I liked it, but apparently this is not yet supported by any browser api, although there is the pointer lock api, which is very cool and maybe has some synergy with that kind of feature.

rafaellehmkuhl avatar Dec 18 '23 09:12 rafaellehmkuhl

In case it's relevant, there's also the proposed GamepadTouch Interface, but I don't believe it has browser support yet either.

ES-Alexander avatar Mar 30 '24 09:03 ES-Alexander