Reference

XPeekEvent(3) on Linux

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

select events by type

XPeekEvent(3) on Linux now