Reference

XWindowEvent(3) on Linux

The text d3d6987cb4a2, as Debian 13 (Trixie) shipped it.

select events by type

XWindowEvent(3) on Linux now