XtUngrabKey()XtUngrabKey()Name
XtUngrabKey - cancel a passive key grab.
Synopsis
void XtUngrabKey(widget, keycode, modifiers)
Widget widget;
KeyCode keycode;
Modifiers modifiers;
Inputs
widget Specifies the widget in whose window the key was grabbed.
keycode Specifies the keycode to be ungrabbed.
modifiers Specifies the modifiers to be ungrabbed.
Availability
Release 4 and later.
DescriptionXtUngrabKey() cancels a passive grab on the specified keycode/modifiers
combination for widget w. If w is realized, XtUngrabKey() calls XUn‐
grabKey() specifying the widget's window as the ungrab window and pass‐
ing the remaining argument unmodified. If the widget is not realized
XtUngrabKey() removes the deferred XtGrabKey() request, if any, for the
specified widget, keycode and modifiers.
The keycode argument is the keycode of the key you want to ungrab, or
the special value AnyKey which is equivalent to issuing the request for
all possible nonmodifier key codes.
The modifiers argument is a bitwise OR of one or more of the following
symbols: ShiftMask, LockMask, ControlMask, Mod1Mask, Mod2Mask,
Mod3Mask, Mod4Mask, Mod5Mask. The special value AnyModifier is also
allowed; using it is equivalent to issuing the ungrab button request
for all possible modifier combinations (including no modifiers).
XtUngrabKey() has no effect on an active grab.
See XtGrabKey() for more details on passive key grabs.
Usage
Most applications will never need to issue a passive grab. XtAddGrab()
(called by XtPopup()) can be used to implement modal popups inside an
application, and XtSetKeyboardFocus() can be used to redirect keyboard
focus within an application. Neither function actually issues a grab,
and so does not interrupt event processing by other clients.
Structures
The Modifiers and KeyCode types are defined as follows:
typedef unsigned int Modifiers;
typedef unsigned char KeyCode;
See AlsoXtAddGrab(1), XtGrabButton(1), XtGrabKey(1), XtGrabKeyboard(1), XtGrab‐
Pointer(1), XtSetKeyboardFocus(1), XtUngrabButton(1), XtUngrabKey‐
board(1), XtUngrabPointer(1).
Xt - Keyboard Handling XtUngrabKey()