Axis Mappings with Modifier keys

I see that Modifier keys are available for Action mappings. However I would like to get access to modifier key status for Axis mapping events. In my particular example, I would like to do camera rotate on “Mouse X” axis, but I would like to do camera pan on “Mouse X” axis with ‘Shift’ key pressed.

How could I achieve this?

when you press shift, set a boolean called PressedShift to true.

when you release shift, set PressedShift to false.

then, in the mouseX event, you can branch on PressedShift to decide which code to execute.