How to map View Pan to a mouse button?

I just purchased a mouse with a mid button. I was hoping to use it as the view pan function in perspective. However, the Logitech driver doesn’t support mapping holding down the right mouse button.

Is there any way I can set holding down this mouse button as view pan (holding RMB + SHIFT) in Rhino?
Is there a macro command that can do it?
Thank you

The command macro:
'_Pan
Should do it.