I decided to make this a priority because it severely affects the usability of canvasGUI. Also I do like a challenge. ![]()
To make canvasGUI transparent to the user it attaches its own event listeners to the canvas for mouse, keyboard and focus events. It doesn’t use the p5js event handling methods because they can easily be reassigned (replaced / overwritten) adversely affecting canvasGUI.
I started the journey with some research on implementing touch events in pure JavaScript. So I have spent much of the day experimenting and exploring the touch events API to get an understanding of how it all works.
Today has been a good day
as I now have the sliders responding to touch events. I still have a lot of work to do as the code is definitely work in progress and I will have to test it fully before doing the same for the Range control.
Hopefully I will be able to release a touch-screen enabled version of canvasGUI in a couple of weeks. ![]()