Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XAllowEvents(3X)

XGrabButton(3X)

XGrabKey(3X)

XGrabPointer(3X)

XGrabKeyboard(3X)  —  X Version 11

NAME

XGrabKeyboard, XUngrabKeyboard − manipulate the keyboard

SYNTAX

int XGrabKeyboard(display, grab_window, owner_events, pointer_mode, keyboard_mode, time)
      Display ∗display;
      Window grab_window;
      Bool owner_events;
      int pointer_mode, keyboard_mode;
      Time time;

XUngrabKeyboard(display, time)
      Display ∗display;
      Time time;

ARGUMENTS

displaySpecifies the connection to the X server. 

grab_windowSpecifies the window ID of the window associated with the keyboard you want to grab. 

keyboard_mode
Controls further processing of keyboard events. You can pass one of these constants: GrabModeSync or GrabModeAsync.

owner_events
Specifies a boolean value of either True or False.

pointer_mode
Controls further processing of pointer events. You can pass one of these constants: GrabModeSync or GrabModeAsync.

timeSpecifies the time.  You can pass either a timestamp, expressed in milliseconds, or CurrentTime.

DESCRIPTION

The XGrabKeyboard function actively grabs control of the main keyboard and generates FocusIn and FocusOut events. .PN XGrabKeyboard can generate BadValue and BadWindow errors.

The XUngrabKeyboard function releases the keyboard and any queued events if this client has it actively grabbed from either XGrabKeyboard or XGrabKey.

DIAGNOSTICS

BadValue Some numeric value falls outside the range of values accepted by the request.  Unless a specific range is specified for an argument, the full range defined by the argument’s type is accepted.  Any argument defined as a set of alternatives can generate this error. 

BadWindow A value for a Window argument does not name a defined Window. 

SEE ALSO

XAllowEvents(3X), XGrabButton(3X), XGrabKey(3X), XGrabPointer(3X)
Xlib − C Language X Interface

1 March 1988

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