XtGrabKey(3Xm)

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)
    Widget    widget;
    Keycode    keycode;
    unsigned int    modifiers;
    Boolean    owner_events;
    int    pointer_mode;
    int    keyboard_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.

widget
    Specifies 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.

modifiers
    Specifies 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_events
    Specifies 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_mode
    Specifies further processing of pointer events. You can pass GrabModeSync or GrabModeAsync.

keyboard_mode
    Specifies further processing of keyboard events. You can pass GrabModeSync or GrabModeAsync.

RELATED INFORMATION
XGrabKey(3Xm) and XtUngrabKey(3Xm).