onMousePress(action: (m: MouseButton)=>void): KEventController

Register an event that runs when user clicks mouse.

paramaction- The function to run when the event is triggered.

returnsThe event controller.

sincev3001.0

onMousePress(btn: MouseButton | MouseButton[], action: (m: MouseButton)=>void): KEventController