Change pitch rotation automatically

I have project for oculus or pc monitor, if there is oculus connected it goes thru oculus, but if not, it goes thru pc monitor.

I would like to stop pitch rotation automatically when oculus is connected or keep pitch rotation if oculus is not connected. Is possible do that? how can I make that?

Pitch rotation on player event graph

I found the solution by myself. Solution in the next image

event graph player. mouse pitch input