How to view3d.view_orbit so that when you move your mouse side to side, it responds interactively?

How do you view3d.view_orbit so that when you move your mouse side to side it respond interactively ?

Currently it rotated by a set amount if I assign it to a key, I would like it to respond to the mouse side to side movement.