Closed wwderw closed 7 months ago
Only clicks are sent as events to the backend application. You can write your own piece of JS code to do the job.
I guess it only handles mouse ClickReleased by default. I tested it by clicking on a button without release, and no webui event was fired. But, it's so easy to do whatever you want using JavaScript. Example of firing on keyboard key press:
document.addEventListener('keydown', () => {
my_backend_event();
});
When I originally had this issue, I did try to use JS to call the backend function. At first I was thinking maybe I had the JS function wrong, so I did the wonderful debug by console.log() and that fired, but the webui.call("myIDHERE") didn't fire. OR if it did, it was after I closed out of the program(it would do printf() after I closed the program and it would do the printf() commiserate with as many times as I clicked the canvas element).
This sounds like a JavaScript issue. What language is used in your backend? Also, if you can share some logs and scripts, that will be helpful.
Does Webui only handle, essentially, on KeyReleased events or can it handle checking KeyDown type of binding?