Reference

XUngrabKeyboard(3) on Linux

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

grab the keyboard

XUngrabKeyboard(3) on Linux now