Hangar movement

I see youtubers fly around the hangar but how do i do that

Alt + F2 if you have a NVIDIA GPU (only on pc)

What I hate is that the view starts shifting by itself after short inactivity.