Mapbox has a document for using a gaming mouse to increase mapping. I build a custom keyboard and assigned JOSM’s shortcut keys, because unfortunately, I couldn’t find easy to use multi-featured trackball.
I built a keyboard is custom keyboard kit called “Dozen0” with 12 keys.
The shortcuts assigned to the 12 keys are follow image.