Reference

XWindowEvent(3) on Linux

The text 770b25c463df, as Debian 8 (Jessie) shipped it.

select events by type

XWindowEvent(3) on Linux now