Reference

XPeekEvent(3) on Linux

The text 63698c4fb911, as Debian 12 (Bookworm) shipped it.

select events by type

XPeekEvent(3) on Linux now