XChangeKeyboardControl(3X) XChangeKeyboardControl(3X)
NAME
XChangeKeyboardControl, XGetKeyboardControl,
XAutoRepeatOn, XAutoRepeatOff, XBell, XQueryKeymap -
manipulate keyboard settings
SYNOPSIS
XChangeKeyboardControl(display, value_mask, values)
Display *display;
unsigned long value_mask;
XKeyboardControl *values;
XGetKeyboardControl(display, values_return)
Display *display;
XKeyboardState *values_return;
XAutoRepeatOn(display)
Display *display;
XAutoRepeatOff(display)
Display *display;
XBell(display, percent)
Display *display;
int percent;
XQueryKeymap(display, keys_return)
Display *display;
char keys_return[32];
ARGUMENTS
display Specifies the connection to the X server.
keys_return
Returns an array of bytes that identifies
which keys are pressed down. Each bit
represents one key of the keyboard.
percent Specifies the volume for the bell, which can
range from -100 to 100 inclusive.
value_mask
Specifies one value for each bit set to 1 in
the mask.
values Specifies which controls to change. This
mask is the bitwise inclusive OR of the valid
control mask bits.
values_return
Returns the current keyboard controls in the
specified XKeyboardState structure.
- 1 -
XChangeKeyboardControl(3X) XChangeKeyboardControl(3X)
DESCRIPTION
The XChangeKeyboardControl function controls the
keyboard characteristics defined by the
XKeyboardControl structure. The value_mask argument
specifies which values are to be changed.
XChangeKeyboardControl can generate BadMatch and
BadValue errors.
The XGetKeyboardControl function returns the current
control values for the keyboard to the XKeyboardState
structure.
The XAutoRepeatOn function turns on auto-repeat for the
keyboard on the specified display.
The XAutoRepeatOff function turns off auto-repeat for
the keyboard on the specified display.
The XBell function rings the bell on the keyboard on
the specified display, if possible. The specified
volume is relative to the base volume for the keyboard.
If the value for the percent argument is not in the
range -100 to 100 inclusive, a BadValue error results.
The volume at which the bell rings when the percent
argument is nonnegative is:
base - [(base * percent) / 100] + percent
The volume at which the bell rings when the percent
argument is negative is:
base + [(base * percent) / 100]
To change the base volume of the bell, use
XChangeKeyboardControl.
XBell can generate a BadValue error.
The XQueryKeymap function returns a bit vector for the
logical state of the keyboard, where each bit set to 1
indicates that the corresponding key is currently
pressed down. 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.
Note that the logical state of a device (as seen by
client applications) may lag the physical state if
device event processing is frozen.
DIAGNOSTICS
- 2 -
XChangeKeyboardControl(3X) XChangeKeyboardControl(3X)
BadMatch Some argument or pair of arguments has the
correct type and range but fails to match in
some other way required by the request.
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.
SEE ALSO
XChangeKeyboardMapping(3X11), XSetPointerMapping(3X11)
Xlib Programming Manual
- 3 -