Yeah, there’s a 3rd-party driver called Spacenav that works pretty well. I haven’t gotten the two side buttons on my mini wireless one though.
(I wouldn’t bother with the driver from 3DConnexion as it hasn’t been touched in 10 years old)
ETA: The settings for it in FreeCAD is at Tools>Customize>Spaceball Motion/Buttons
BS. The client was Escher.