Reference

XGetModifierMapping(3) on Linux

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

manipulate keyboard encoding and keyboard encoding structure

XGetModifierMapping(3) on Linux now