(Translated by https://www.hiragana.jp/)
Xlib Programming Manual: XQueryKeymap
XQueryKeymap
Syntax
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.
|
Description
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.
See also
XAutoRepeatOff(),
XAutoRepeatOn(),
XBell(),
XChangeKeyboardControl(),
XChangeKeyboardMapping(),
XGetKeyboardControl(),
XSetPointerMapping(),
"Keyboard and Pointer Settings".
Christophe Tronche, ch@tronche.com