MZ How to make 'if right mouse button is pressed'?

◆ If : Script : TouchInput.isCancelled()

I wrote the event like this.

but, It was not 'pressed'. It was 'triggered'.

If I hold down the mouse, an event occurs only once.
I want the event to repeat while the right mouse button is pressed.

◆ If : Script : TouchInput.isPressed()
◆
If : Script : TouchInput.isTriggered()

I know that there are two script of left mouse botton.
What should I do in the case of right mouse botton?
TouchInput has the following functions:

isRepeated - checks whether the left mouse button or touchscren is just pressed or a pseudo key repeat occurred.

isLongPressed - checks whether the left mouse button or touchscreen is kept depressed.

I don't really understand what the difference is, but these both function on the left mouse button and there isn't an equivalent for the right mouse button, so you would have to write one.

By default, the right mouse button brings up the menu. How are you going to handle the override so it knows when to open the menu and when not to?
TouchInput has the following functions:

isRepeated - checks whether the left mouse button or touchscren is just pressed or a pseudo key repeat occurred.

isLongPressed - checks whether the left mouse button or touchscreen is kept depressed.

I don't really understand what the difference is, but these both function on the left mouse button and there isn't an equivalent for the right mouse button, so you would have to write one.

By default, the right mouse button brings up the menu. How are you going to handle the override so it knows when to open the menu and when not to?

In my case, I don't need to open the menu with the right mouse button.
Because the basic menu is disabled.
I'm using a custom menu made from an event.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-if-right-mouse-button-is-pressed.151701/