If you’re using Excalidraw with a Wacom tablet and you want to pan using your pen when using OpenTabletDriver, you might find that binding the pen buttons to middle mouse button does nothing.
Just open OpenTabletDriver settings GUI and go to Pen Settings, click the three dots on one of the pen bindings, and set the Type to Linux Artist Mode, then set the button to Pen Button 1.
And BOOM, you have panning (remember to click apply and save buttons). Happy drawing.