Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XtGrabKey(3) — OSF1 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XtAddGrab(1)

XtGrabButton(1)

XtGrabKeyboard(1)

XtGrabPointer(1)

XtRegisterGrabAction(1)

XtUngrabButton(1)

XtUngrabKey(1)

XtUngrabKeyboard(1)

XtUngrabPointer(1)

 

Name

XtGrabKey — passively grab a single key of the keyboard. 

Synopsis

void XtGrabKey(widget, keycode, modifiers, owner_events, pointer_mode, keyboard_mode)

      Widget widget;
      KeyCode keycode;
      Modifiers modifiers;
      Boolean owner_events;
      int pointer_mode, keyboard_mode;

Arguments

widgetSpecifies the widget in whose window the key is to be grabbed. 

keycodeSpecifies the keycode to be grabbed.  It may be a modifier key.  Specifying AnyKey is equivalent to issuing the request for all key codes. 

modifiersSpecifies a set of keymasks. This is a bitwise OR of one or more of the following symbols: ShiftMask, LockMask, Control Mask, Mod1Mask, Mod2Mask, Mod3Mask, Mod4Mask, Mod5Mask, or AnyModifier.  AnyModifier is equivalent to issuing the grab key request for all possible modifier combinations (including no modifiers).  All specified modifiers do not need to have currently assigned keycodes. 

grab_window
Specifies the window in which the specified key combination will initiate an active grab.

owner_events
Specifies whether the grab window should receive all events (True) or whether the grabbing application should receive all events normally (False). 

pointer_mode
Controls processing of pointer events during the grab. Pass one of these constants: GrabModeSync or GrabModeAsync. 

keyboard_mode
Controls processing of keyboard events during the grab. Pass one of these constants: GrabModeSync or GrabModeAsync. 

Description

XtGrabKey calls XGrabKey specifying the widget’s window as the grab window if the widget is realized.  The remaining arguments are exactly as for XGrabKey.  If the widget is not realized, or is later unrealized, the call to XGrabKey will be performed (again) when the widget is realized and its window becomes mapped.  In the future, if a KeyPress event matching the specified keycode and modifiers (which may be AnyKey and/or AnyModifier, respectively) arrives for the widget’s window and there is a modal cascade and the widget is not in the active subset of the cascade and the keyboard was not previously grabbed, then the Intrinsics will call XtUngrabKeyboard with the timestamp from the KeyPress event. 

See Also

XtAddGrab(1), XtGrabButton(1), XtGrabKeyboard(1), XtGrabPointer(1), XtRegisterGrabAction(1), XtUngrabButton(1), XtUngrabKey(1), XtUngrabKeyboard(1), XtUngrabPointer(1). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026