KeySym *XGetKeyboardMapping(display, first_keycode, keycode_count,
keysyms_per_keycode_return)
Display *display;
KeyCode first_keycode;
int keycode_count;
int *keysyms_per_keycode_return;
display | Specifies the connection to the X server. |
first_keycode | Specifies the first KeyCode that is to be returned. |
keycode_count | Specifies the number of KeyCodes that are to be returned. |
keysyms_per_keycode_return | Returns the number of KeySyms per KeyCode. |
first_keycode + keycode_count - 1
If this is not the case, a BadValue error results. The number of elements in the KeySyms list is:
keycode_count * keysyms_per_keycode_return
KeySym number N, counting from zero, for KeyCode K has the following index in the list, counting from zero:
(K - first_code) * keysyms_per_code_return + N
The X server arbitrarily chooses the keysyms_per_keycode_return value to be large enough to report all requested symbols. A special KeySym value of NoSymbol is used to fill in unused elements for individual KeyCodes. To free the storage returned by XGetKeyboardMapping(), use XFree().
XGetKeyboardMapping() can generate a BadValue error.
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. |