2 .\" Title: xsetdevicebuttonmapping
3 .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
6 .\" Manual: [FIXME: manual]
7 .\" Source: [FIXME: source]
10 .TH "XSETDEVICEBUTTONMAPP" "libmansuffix" "09/23/2011" "[FIXME: source]" "[FIXME: manual]"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 XSetDeviceButtonMapping, XGetDeviceButtonMapping \- query or change device button mappings
35 #include <X11/extensions/XInput\&.h>
39 int XSetDeviceButtonMapping( Display *display,
46 int XGetDeviceButtonMapping( Display *display,
48 unsigned char map_return[],
54 Specifies the connection to the X server\&.
59 Specifies the device whose button mapping is to be
65 Specifies the mapping list\&.
70 Returns the mapping list\&.
75 Specifies the number of items in the mapping list\&.
83 The XSetDeviceButtonMapping request sets the mapping of the
84 specified device\&. If it succeeds, the X server generates a
85 DeviceMappingNotify event, and XSetDeviceButtonMapping returns
86 MappingSuccess\&. Element map[i] defines the logical button
87 number for the physical button i+1\&. The length of the list must
88 be the same as XGetDeviceButtonMapping would return, or a
89 BadValue error results\&. A zero element disables a button, and
90 elements are not restricted in value by the number of physical
91 buttons\&. However, no two elements can have the same nonzero
92 value, or a BadValue error results\&. If any of the buttons to be
93 altered are logically in the down state,
94 XSetDeviceButtonMapping returns MappingBusy, and the mapping is
105 XSetDeviceButtonMapping can generate BadDevice, BadMatch, and
116 The XGetDeviceButtonMapping request returns the current mapping
117 of the specified device\&. Buttons are numbered starting from
118 one\&.XGetDeviceButtonMapping returns the number of physical
119 buttons actually on the device\&. The nominal mapping for a
120 device is map[i]=i+1\&. The nmap argument specifies the length of
121 the array where the device mapping is returned, and only the
122 first nmap elements are returned in map_return\&.
132 XGetDeviceButtonMapping can generate BadDevice or BadMatch
145 An invalid device was specified\&. The specified device
146 does not exist or has not been opened by this client via
147 XOpenInputDevice\&. This error may also occur if the
148 specified device is the X keyboard or X pointer device\&.
159 This error may occur if an XGetDeviceButtonMapping or
160 XSetDeviceButtonMapping request was made specifying a
161 device that has no buttons\&.
172 Some numeric value falls outside the range of values
173 accepted by the request\&. Unless a specific range is
174 specified for an argument, the full range defined by the
175 argument\*(Aqs type is accepted\&. Any argument defined as a
176 set of alternatives can generate this error\&.
187 XChangeDeviceKeyboardControl(libmansuffix), XChangeDeviceKeyMapping(libmansuffix),
188 XChangeDeviceModifierMapping(libmansuffix)