2 Suggestions

I am trying to replace my razer mouse driver (which sucks) with keyboard maestro, but there are a few things which make this impossible.

Firstly there needs to be some way of overriding a USB device key trigger (maybe with a checkbox) - I am trying to assign mouse button 4 to do X but it ends up doing X and clicking at the same time. Not good.

Secondly, There needs to be a way to use multiple triggers - for example, I want mouse button X to do action Y, but only when application Z is in the foreground.

I beg you to please consider adding these features in so I can be rid of the scourge that is razer drivers. Im sure many others would also be thankful for the functionalities these would bring.

Adding on to point 2, Ideally there should be a way to use binary operators on the triggers such as AND, OR, XOR, NOT

This is impossible - Keyboard Maestro can sense the USB device keys, but cannot affect them.

In Keyboard Maestro, Macro Groups control when the contained macros are active. Macro Groups can be configured to be active in a specific applications.

Alternatively, you can use the If Then Else action to control the behaviour of your macro.

I’m not really sure what you want from that description, but it is likely everything you want can already be done using a combination of Macro Groups to control when the macros are active and conditional execution of actions.