Reference

XGetDeviceButtonMapping(3x) on Linux

The text df34bd8ddd30, as Debian 1.1 (Buzz) shipped it.

query or change device button mappings

XGetDeviceButtonMapping(3x) on Linux now