How to fix Krita not recognizing tablet pen buttons configured as mouse clicks
1. Inside Krita's window, open Settings and click Configure Krita....
2. Navigate to Tablet settings and check Use mouse events for right- and middle-clicks (workaround for convertible devices, needs restart). Click OK.
3. Restart Krita and the buttons should work correctly.