XGetKeyboardControl

Syntax

XGetKeyboardControl(display, values_return)
      Display *display;
      XKeyboardState *values_return;

Arguments

display Specifies the connection to the X server.
values_return Returns the current keyboard controls in the specified XKeyboardState structure.

Description

The XGetKeyboardControl() function returns the current control values for the keyboard to the XKeyboardState structure.


typedef struct {
	int key_click_percent;
	int bell_percent;
	unsigned int bell_pitch, bell_duration;
	unsigned long led_mask;
	int global_auto_repeat;
	char auto_repeats[32];
} XKeyboardState;

For the LEDs, the least-significant bit of led_mask corresponds to LED one, and each bit set to 1 in led_mask indicates an LED that is lit. The global_auto_repeat member can be set to AutoRepeatModeOn or AutoRepeatModeOff . The auto_repeats member is a bit vector. Each bit set to 1 indicates that auto-repeat is enabled for the corresponding key. The vector is represented as 32 bytes. Byte N (from 0) contains the bits for keys 8N to 8N + 7 with the least-significant bit in the byte representing key 8N.

See also

XAutoRepeatOff(), XAutoRepeatOn(), XBell(), XChangeKeyboardControl(), XChangeKeyboardMapping(), XGetKeyboardControl(), XQueryKeymap(), XSetPointerMapping(), "Keyboard and Pointer Settings".
Christophe Tronche, ch@tronche.com