Movement mouse/keyboard in VR

Hi,
I am trying to make an immersive session on Cesium thanks to the vrButton,
and I am using the camera movement with the keyboard in order to move.
(I have been using this code Camera tutorial)
However, I find it more user friendly to use the mouse to move around when it is in “normal view” mode.

I didn’t find the variable that changes when I clic on the vrButton. What would that one be ?

I was thinking of doing something like

if (isVREnabled != false) {…}

And would there be a way to use a gamepad instead of the keyboard?

Thanks a lot !