Copy the Viewport Controls to a in-game camera?

Is it possible to copy the control/behaviour of the viewport’s controls to a in-game camera?

I can do a Orbit and Zoom pretty easily but I am having difficulties doing the Pan. I was wondering if there was some code in the engine I could just copy to achieve the same result.


Alt + LMB + Drag

Tumbles the viewport around a single pivot or point of interest.

Alt + RMB + Drag

Dollies (zooms) the camera toward and away from a single pivot or point of interest.

Alt + MMB + Drag

Tracks the camera left, right, up, and down in the direction of mouse movement.