When I press mouse button 5 + right mouse button - It will switch window.
The problem that when I press it in Google Chrome for example - it popup right click menu.
Is there any way to disable the menu or remap right mouse button click to other key to prevent the menu popup and after that reenable it?
Do you have better way to trigger via two mouse buttons?
Essentially, no. The USB Device Key trigger can detect events, but cannot modify them.
Keyboard Maestro has no mechanisms to stop mouse buttons from behaving in their normal way - it can detect the buttons generally, but not stop them from their normal behaviour.
I don't understand how this is related to the reset of the question.