1XSETDEVICEBUTTONMAPP(3)                                XSETDEVICEBUTTONMAPP(3)
2
3
4

NAME

6       XSetDeviceButtonMapping, XGetDeviceButtonMapping - query or change
7       device button mappings
8

SYNOPSIS

10       #include <X11/extensions/XInput.h>
11
12       int XSetDeviceButtonMapping( Display *display,
13                                    XDevice *device,
14                                    unsigned char map[],
15                                    int nmap);
16
17       int XGetDeviceButtonMapping( Display *display,
18                                    XDevice *device,
19                                    unsigned char map_return[],
20                                    int nmap);
21
22       display
23              Specifies the connection to the X server.
24
25       device
26              Specifies the device whose button mapping is to be
27              queried or changed.
28
29       map
30              Specifies the mapping list.
31
32       map_return
33              Returns the mapping list.
34
35       nmap
36              Specifies the number of items in the mapping list.
37

DESCRIPTION

39           The XSetDeviceButtonMapping request sets the mapping of the
40           specified device. If it succeeds, the X server generates a
41           DeviceMappingNotify event, and XSetDeviceButtonMapping returns
42           MappingSuccess. Element map[i] defines the logical button
43           number for the physical button i+1. The length of the list must
44           be the same as XGetDeviceButtonMapping would return, or a
45           BadValue error results. A zero element disables a button, and
46           elements are not restricted in value by the number of physical
47           buttons. However, no two elements can have the same nonzero
48           value, or a BadValue error results. If any of the buttons to be
49           altered are logically in the down state,
50           XSetDeviceButtonMapping returns MappingBusy, and the mapping is
51           not changed.
52
53           XSetDeviceButtonMapping can generate BadDevice, BadMatch, and
54           BadValue errors.
55
56           The XGetDeviceButtonMapping request returns the current mapping
57           of the specified device. Buttons are numbered starting from
58           one. XGetDeviceButtonMapping returns the number of physical
59           buttons actually on the device. The nominal mapping for a
60           device is map[i]=i+1. The nmap argument specifies the length of
61           the array where the device mapping is returned, and only the
62           first nmap elements are returned in map_return.
63
64           XGetDeviceButtonMapping can generate BadDevice or BadMatch
65           errors.
66

DIAGNOSTICS

68           BadDevice
69                  An invalid device was specified. The specified device
70                  does not exist or has not been opened by this client via
71                  XOpenInputDevice. This error may also occur if the
72                  specified device is the X keyboard or X pointer device.
73
74           BadMatch
75                  This error may occur if an XGetDeviceButtonMapping or
76                  XSetDeviceButtonMapping request was made specifying a
77                  device that has no buttons.
78
79           BadValue
80                  Some numeric value falls outside the range of values
81                  accepted by the request. Unless a specific range is
82                  specified for an argument, the full range defined by the
83                  argument's type is accepted. Any argument defined as a
84                  set of alternatives can generate this error.
85

SEE ALSO

87           XChangeDeviceKeyboardControl(3), XChangeDeviceKeyMapping(3),
88           XChangeDeviceModifierMapping(3)
89
90
91
92                                  09/15/2021           XSETDEVICEBUTTONMAPP(3)
Impressum