When using a tablet, make sure that you have ‘Graphic Tablet’ turned on in the
Edit>Preferences>Common menu
To undo your view action, you need to go to the Edit menu of the View window, and not use the normal Undo function ( the Viewport are kept separate).
Also, default the following Hotkeys are mapped to the mouse (or pen) to navigate in teh viewport:
Alt+LeftMouseButton Rotate Camera
Alt+MMB Pan Camera
Alt+RMB Scale Camera ( zoom in and out)