2 .\" Title: xsetdevicebuttonmapping
3 .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
6 .\" Manual: [FIXME: manual]
7 .\" Source: [FIXME: source]
10 .TH "XSETDEVICEBUTTONMAPP" "libmansuffix" "09/07/2010" "[FIXME: source]" "[FIXME: manual]"
11 .\" -----------------------------------------------------------------
12 .\" * set default formatting
13 .\" -----------------------------------------------------------------
14 .\" disable hyphenation
16 .\" disable justification (adjust text to left margin only)
18 .\" -----------------------------------------------------------------
19 .\" * MAIN CONTENT STARTS HERE *
20 .\" -----------------------------------------------------------------
22 XSetDeviceButtonMapping, XGetDeviceButtonMapping \- query or change device button mappings
26 #include <X11/extensions/XInput\&.h>
30 int XSetDeviceButtonMapping( Display *display,
37 int XGetDeviceButtonMapping( Display *display,
39 unsigned char map_return[],
45 Specifies the connection to the X server\&.
50 Specifies the device whose button mapping is to be
56 Specifies the mapping list\&.
61 Returns the mapping list\&.
66 Specifies the number of items in the mapping list\&.
74 The XSetDeviceButtonMapping request sets the mapping of the
75 specified device\&. If it succeeds, the X server generates a
76 DeviceMappingNotify event, and XSetDeviceButtonMapping returns
77 MappingSuccess\&. Element map[i] defines the logical button
78 number for the physical button i+1\&. The length of the list must
79 be the same as XGetDeviceButtonMapping would return, or a
80 BadValue error results\&. A zero element disables a button, and
81 elements are not restricted in value by the number of physical
82 buttons\&. However, no two elements can have the same nonzero
83 value, or a BadValue error results\&. If any of the buttons to be
84 altered are logically in the down state,
85 XSetDeviceButtonMapping returns MappingBusy, and the mapping is
96 XSetDeviceButtonMapping can generate BadDevice, BadMatch, and
107 The XGetDeviceButtonMapping request returns the current mapping
108 of the specified device\&. Buttons are numbered starting from
109 one\&.XGetDeviceButtonMapping returns the number of physical
110 buttons actually on the device\&. The nominal mapping for a
111 device is map[i]=i+1\&. The nmap argument specifies the length of
112 the array where the device mapping is returned, and only the
113 first nmap elements are returned in map_return\&.
123 XGetDeviceButtonMapping can generate BadDevice or BadMatch
136 An invalid device was specified\&. The specified device
137 does not exist or has not been opened by this client via
138 XOpenInputDevice\&. This error may also occur if the
139 specified device is the X keyboard or X pointer device\&.
150 This error may occur if an XGetDeviceButtonMapping or
151 XSetDeviceButtonMapping request was made specifying a
152 device that has no buttons\&.
163 Some numeric value falls outside the range of values
164 accepted by the request\&. Unless a specific range is
165 specified for an argument, the full range defined by the
166 argument\'s type is accepted\&. Any argument defined as a
167 set of alternatives can generate this error\&.
178 XChangeDeviceKeyboardControl(libmansuffix), XChangeDeviceKeyMapping(libmansuffix),
179 XChangeDeviceModifierMapping(libmansuffix)