Program Surface Pen buttons

Type of device: Microsoft PC
Brand and version of the device: Surface Pro 7
System: Windows 11

How do I custom program the eraser and side buttons for the first-gen Surface Pen? I can’t figure out where it is in the settings or what keywords to use for the handbook.

That should be somewhere in the Windows Pen/Ink settings.
Try typing ‘pen’ in the search bar of the Windows menu to see if a likely utility name is listed.

In the krita Settings → Configure Krita → Tablet Settings options, select ‘Windows Ink’ because Wintab is not available with Microsoft pen devices.

I’m not sure but you may need to enable ‘Use mouse events for right and middle clicks’ but don’t try that unless you have confusing problems later.

If you do get the ‘eraser’ button working on the Surface Pen, please realise that it doesn’t give you an eraser. It gives you a secondary/alternate brush and it’s up to you to use it to select an eraser preset from the Brush Presets docker with it (or any other brush preset that you may want to use).