XQueryKeymap() XQueryKeymap()
Name
XQueryKeymap - obtain a bit vector for the current state of the keyboard.
Synopsis
XQueryKeymap(display, keys_return)
Display *display;
char keys_return[32];
Arguments
display Specifies a connection to an X server; returned from XOpenDisplay().
keys_return
Returns an array of bytes that identifies which keys are pressed down. Each bit represents one key of the keyboard.
Description
XQueryKeymap() 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 sig-
nificant bit in the byte representing key 8N. Note that the logical state may lag the physical state if device event processing is frozen
due to a grab.
See Also
XChangeKeyboardMapping(), XDeleteModifiermapEntry(), XFreeModifiermap(), XGetKeyboardMapping(), XGetModifierMapping(), XInsertModi-
fiermapEntry(), XKeycodeToKeysym(), XKeysymToKeycode(), XKeysymToString(), XLookupKeysym(), XLookupString(), XNewModifiermap(), XRebind-
Keysym(), XRefreshKeyboardMapping(), XSetModifierMapping(), XStringToKeysym().
Xlib - Keyboard XQueryKeymap()