How to disable right-click / contect memu


I am developing a dashboard to control a treadmill. One function is to change the slope of the treadmill. I am using a customize button node to move up or down while the button is pressed.

I am using a touchscreen sometimes depending on how the button is pressed the right click is emulated and context menu is shown. My problem is that while the context menu is open my motor is still moving even if I do not longer press the button.

My app is a "kiosk" application, I would like to disable contextual menu for my entire dashboard. How can I do that.

Thank you in advance,

You can add a ui_template set to be part of the page head section containing

document.addEventListener('contextmenu', event => event.preventDefault());

Thanks a lot, it works like a charm.
Sorry for the late reply :wink:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.