-
Notifications
You must be signed in to change notification settings - Fork 6
/
xkb.proto
215 lines (196 loc) · 3.92 KB
/
xkb.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
EXTENSION "XKEYBOARD" Xkb
USE core
REQUESTS
UseExtension RESPONDS /* 0 */
# TODO:
SelectEvents UNSUPPORTED /* 1 */
Unknown UNSUPPORTED
Bell /* 3 */
GetState RESPONDS UNSUPPORTED /* 4 */
LatchLockState UNSUPPORTED /* 5 */
GetControls RESPONDS UNSUPPORTED /* 6 */
SetControls UNSUPPORTED /* 7 */
GetMap RESPONDS /* 8 */
SetMap UNSUPPORTED /* 9 */
GetCompatMap RESPONDS UNSUPPORTED /* 10 */
SetCompatMap UNSUPPORTED /* 11 */
GetIndicatorState RESPONDS UNSUPPORTED /* 12 */
GetIndicatorMap RESPONDS UNSUPPORTED /* 13 */
SetIndicatorMap UNSUPPORTED /* 14 */
GetNamedIndicator RESPONDS /* 15 */
SetNamedIndicator UNSUPPORTED /* 16 */
GetNames RESPONDS /* 17 */
SetNames UNSUPPORTED /* 18 */
GetGeometry RESPONDS UNSUPPORTED /* 19 */
SetGeometry UNSUPPORTED /* 20 */
PerClientFlags UNSUPPORTED /* 21 */
ListComponents RESPONDS UNSUPPORTED /* 22 */
GetKbdByName RESPONDS UNSUPPORTED /* 23 */
GetDeviceInfo RESPONDS UNSUPPORTED /* 24 */
SetDeviceInfo UNSUPPORTED /* 25 */
END
EVENTS
XkbEvent
END
ERRORS
# this also packs the type in subvalues,
# to support this we need support of parsing error packets, too
"Keyboard"
END
REQUEST UseExtension
4 major UINT16
6 minor UINT16
END
RESPONSE UseExtension
8 major UINT16
10 minor UINT16
END
CONSTANTS DEVICESPEC
0x100 UseCoreKbd
0x200 UseCorePtr
END
TYPE DEVICESPEC UINT16 constants DEVICESPEC
CONSTANTS BELLCLASSSPEC
0 KbdFeedback
5 LedFeedback
0x300 DefaultXI
# AllXI ???
END
TYPE BELLCLASSSPEC ENUM16 BELLCLASSSPEC
CONSTANTS IDSPEC
0x400 DfltXIId
END
TYPE IDSPEC UINT16 constants IDSPEC
REQUEST Bell
4 deviceSpec DEVICESPEC
6 bellClass BELLCLASSSPEC
8 bellID IDSPEC
10 percent INT8
11 forceSound BOOL
12 eventOnly BOOL
14 pitch INT16
16 duration INT16
20 name ATOM
24 window WINDOW
END
TYPE KEYCODE UINT8
REQUEST GetMap
4 deviceSpec DEVICESPEC
6 full UINT16
8 partial UINT16
10 firstType UINT8
11 nTypes UINT8
12 firstKeySym KEYCODE
13 nKeySyms UINT8
14 firstKeyAct KEYCODE
15 nKeyActs UINT8
16 firstKeyBehavior KEYCODE
17 nKeyBehaviors UINT8
18 virtualMods UINT16
END
RESPONSE GetMap
2 deviceID UINT8
10 minKeyCode KEYCODE
11 maxKeyCode KEYCODE
12 present UINT16
14 firstType UINT8
15 nTypes UINT8
16 totalTypes UINT8
17 firstKeySym KEYCODE
18 totalSyms UINT16
20 nKeySyms UINT8
21 firstKeyAct KEYCODE
22 totalActs UINT16
24 nKeyActs UINT8
25 firstKeyBehavior KEYCODE
26 nKeyBehaviors UINT8
27 totalKeyBehaviors UINT8
28 firstKeyExplicit KEYCODE
29 nKeyExplicit UINT8
30 totalKeyExplicit UINT8
31 firstModMapKey KEYCODE
32 nModMapKeys UINT8
33 totalModMapKeys UINT8
34 firstVModMapKey KEYCODE
35 nVModMapKeys UINT8
36 totalVModMapKeys UINT8
38 virtualMods UINT16
# TODO
40 not-yet-supported LISTofCARD8
END
BITMASK namedetailmask
1 keycodes
2 geometry
4 symbols
8 phys_symbols
16 type
32 compat
64 key_type_names
128 key_type_level_names
256 indicators
512 key_names
1024 key_aliases
2048 vmods
4096 groups
8192 radio_groups
END
REQUEST GetNames
4 deviceSpec DEVICESPEC
8 which BITMASK32 namedetailmask
END
RESPONSE GetNames
1 deviceID UINT8
8 which BITMASK32 namedetailmask
12 minKeyCode KEYCODE
13 maxKeyCode KEYCODE
14 nTypes UINT8
15 groupNames UINT8
16 virtualMods UINT16
18 firstKey KEYCODE
19 nKeys UINT8
20 indicators CARD32
24 nRadioGroups UINT8
25 nKeyAliases UINT8
26 nKTLevels UINT16
# TODO
32 valueList LISTofCARD8
END
CONSTANTS LEDCLASSSPEC
0 KbdFeedbackClass
4 LedFeedbackClass
0x0300 DfltXIClass
0x0500 AllXIClasses
0xff00 XINone
END
REQUEST GetNamedIndicator
4 deviceSpec DEVICESPEC
6 ledClass ENUM16 LEDCLASSSPEC
8 ledID IDSPEC
12 indicator ATOM
END
RESPONSE GetNamedIndicator
1 deviceID UINT8
8 indicator ATOM
12 found BOOL
13 on BOOL
14 realIndicator BOOL
15 ndx UINT8
16 flags CARD8
17 whichGroups CARD8
18 groups CARD8
19 whichMods CARD8
20 mods CARD8
21 realMods CARD8
22 virtualMods CARD16
24 ctrls CARD32
28 supported BOOL
END
EVENT XkbEvent
# all events packaged into one? WTF?
1 type UINT8
4 time TIMESTAMP
8 device CARD8
# TODO:
9 not-yet-supported LISTofCARD8
END
EOF