XUngrabKey() XUngrabKey()
Name
XUngrabKey - release a key from a passive grab.
Synopsis
XUngrabKey(display, keycode, modifiers, grab_window)
Display *display;
int keycode;
unsigned int modifiers;
Window grab_window;
Arguments
display Specifies a connection to an X server; returned from XOpenDisplay().
keycode Specifies the keycode. This keycode maps to the specific key you want to ungrab. Pass either a keycode or AnyKey.
modifiers Specifies a set of keymasks. This is a bitwise OR of one or more of the following symbols: ShiftMask, LockMask, ControlMask,
Mod1Mask, Mod2Mask, Mod3Mask, Mod4Mask, Mod5Mask, or AnyModifier. AnyModifier is equivalent to issuing the ungrab key request
for all possible modifier combinations (including no modifiers).
grab_window
Specifies the ID of the window for which you want to ungrab the specified keys.
Description
XUngrabKey() cancels the passive grab on the key combination on the specified window if it was grabbed by this client. A modifiers of Any-
Modifier is equivalent to issuing the request for all possible modifier combinations (including the combination of no modifiers). A key-
code of AnyKey is equivalent to issuing the request for all possible nonmodifier key codes. This call has no effect on an active grab.
For more information, see Volume One, Chapter 9, The Keyboard and Pointer.
Errors
BadWindow
BadValue Invalid keycode or modifiers mask.
See Also
XChangeActivePointerGrab(), XGrabButton(), XGrabKey(), XGrabKeyboard(), XGrabPointer(), XGrabServer(), XUngrabButton(), XUngrabKeyboard(),
XUngrabPointer(), XUngrabServer().
Xlib - Grabbing XUngrabKey()