Reference

XWindowEvent(3) on Linux

The text 077a87dd1012, as Debian 10 (Buster) shipped it.

select events by type

XWindowEvent(3) on Linux now