1XkbSetDeviceInfo(3)              XKB FUNCTIONS             XkbSetDeviceInfo(3)
2
3
4

NAME

6       XkbSetDeviceInfo  -  Modify  some or all of the characteristics of an X
7       Input Extension device
8

SYNOPSIS

10       Bool XkbSetDeviceInfo (Display *dpy, unsigned int  which,  XkbDeviceIn‐
11              foPtr device_info);
12

ARGUMENTS

14       - dpy  connection to X server
15
16       - which
17              mask indicating characteristics to modify
18
19       - device_info
20              structure defining the device and modifications
21

DESCRIPTION

23       To change characteristics of an X Input Extension device in the server,
24       first modify a local copy of the device structure and then  use  either
25       XkbSetDeviceInfo, or, to save network traffic, use an XkbDeviceChanges‐
26       Rec structure and call XkbChangeDeviceInfo to download the  changes  to
27       the server.
28
29       XkbSetDeviceInfo sends a request to the server to modify the character‐
30       istics of the device specified in the device_info structure.  The  par‐
31       ticular  characteristics  modified  are  identified  by the bits set in
32       which and take their values from the  relevant  fields  in  device_info
33       (see  Table  1).  XkbSetDeviceInfo returns True if the request was suc‐
34       cessfully sent to the server. If the X server implementation  does  not
35       allow  interaction between the X input extension and the Xkb Extension,
36       the function does nothing and returns False.
37                                Table 1 XkbDeviceInfoRec Mask Bits
38       ____________________________________________________________________________________
39       Name                         XkbDeviceInfoRec Value     Capability If Set
40                                    Fields Effected
41       ____________________________________________________________________________________
42       XkbXI_KeyboardsMask                           (1L <<0) Clients can use all
43                                                              Xkb requests and events
44                                                              with KeyClass devices
45                                                              supported by the input
46                                                              device extension.
47
48       XkbXI_ButtonActionsMask       num_btns        (1L <<1) Clients can assign key
49                                     btn_acts                 actions to buttons
50                                                              non-KeyClass input
51                                                              extension devices.
52
53       XkbXI_IndicatorNamesMask      leds->names     (1L <<2) Clients can assign
54                                                              names to indicators on
55                                                              non-KeyClass input
56                                                              extension devices.
57
58       XkbXI_IndicatorMapsMask       leds->maps      (1L <<3) Clients can assign
59                                                              indicator maps to
60                                                              indicators on
61                                                              non-KeyClass input
62                                                              extension devices.
63
64       XkbXI_IndicatorStateMask      leds->state     (1L <<4) Clients can request
65                                                              the status of indicators
66                                                              on non-KeyClass input
67                                                              extension devices.
68
69       XkbXI_IndicatorsMask          sz_leds         (0x1c)   XkbXI_IndicatorNamesMask |
70                                     num_leds                 XkbXI_IndicatorMapsMask |
71                                     leds->*                  XkbXI_IndicatorStateMask
72
73       XkbXI_UnsupportedFeaturesMask unsupported     (1L <<15)
74
75       XkbXI_AllDeviceFeaturesMask   Those selected  (0x1e)   XkbXI_IndicatorsMask |
76                                     by Value Column          XkbSI_ButtonActionsMask
77                                     masks
78
79       XkbXI_AllFeaturesMask         Those selected  (0x1f)   XkbSI_AllDeviceFeaturesMask |
80                                     by Value Column          XkbSI_KeyboardsMask
81                                     masks
82
83       XkbXI_AllDetailsMask          Those selected  (0x801f) XkbXI_AllFeaturesMask |
84                                     by Value column          XkbXI_UnsupportedFeaturesMask
85                                     masks
86
87       The which parameter specifies which aspects of  the  device  should  be
88       changed  and is a bitmask composed of an inclusive OR or one or more of
89       the following bits: XkbXI_ButtonActionsMask,  XkbXI_IndicatorNamesMask,
90       XkbXI_IndicatorMapsMask. If the features requested to be manipulated in
91       which are valid for the device, but the server does not support assign‐
92       ment  of one or more of them, that particular portion of the request is
93       ignored.
94
95       If the device specified in device_info->device_spec  does  not  contain
96       buttons and a request affecting buttons is made, or the device does not
97       contain indicators and a request affecting indicators is made,  a  Bad‐
98       Match protocol error results.
99
100       If  the  XkbXI_ButtonActionsMask  bit  is  set  in  the  supported mask
101       returned by XkbGetDeviceInfo, the Xkb extension allows applications  to
102       assign key actions to buttons on input extension devices other than the
103       core keyboard device. If the XkbXI_ButtonActionsMask is set  in  which,
104       the  actions  for  all  buttons specified in device_info are set to the
105       XkbActions specified in device_info->btn_acts.  If the number  of  but‐
106       tons requested to be updated is not valid for the device, XkbSetDevice‐
107       Info returns False and a BadValue protocol error results.
108
109       If the XkbXI_IndicatorMaps and / or XkbXI_IndicatorNamesMask bit is set
110       in  the  supported mask returned by XkbGetDeviceInfo, the Xkb extension
111       allows applications to assign maps and / or names to the indicators  of
112       nonkeyboard extension devices. If supported, maps and / or names can be
113       assigned to all extension device indicators, whether they are part of a
114       keyboard feedback or part of an indicator feedback.
115
116       If  the  XkbXI_IndicatorMapsMask and / or XkbXI_IndicatorNamesMask flag
117       is  set  in  which,  the  indicator  maps  and  /  or  names  for   all
118       device_info->num_leds  indicator devices specified in device_info->leds
119       are set to the maps and /  or  names  specified  in  device_info->leds.
120       device_info->leds->led_class  and  led_id  specify  the input extension
121       class and device ID for each indicator device to modify; if  they  have
122       invalid  values, a BadValue protocol error results and XkbSetDeviceInfo
123       returns False. If they have legal values but do not specify a  keyboard
124       or  indicator  class  feedback  for  the device in question, a BadMatch
125       error results.  If any of the values  in  device_info->leds->names  are
126       not a valid Atom or None, a BadAtom protocol error results.
127

RETURN VALUES

129       True           The   XkbSetDeviceInfo  function  returns  True  if  the
130                      request was successfully sent to the server.
131
132       False          The XkbSetDeviceInfo function returns  False  if  the  X
133                      server implementation does not allow interaction between
134                      the X input extension and the Xkb Extension.
135

STRUCTURES

137       Changes to an Xkb extension device may be tracked by listening to  Xkb‐
138       DeviceExtensionNotify  events and accumulating the changes in an XkbDe‐
139       viceChangesRec structure. The changes noted in the structure  may  then
140       be  used  in subsequent operations to update either a server configura‐
141       tion or a local copy of an  Xkb  extension  device  configuration.  The
142       changes structure is defined as follows:
143
144       typedef struct _XkbDeviceChanges {
145           unsigned int    changed;    /∗ bits indicating what has changed */
146           unsigned short  first_btn;  /∗ number of first button which changed, if any */
147           unsigned short  num_btns;   /∗ number of buttons that have changed */
148           XkbDeviceLedChangesRec leds;
149       } XkbDeviceChangesRec,*XkbDeviceChangesPtr;
150
151

DIAGNOSTICS

153       BadAtom        A name is neither a valid Atom or None
154
155       BadMatch       A  compatible  version  of  Xkb was not available in the
156                      server or an argument has correct type and range, but is
157                      otherwise invalid
158
159       BadValue       An argument is out of range
160

SEE ALSO

162       XkbChangeDeviceInfo(3), XkbGetDeviceInfo(3)
163
164
165
166X Version 11                     libX11 1.6.12             XkbSetDeviceInfo(3)
Impressum