Reference

XPeekEvent(3) on Linux

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

select events by type

XPeekEvent(3) on Linux now