Reference

XSetDeviceModifierMapping(3) on Linux

The text c5f00a6e5d27, as Debian 6.0 (Squeeze) shipped it.

query or change device modifier mappings

XSetDeviceModifierMapping(3) on Linux now