Reference

XGetDeviceButtonMapping(3x) on Linux

The text 5f9aaac8ec58, as Debian 1.2 (Rex) shipped it.

query or change device button mappings

XGetDeviceButtonMapping(3x) on Linux now