1XSetDeviceButtonMapping(3)        X FUNCTIONS       XSetDeviceButtonMapping(3)
2
3
4

NAME

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

SYNTAX

10       int XSetDeviceButtonMapping(Display *display, XDevice *device, unsigned
11              char map[], int nmap);
12
13       int XGetDeviceButtonMapping(Display *display, XDevice *device, unsigned
14              char map_return[], int nmap);
15

ARGUMENTS

17       display     Specifies the connection to the X server.
18
19       device      Specifies the device whose button mapping is to be  queried
20                   or changed.
21
22       map         Specifies the mapping list.
23
24       map_return  Returns the mapping list.
25
26       nmap        Specifies the number of items in the mapping list.
27

DESCRIPTION

29       The  XSetDeviceButtonMapping  request sets the mapping of the specified
30       device.  If it succeeds, the X server generates  a  DeviceMappingNotify
31       event,  and  XSetDeviceButtonMapping  returns  MappingSuccess.  Element
32       map[i] defines the logical button number for the physical  button  i+1.
33       The  length  of  the  list  must be the same as XGetDeviceButtonMapping
34       would return, or a BadValue error results.  A zero element  disables  a
35       button, and elements are not restricted in value by the number of phys‐
36       ical buttons.  However, no two  elements  can  have  the  same  nonzero
37       value,  or  a  BadValue  error  results.   If  any of the buttons to be
38       altered  are  logically  in  the  down  state,  XSetDeviceButtonMapping
39       returns MappingBusy, and the mapping is not changed.
40
41       XSetDeviceButtonMapping can generate BadDevice, BadMatch, and  BadValue
42       errors.
43
44       The XGetDeviceButtonMapping request returns the current mapping of  the
45       specified device.  Buttons are numbered starting from one.  XGetDevice‐
46       ButtonMapping returns the number of physical buttons  actually  on  the
47       device.   The  nominal  mapping  for  a device is map[i]=i+1.  The nmap
48       argument specifies the length of the array where the device mapping  is
49       returned, and only the first nmap elements are returned in map_return.
50
51       XGetDeviceButtonMapping can generate BadDevice or BadMatch errors.
52

DIAGNOSTICS

54       BadDevice   An invalid device was specified.  The specified device does
55                   not exist or has not been opened by this client via  XOpen‐
56                   InputDevice.   This  error  may also occur if the specified
57                   device is the X keyboard or X pointer device.
58
59       BadMatch    This error may occur if an XGetDeviceButtonMapping or XSet‐
60                   DeviceButtonMapping  request  was  made specifying a device
61                   that has no buttons.
62
63       BadValue    Some numeric  value  falls  outside  the  range  of  values
64                   accepted by the request.  Unless a specific range is speci‐
65                   fied for an argument, the full range defined by  the  argu‐
66                   ment's  type is accepted.  Any argument defined as a set of
67                   alternatives can generate this error.
68

SEE ALSO

70       XChangeDeviceKeyboardControl(3),
71       XChangeDeviceKeyMapping(3)
72       XChangeDeviceModifierMapping(3)
73       Programming With Xlib
74
75
76
77X Version 11                      libXi 1.1.1       XSetDeviceButtonMapping(3)
Impressum