Toggle input event generation in-game?

Is it possible, in-game, to prevent InputAxis events from firing from an unused mouse or gamepad?

Perhaps this is driven by a user preference setting - use the gamepad instead of mouse, for example.

Yes could be handled by setting a bool and testing if the controller is to be ignored on every single event. Or maybe test for zero at every event and ignore it. Just to be clear I don’t want to disable all input and want to completely eliminate events for a specific input device when it won’t be in use.

Switching on an enum or using a boolean on “latest known input” is probably the simplest solution.