Reference

XUngrabKeyboard(3) on Linux

The text ed3f66af10b8, as Debian 7 (Wheezy) shipped it.

grab the keyboard

XUngrabKeyboard(3) on Linux now