Debian Codegraph @

man/XSetDeviceButtonMapping.txt

raw
1 XSETDEVICEBUTTONMAPPING(libmansuffix)
2 =====================================
3
4 NAME
5 ----
6
7 XSetDeviceButtonMapping, XGetDeviceButtonMapping - query or
8 change device button mappings
9
10 SYNOPSIS
11 --------
12
13 #include <X11/extensions/XInput.h>
14
15 int XSetDeviceButtonMapping( Display *display,
16 XDevice *device,
17 unsigned char map[],
18 int nmap);
19
20 int XGetDeviceButtonMapping( Display *display,
21 XDevice *device,
22 unsigned char map_return[],
23 int nmap);
24
25 display
26 Specifies the connection to the X server.
27
28 device
29 Specifies the device whose button mapping is to be
30 queried or changed.
31
32 map
33 Specifies the mapping list.
34
35 map_return
36 Returns the mapping list.
37
38 nmap
39 Specifies the number of items in the mapping list.
40
41 DESCRIPTION
42 -----------
43
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
56 not changed.
57
58 XSetDeviceButtonMapping can generate BadDevice, BadMatch, and
59 BadValue errors.
60
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.
68
69 XGetDeviceButtonMapping can generate BadDevice or BadMatch
70 errors.
71
72 DIAGNOSTICS
73 -----------
74
75 BadDevice
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.
80
81 BadMatch
82 This error may occur if an XGetDeviceButtonMapping or
83 XSetDeviceButtonMapping request was made specifying a
84 device that has no buttons.
85
86 BadValue
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.
92
93 SEE ALSO
94 --------
95
96 XChangeDeviceKeyboardControl(libmansuffix), XChangeDeviceKeyMapping(libmansuffix),
97 XChangeDeviceModifierMapping(libmansuffix)