I only set a button on a pen as a middle click(choose one you comfortable with), other than that I leave it as default(or disable it).
Also, I position the tablet exactly the same as my mouse, so that I can use my keyboard alongside.
In case I want to zoom or pan a view, simply use combination of pen button and ctrl, shift respectively