1XkbGetDeviceInfo(3) XKB FUNCTIONS XkbGetDeviceInfo(3)
2
3
4
6 XkbGetDeviceInfo - Determine whether the X server allows Xkb access to
7 particular capabilities of input devices other than the core X key‐
8 board, or to determine the status of indicator maps, indicator names or
9 button actions on a non-KeyClass extension device
10
12 XkbDeviceInfoPtr XkbGetDeviceInfo (Display *dpy, unsigned int which,
13 unsigned int device_spec, unsigned int ind_class, unsigned int
14 ind_id);
15
17 dpy connection to X server
18
19 which mask indicating information to return
20
21 device_spec
22 device ID, or XkbUseCoreKbd
23
24 ind_class
25 feedback class for indicator requests
26
27 ind_id feedback ID for indicator requests
28
30 To determine whether the X server allows Xkb access to particular capa‐
31 bilities of input devices other than the core X keyboard, or to deter‐
32 mine the status of indicator maps, indicator names or button actions on
33 a non-KeyClass extension device, use XkbGetDeviceInfo.
34
35 XkbGetDeviceInfo returns information about the input device specified
36 by device_spec. Unlike the device_spec parameter of most Xkb func‐
37 tions, device_spec does not need to be a keyboard device. It must, how‐
38 ever, indicate either the core keyboard or a valid X Input Extension
39 device.
40
41 The which parameter is a mask specifying optional information to be re‐
42 turned. It is an inclusive OR of one or more of the values from Table 1
43 and causes the returned XkbDeviceInfoRec to contain values for the cor‐
44 responding fields specified in the table.
45
46 Table 1 XkbDeviceInfoRec Mask Bits
47 ____________________________________________________________________________________
48 Name XkbDeviceInfoRec Value Capability If Set
49 Fields Effected
50 ____________________________________________________________________________________
51 XkbXI_KeyboardsMask (1L <<0) Clients can use all
52 Xkb requests and events
53 with KeyClass devices
54 supported by the input
55 device extension.
56
57 XkbXI_ButtonActionsMask num_btns (1L <<1) Clients can assign key
58 btn_acts actions to buttons
59 non-KeyClass input
60 extension devices.
61
62 XkbXI_IndicatorNamesMask leds->names (1L <<2) Clients can assign
63 names to indicators on
64 non-KeyClass input
65 extension devices.
66
67 XkbXI_IndicatorMapsMask leds->maps (1L <<3) Clients can assign
68 indicator maps to
69 indicators on
70 non-KeyClass input
71 extension devices.
72
73 XkbXI_IndicatorStateMask leds->state (1L <<4) Clients can request
74 the status of indicators
75 on non-KeyClass input
76 extension devices.
77
78 XkbXI_IndicatorsMask sz_leds (0x1c) XkbXI_IndicatorNamesMask |
79 num_leds XkbXI_IndicatorMapsMask |
80 leds->* XkbXI_IndicatorStateMask
81
82 XkbXI_UnsupportedFeaturesMask unsupported (1L <<15)
83
84 XkbXI_AllDeviceFeaturesMask Those selected (0x1e) XkbXI_IndicatorsMask |
85 by Value Column XkbSI_ButtonActionsMask
86 masks
87
88 XkbXI_AllFeaturesMask Those selected (0x1f) XkbSI_AllDeviceFeaturesMask |
89 by Value Column XkbSI_KeyboardsMask
90 masks
91
92 XkbXI_AllDetailsMask Those selected (0x801f) XkbXI_AllFeaturesMask |
93 by Value column XkbXI_UnsupportedFeaturesMask
94 masks
95
96 The XkbDeviceInfoRec returned by XkbGetDeviceInfo always has values for
97 name (may be a null string, ""), type, supported, unsupported,
98 has_own_state, dflt_kbd_fd, and dflt_kbd_fb. Other fields are filled
99 in as specified by which.
100
101 Upon return, the supported field will be set to the inclusive OR of
102 zero or more bits from Table 1; each bit set indicates an optional Xkb
103 extension device feature supported by the server implementation, and a
104 client may modify the associated behavior.
105
106 If the XkbButtonActionsMask bit is set in which, the XkbDeviceInfoRec
107 returned will have the button actions (btn_acts field) filled in for
108 all buttons.
109
110 If which includes one of the bits in XkbXI_IndicatorsMask, the feedback
111 class of the indicators must be specified in ind_class, and the feed‐
112 back ID of the indicators must be specified in ind_id. If the request
113 does not include any of the bits in XkbXI_IndicatorsMask, the ind_class
114 and ind_id parameters are ignored. The class and ID can be obtained via
115 the input device extension XListInputDevices request.
116
117 If any of the XkbXI_IndicatorsMask bits are set in which, the XkbDevi‐
118 ceInfoRec returned will have filled in the portions of the leds struc‐
119 ture corresponding to the indicator feedback identified by ind_class
120 and ind_id. The leds vector of the XkbDeviceInfoRec is allocated if
121 necessary and sz_leds and num_leds filled in. The led_class, led_id and
122 phys_indicators fields of the leds entry corresponding to ind_class and
123 ind_id are always filled in. If which contains XkbXI_IndicatorNames‐
124 Mask, the names_present and names fields of the leds structure corre‐
125 sponding to ind_class and ind_id are returned. If which contains Xk‐
126 bXI_IndicatorStateMask, the corresponding state field is updated. If
127 which contains XkbXI_IndicatorMapsMask, the maps_present and maps
128 fields are updated.
129
130 Xkb provides convenience functions to request subsets of the informa‐
131 tion available via XkbGetDeviceInfo. These convenience functions mir‐
132 ror some of the mask bits. The functions all take an XkbDeviceInfoPtr
133 as an input argument and operate on the X Input Extension device speci‐
134 fied by the device_spec field of the structure. Only the parts of the
135 structure indicated in the function description are updated. The XkbDe‐
136 viceInfoRec structure used in the function call can be obtained by
137 calling XkbGetDeviceInfo or can be allocated by calling XkbAllocDevice‐
138 Info.
139
141 Information about X Input Extension devices is transferred between a
142 client program and the Xkb extension in an XkbDeviceInfoRec structure:
143
144 typedef struct {
145 char * name; /* name for device */
146 Atom type; /* name for class of devices */
147 unsigned short device_spec; /* device of interest */
148 Bool has_own_state; /* True=>this device has its own state */
149 unsigned short supported; /* bits indicating supported capabilities */
150 unsigned short unsupported; /* bits indicating unsupported capabilities */
151 unsigned short num_btns; /* number of entries in btn_acts */
152 XkbAction * btn_acts; /* button actions */
153 unsigned short sz_leds; /* total number of entries in LEDs vector */
154 unsigned short num_leds; /* number of valid entries in LEDs vector */
155 unsigned short dflt_kbd_fb; /* input extension ID of default (core kbd) indicator */
156 unsigned short dflt_led_fb; /* input extension ID of default indicator feedback */
157 XkbDeviceLedInfoPtr leds; /* LED descriptions */
158 } XkbDeviceInfoRec, *XkbDeviceInfoPtr;
159
160
162 XkbAllocDeviceInfo(3), XListInputDevices(3)
163
164
165
166X Version 11 libX11 1.8.7 XkbGetDeviceInfo(3)