Open mafredri opened 2 years ago
Cool! I'm definitely interested in a PR when you have one.
wheel
event is the event you are looking for for scrollwheel capture.
@Informatic not sure how I missed that, that's exactly what I wanted to find 😄. Thanks for the tip!
Hi,
I was building a m4p client for Linux (written in Go) and noticed the following events are missing:
click
)touchmove
,touchstart
,touchend
,touchcancel
?)Scroll (scroll
)wheel
)We can easily add click and touch via event listeners.
Touch is relevant for two use-cases:
click
becomingtouchmove
Scroll is a bit harder because, unless I'm mistaken, we'd need a UI element that is scrollable in the foreground to triggerscroll
events in the browser. Currently the overlay (div
) that contains the settings button is the top-most element, scrolling events would be directed towards it (if it was scrollable). A scrollable element would have to either be above it (z-index
) or inside it.Another option would be to look for lower level (hardware) inputs from the magic remote and get button presses and/or scroll events from there.Do these features sound like a good fit for magic4pc? (I can submit some PRs once I have something working.)