Rotate Camera only whilst the RMB is held down, and when its not held rotate player to cursor

I want to use the new enhanced input system to rotate the camera when the Right Mouse Button is held down, and when its not help rotate the character to face the cursor.

I am very very new to unreal and blueprints, and I am unable to find a tutorial that shows how to do this at all.

Can someone please explain it in detail and maybe show me the blueprints + functions + variables required to do this?