XGetDeviceKeyMapping, XChangeDeviceKeyMapping - query or change device key mappings
#include <X11/extensions/XInput.h> KeySym *XGetDeviceKeyMapping( Display *display, XDevice *device, KeyCode first_keycode, int keycode_count, int *keysyms_per_keycode_return); display Specifies the connection to the X server. device Specifies the device whose key mapping is to be queried or modified. first_keycode Specifies the first KeyCode to be returned. keycode_count Specifies the number of KeyCodes to be returned or modified. keysyms_per_keycode Specifies the number of KeySyms per KeyCode. keysyms_per_keycode_return Specifies the address of a variable into which the number of KeySyms per KeyCodewill be returned. keysyms Specifies the address of an array of KeySyms.
For the specified device, the XGetDeviceKeyMapping request returns the symbols for the specified number of KeyCodes starting with first_keycode. The value specified in first_keycode must be greater than or equal to min_keycode as returned by XListInputDevices, or a BadValue error results. In addition, the following expression must be less than or equal to max_keycode as returned by XListInputDevices: 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 XGetDeviceKeyMapping, use XFree. If the specified device does not support input class keys, a BadMatch error will result. XGetDeviceKeyMapping can generate a BadDevice, BadMatch, or BadValue error. For the specified device, the XChangeDeviceKeyMapping request defines the symbols for the specified number of KeyCodes starting with first_keycode. The symbols for KeyCodes outside this range remain unchanged. The number of elements in keysyms must be: num_codes * keysyms_per_keycode The specified first_keycode must be greater than or equal to min_keycode returned by XListInputDevices, or a BadValue error results. In addition, the following expression must be less than or equal to max_keycode as returned by XListInputDevices, or a BadValue error results: first_keycode + num_codes - 1 KeySym number N, counting from zero, for KeyCode K has the following index in keysyms, counting from zero: (K - first_keycode) * keysyms_per_keycode + N The specified keysyms_per_keycode can be chosen arbitrarily by the client to be large enough to hold all desired symbols. A special KeySym value of NoSymbol should be used to fill in unused elements for individual KeyCodes. It is legal for NoSymbol to appear in nontrailing positions of the effective list for a KeyCode.XChangeDeviceKeyMapping generates a DeviceMappingNotify event that is sent to all clients that have selected that type of event. There is no requirement that the X server interpret this mapping. It is merely stored for reading and writing by clients. If the specified device does not support input class keys, a BadMatch error results. XChangeDeviceKeyMapping can generate a BadDevice, BadMatch, BadAlloc, or BadValue error.
BadDevice An invalid device was specified. The specified device does not exist or has not been opened by this client via XOpenInputDevice. This error may also occur if the specified device is the X keyboard or X pointer device. BadMatch This error may occur if an XGetDeviceKeyMapping or XChangeDeviceKeyMapping request was made specifying a device that has no keys. 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. BadAlloc The server failed to allocate the requested resource or server memory.
XSetDeviceButtonMapping(3), XSetDeviceModifierMapping(__3_) 03/09/2013 XGETDEVICEKEYMAPPING(3)
Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.
Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.
Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.
Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.
The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.
Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.
Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.
Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.