1 XSETDEVICEBUTTONMAPPING(libmansuffix)
2 =====================================
7 XSetDeviceButtonMapping, XGetDeviceButtonMapping - query or
8 change device button mappings
13 #include <X11/extensions/XInput.h>
15 int XSetDeviceButtonMapping( Display *display,
20 int XGetDeviceButtonMapping( Display *display,
22 unsigned char map_return[],
26 Specifies the connection to the X server.
29 Specifies the device whose button mapping is to be
33 Specifies the mapping list.
36 Returns the mapping list.
39 Specifies the number of items in the mapping list.
44 The XSetDeviceButtonMapping request sets the mapping of the
45 specified device. If it succeeds, the X server generates a
46 DeviceMappingNotify event, and XSetDeviceButtonMapping returns
47 MappingSuccess. Element map[i] defines the logical button
48 number for the physical button i+1. The length of the list must
49 be the same as XGetDeviceButtonMapping would return, or a
50 BadValue error results. A zero element disables a button, and
51 elements are not restricted in value by the number of physical
52 buttons. However, no two elements can have the same nonzero
53 value, or a BadValue error results. If any of the buttons to be
54 altered are logically in the down state,
55 XSetDeviceButtonMapping returns MappingBusy, and the mapping is
58 XSetDeviceButtonMapping can generate BadDevice, BadMatch, and
61 The XGetDeviceButtonMapping request returns the current mapping
62 of the specified device. Buttons are numbered starting from
63 one.XGetDeviceButtonMapping returns the number of physical
64 buttons actually on the device. The nominal mapping for a
65 device is map[i]=i+1. The nmap argument specifies the length of
66 the array where the device mapping is returned, and only the
67 first nmap elements are returned in map_return.
69 XGetDeviceButtonMapping can generate BadDevice or BadMatch
76 An invalid device was specified. The specified device
77 does not exist or has not been opened by this client via
78 XOpenInputDevice. This error may also occur if the
79 specified device is the X keyboard or X pointer device.
82 This error may occur if an XGetDeviceButtonMapping or
83 XSetDeviceButtonMapping request was made specifying a
84 device that has no buttons.
87 Some numeric value falls outside the range of values
88 accepted by the request. Unless a specific range is
89 specified for an argument, the full range defined by the
90 argument's type is accepted. Any argument defined as a
91 set of alternatives can generate this error.
96 XChangeDeviceKeyboardControl(libmansuffix), XChangeDeviceKeyMapping(libmansuffix),
97 XChangeDeviceModifierMapping(libmansuffix)