TL;DR
This report is meant to simply put on record findings and discussions about the issue made on IRC, as its origin appears to have been singled out to the WinInk API not supporting more than one side button per stylus.
Primary issue
I have a Wacom Intuos 5 Touch tablet on Windows 10 64bit (1809) with the latest drivers (6.3.33-3). I noticed that with the experimental WinInk API on Krita 4.1.7 on Windows, as well as more recent nightly builds (g5ec151653f tested), by setting what otherwise would normally be "Middle click" button on the stylus (which doesn't work with the WinInk API) to "Pan/Zoom" in the Wacom control panel, it works exactly as if it was MMB with the WinTab API.
Using the WinInk API, MMB on the stylus never worked for me also on earlier Krita windows versions, which meant that I had to use different methods for panning, and so on.
My primary reason for using the WinInk API is that with WinTab if I enable a second screen while Krita is opened, the tablet mapping on the canvas gets disrupted while this does not happen with WinInk.
While in Krita Spacebar can act as a replacement for MMB, it works differently than MMB panning. With the former I have to press, then click-drag with the pen tip. With the latter, panning begins as soon as the button is pressed. I tried setting up other shortcuts to reproduce the same behavior with MMB, but so far I couldn't manage to. Thus, that was the only drawback (for me) of using the WinInk API. Now for my uses it's equivalent to the WinTab API, with the difference that it handles changing the display configuration.
With the "Pan/zoom" button setting, other Krita shortcuts normally associated with MMB like rotating and zooming also work, so for all intents and purposes it is acting as a MMB now, while with "Middle Mouse" it does not seem to work at all. Again, this is with WinInk. With WinTab, "Middle Mouse" works correctly.
Tablet log
I was asked to provide a tablet log using DebugView from Sysinternals. What I did was clicking on the Krita title bar, then pressing the side button and hovering the stylus on the canvas for a while.
- Using the lower side pen button as a "Pan/Zoom" button: http://pasteall.org/1577166
- Using the lower side pen button as a "Middle Click": http://pasteall.org/1577168
Other tests
- Upon request I tried disabling the Spacebar+LMB input for "Pan Canvas" in Krita's canvas input settings to if it would still work like that. As a result panning didn't work anymore, but I could still hold Shift for canvas rotation or Control for canvas zooming. Keeping the button pressed paints on the canvas while hovering the stylus.
- By holding the button, then click-dragging, the canvas gets zoomed in/out slowly (choppily) regardless of whether the Spacebar+LMB shortcut enabled
- By disabling one of the side buttons and setting the other to LMB, canvas panning works albeit not entirely correctly (the button doesn't get released in the software).
- This appears to be consistent with the WinInk API not supporting more than one side button on the stylus (also see below).
Developer comments
Dmitry Kazakov pointed out that WinInk doesn't support reporting more than one button in the stylus barrel and that it is likely that setting the button to "pan" just generates keyboard Spacebar key, depending on how the Wacom driver maps the buttons.
Upon analysis of the previously provided logs, Dmitry could confirm that "Pan/Zoom" generates Spacebar+LMB, while "Middle Click" generates no tablet press events, only synthesized mouse events.
Discussion
If WinInk can only support one side button on the stylus, then that's the likely reason why it doesn't work as per initial observations. Normally (at least when using WinTab) I have the side buttons set up to RMB (top) and MMB (bottom). Wacom Driver defaults for this are "Double click" and RMB.