Query: xgrabkey
OS: hpux
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
XGrabKey() XGrabKey() Name XGrabKey - grab a key. Synopsis XGrabKey(display, keycode, modifiers, grab_window, owner_events, pointer_mode, keyboard_mode) Display *display; int keycode; unsigned int modifiers; Window grab_window; Bool owner_events; int pointer_mode, keyboard_mode; Arguments display Specifies a connection to an X server; returned from XOpenDisplay(). keycode Specifies the keycode to be grabbed. It may be a modifier key. Specifying AnyKey is equivalent to issuing the request for all key codes. 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 grab key request for all possible modifier combinations (including no modifiers). All specified modifiers do not need to have currently assigned key- codes. 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 (False) or whether the grabbing application should receive all events normally (True). 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 XGrabKey() establishes a passive grab on the specified keys, such that when the specified key/modifier combination is pressed, the keyboard may be grabbed, and all keyboard events sent to this application. More formally, once an XGrabKey() call has been issued on a particular key/button combination: o IF the keyboard is not already actively grabbed, o AND the specified key, which itself can be a modifier key, is logically pressed when the specified modifier keys are logically down, o AND no other keys or modifier keys are logically down, o AND EITHER the grab window is an ancestor of (or is) the focus window OR the grab window is a descendent of the focus window and con- tains the pointer, o AND a passive grab on the same key combination does not exist on any ancestor of the grab window, o THEN the keyboard is actively grabbed, as for XGrabKeyboard(), the last keyboard grab time is set to the time at which the key was pressed (as transmitted in the KeyPress event), and the KeyPress event is reported. The active grab is terminated automatically when the specified key is released (independent of the state of the modifier keys). The KeyRe- lease event which terminates the active grab is sent to the grabbing window. The pointer_mode and keyboard_mode control the processing of events during the grab. If either is GrabModeSync, events for that device are not sent from the server to Xlib until XAllowEvents() is called to send the events. If either is GrabModeAsync, events for that device are sent normally. For more information on grabbing, see Volume One, Chapter 9, The Keyboard and Pointer. Errors BadAccess When using AnyModifier or AnyKey and another client has grabbed any overlapping combinations. In this case, no grabs are estab- lished. Another client has issued XGrabKey() for the same key combination in grab_window. BadValue keycode is not in the range between min_keycode and max_ keycode as returned by XDisplayKeycodes(). BadWindow See Also XChangeActivePointerGrab(), XGrabButton(), XGrabKeyboard(), XGrabPointer(), XGrabServer(), XUngrabButton(), XUngrabKey(), XUngrabKey- board(), XUngrabPointer(), XUngrabServer(). Xlib - Grabbing XGrabKey()
Related Man Pages |
---|
xungrabkey(3x11) - redhat |
xgrabkey(3) - debian |
xungrabkey(3) - x11r4 |
xgrabkey(3) - suse |
xgrabkey(3) - hpux |
Similar Topics in the Unix Linux Community |
---|
kbtrap 0.02 (Default branch) |
capture key board events using C program |
Detecting key combination in bash |
Grabbing Keywords Below a Searched Keyword |
Input keyboard keys upon program launch |