XtGrabKey(3Xm) — UNIX Programmer’s Manual
NAME
XtGrabKey — a function that establishes a passive grab on the specified keys.
SYNOPSIS
#include <Xm/Xm.h> void XtGrabKey (widget, keycode, modifiers, owner_events, pointer_mode, keyboard_mode)
Widgetwidget;
Keycodekeycode;
unsigned int modifiers;
Booleanowner_events;
intpointer_mode;
intkeyboard_mode;
DESCRIPTION
XtGrabKey establishes a passive grab on the specified keys, such that when the specified key/modifier combination is pressed, the keyboard is grabbed. It also allows the client to redirect the specified key event to the root widget of a hierarchy.
widgetSpecifies the root widget to the XtGrabKeyboard call. All key events that would have been dispatched to other subwindows will get dispatched to it subject to owner_events.
keycode
Specifies the Keycode. This maps to the specific key to be grabbed.
modifiersSpecifies the set of keymasks. This mask is the bitwise inclusive OR of these keymask bits: ShiftMask, LockMask, ControlMask, Mod1Mask, Mod2Mask, Mod3Mask, Mod4Mask, Mod5Mask. You can also pass AnyModifier, which is equivalent to issuing the grab key request for all possible modifier combinations, including the combination of no modifiers.
owner_eventsSpecifies if the pointer events are to be reported normally (pass True) or with respect to the grab window if selected by the event mask (pass False).
pointer_modeSpecifies further processing of pointer events. You can pass GrabModeSync or GrabModeAsync.
keyboard_modeSpecifies further processing of keyboard events. You can pass GrabModeSync or GrabModeAsync.
RELATED INFORMATION
XGrabKey(3Xm) and XtUngrabKey(3Xm).
7th Edition