Reference

XGetDeviceButtonMapping(3x) on Linux

The text bc0932dc07a5, as Debian 3.0 (Woody) shipped it.

query or change device button mappings

XGetDeviceButtonMapping(3x) on Linux now