|
|
HP Xlib Extensions: > Chapter 6 HP Input Device Extension FunctionsGetting the Key Mapping of Extended Input Devices |
|
To get the key mapping of an extended input device, use XHPGetDeviceKeyMapping.
Title not available (Getting the Key Mapping of Extended Input Devices)
XHPGetDeviceKeyMapping allows a client program to read and use the key symbols for the keycodes generated by an extended input device (other than the X keyboard and X pointer devices). The specified device must have previously been opened (turned on) with XHPSetInputDevice. Starting with first_keycode_wanted, XHPGetDeviceKeyMapping returns the symbols for the specified number of KeyCodes. The specified first_keycode counted must be greater than or equal to min_keycode as reported by the XHPListInputDevices request. Also, max_keycode must be greater than first_keycode + keycode_count - 1. If either of these conditions is not met, the function returns a BadValue error. The number of elements in the KeySyms list is: keycode_count * keysyms_per_code + N. KeySym number N (counting from zero) for KeyCode K has the following index in keysyms: (K - first_keycode_wanted) * keysyms_per_keycode_return + N. The specified keysyms_per_keycode_return can be chosen arbitrarily by the client to be large enough to hold all desired symbols. Using the special KeySym value of NoSymbol fills in unused elements for individual KeyCodes. Use XFree to free the returned KeySym list when it is no longer needed. XHPGetDeviceKeyMapping can generate BadDevice and BadValue errors. |
|