To do it nicely you'd have to forget about BTN4/BTN5 the way it's done there, then listen to mousedown/up/move events on gfxcanvas and then set the state of BTN4/BTN5 pins manually based on the x/y coordinates.
I did try it with 3 divs (code attached) and this works for clicking, but then it stops the 'swipe' events from working - so if you feel like jumping in and making it work, that'd be great :)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I'm not quite sure what you mean? To change the mouse cursor?
If you can do that, PRs are welcome :)
I just checked and it turns out that the 'pressing in the middle' isn't implemented. The code is at https://github.com/espruino/EspruinoWebIDE/blob/master/emu/emu_banglejs1.html#L76-L111
To do it nicely you'd have to forget about BTN4/BTN5 the way it's done there, then listen to mousedown/up/move events on
gfxcanvas
and then set the state of BTN4/BTN5 pins manually based on the x/y coordinates.I did try it with 3 divs (code attached) and this works for clicking, but then it stops the 'swipe' events from working - so if you feel like jumping in and making it work, that'd be great :)