Commit ef88c7efabf98ea1fcee29e026f96b3f31b94521

Daniel Stone 2012-04-03T15:14:16

Rename xkb_desc to xkb_keymap struct xkb_desc was just a hangover from the old XkbDescRec, which isn't a very descriptive name. Signed-off-by: Daniel Stone <daniel@fooishbar.org>

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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
diff --git a/include/xkbcommon/xkbcommon.h b/include/xkbcommon/xkbcommon.h
index 4955cd7..65b49fe 100644
--- a/include/xkbcommon/xkbcommon.h
+++ b/include/xkbcommon/xkbcommon.h
@@ -144,7 +144,7 @@ struct xkb_context;
  * Opaque keymap object; may only be created, accessed, manipulated and
  * destroyed through the xkb_state_*() API.
  */
-struct xkb_desc;
+struct xkb_keymap;
 
 /**
  * Opaque state object; may only be created, accessed, manipulated and
@@ -272,7 +272,7 @@ xkb_context_unref(struct xkb_context *context);
  * You should almost certainly be using this and nothing else to create
  * keymaps.
  */
-_X_EXPORT extern struct xkb_desc *
+_X_EXPORT extern struct xkb_keymap *
 xkb_map_new_from_names(struct xkb_context *context,
                        const struct xkb_rule_names *names);
 
@@ -286,7 +286,7 @@ xkb_map_new_from_names(struct xkb_context *context,
  *
  * Geometry will be ignored since xkbcommon does not support it in any way.
  */
-_X_EXPORT extern struct xkb_desc *
+_X_EXPORT extern struct xkb_keymap *
 xkb_map_new_from_kccgst(struct xkb_context *context,
                         const struct xkb_component_names *kccgst);
 
@@ -299,7 +299,7 @@ enum xkb_keymap_format {
  * Creates an XKB keymap from a full text XKB keymap passed into the
  * file descriptor.
  */
-_X_EXPORT extern struct xkb_desc *
+_X_EXPORT extern struct xkb_keymap *
 xkb_map_new_from_fd(struct xkb_context *context,
                     int fd, enum xkb_keymap_format format);
 
@@ -307,7 +307,7 @@ xkb_map_new_from_fd(struct xkb_context *context,
  * Creates an XKB keymap from a full text XKB keymap serialised into one
  * enormous string.
  */
-_X_EXPORT extern struct xkb_desc *
+_X_EXPORT extern struct xkb_keymap *
 xkb_map_new_from_string(struct xkb_context *context,
                         const char *string,
                         enum xkb_keymap_format format);
@@ -316,13 +316,13 @@ xkb_map_new_from_string(struct xkb_context *context,
  * Takes a new reference on a keymap.
  */
 _X_EXPORT extern void
-xkb_map_ref(struct xkb_desc *xkb);
+xkb_map_ref(struct xkb_keymap *xkb);
 
 /**
  * Releases a reference on a keymap.
  */
 _X_EXPORT extern void
-xkb_map_unref(struct xkb_desc *xkb);
+xkb_map_unref(struct xkb_keymap *xkb);
 
 /** @} */
 
@@ -338,61 +338,61 @@ xkb_map_unref(struct xkb_desc *xkb);
  * Returns the number of modifiers active in the keymap.
  */
 _X_EXPORT xkb_mod_index_t
-xkb_map_num_mods(struct xkb_desc *xkb);
+xkb_map_num_mods(struct xkb_keymap *xkb);
 
 /**
  * Returns the name of the modifier specified by 'idx', or NULL if invalid.
  */
 _X_EXPORT const char *
-xkb_map_mod_get_name(struct xkb_desc *xkb, xkb_mod_index_t idx);
+xkb_map_mod_get_name(struct xkb_keymap *xkb, xkb_mod_index_t idx);
 
 /**
  * Returns the index of the modifier specified by 'name', or XKB_MOD_INVALID.
  */
 _X_EXPORT xkb_mod_index_t
-xkb_map_mod_get_index(struct xkb_desc *xkb, const char *name);
+xkb_map_mod_get_index(struct xkb_keymap *xkb, const char *name);
 
 /**
  * Returns the number of groups active in the keymap.
  */
 _X_EXPORT xkb_group_index_t
-xkb_map_num_groups(struct xkb_desc *xkb);
+xkb_map_num_groups(struct xkb_keymap *xkb);
 
 /**
  * Returns the name of the group specified by 'idx', or NULL if invalid.
  */
 _X_EXPORT const char *
-xkb_map_group_get_name(struct xkb_desc *xkb, xkb_group_index_t idx);
+xkb_map_group_get_name(struct xkb_keymap *xkb, xkb_group_index_t idx);
 
 /**
  * Returns the index of the group specified by 'name', or XKB_GROUP_INVALID.
  */
 _X_EXPORT xkb_group_index_t
-xkb_map_group_get_index(struct xkb_desc *xkb, const char *name);
+xkb_map_group_get_index(struct xkb_keymap *xkb, const char *name);
 
 /**
  * Returns the number of groups active for the specified key.
  */
 _X_EXPORT xkb_group_index_t
-xkb_key_num_groups(struct xkb_desc *xkb, xkb_keycode_t key);
+xkb_key_num_groups(struct xkb_keymap *xkb, xkb_keycode_t key);
 
 /**
  * Returns the number of LEDs in the given map.
  */
 _X_EXPORT xkb_led_index_t
-xkb_map_num_leds(struct xkb_desc *xkb);
+xkb_map_num_leds(struct xkb_keymap *xkb);
 
 /**
  * Returns the name of the LED specified by 'idx', or NULL if invalid.
  */
 _X_EXPORT const char *
-xkb_map_led_get_name(struct xkb_desc *xkb, xkb_led_index_t idx);
+xkb_map_led_get_name(struct xkb_keymap *xkb, xkb_led_index_t idx);
 
 /**
  * Returns the index of the LED specified by 'name', or XKB_LED_INVALID.
  */
 _X_EXPORT xkb_led_index_t
-xkb_map_led_get_index(struct xkb_desc *xkb, const char *name);
+xkb_map_led_get_index(struct xkb_keymap *xkb, const char *name);
 
 /** @} */
 
@@ -409,7 +409,7 @@ xkb_map_led_get_index(struct xkb_desc *xkb, const char *name);
  * failure.
  */
 _X_EXPORT struct xkb_state *
-xkb_state_new(struct xkb_desc *xkb);
+xkb_state_new(struct xkb_keymap *xkb);
 
 /**
  * Adds a reference to a state object, so it will not be freed until unref.
diff --git a/src/XKBcommonint.h b/src/XKBcommonint.h
index 726f859..5d63ce9 100644
--- a/src/XKBcommonint.h
+++ b/src/XKBcommonint.h
@@ -391,7 +391,7 @@ struct xkb_controls {
 };
 
 /* Common keyboard description structure */
-struct xkb_desc {
+struct xkb_keymap {
     struct xkb_context  *context;
 
     unsigned int        refcnt;
@@ -456,7 +456,7 @@ struct xkb_state {
         int refcnt;
         void *filters;
         int num_filters;
-        struct xkb_desc *xkb;
+        struct xkb_keymap *xkb;
 };
 
 #define	XkbStateFieldFromRec(s)	XkbBuildCoreState((s)->lookup_mods,(s)->group)
diff --git a/src/alloc.c b/src/alloc.c
index 3685d9a..52d7af2 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -33,7 +33,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include <X11/extensions/XKB.h>
 
 int
-XkbcAllocCompatMap(struct xkb_desc * xkb, unsigned which, unsigned nSI)
+XkbcAllocCompatMap(struct xkb_keymap * xkb, unsigned which, unsigned nSI)
 {
     struct xkb_compat_map * compat;
     struct xkb_sym_interpret *prev_interpret;
@@ -84,7 +84,7 @@ XkbcAllocCompatMap(struct xkb_desc * xkb, unsigned which, unsigned nSI)
 
 
 static void
-XkbcFreeCompatMap(struct xkb_desc * xkb)
+XkbcFreeCompatMap(struct xkb_keymap * xkb)
 {
     struct xkb_compat_map * compat;
 
@@ -99,7 +99,7 @@ XkbcFreeCompatMap(struct xkb_desc * xkb)
 }
 
 int
-XkbcAllocNames(struct xkb_desc * xkb, unsigned which, unsigned nTotalAliases)
+XkbcAllocNames(struct xkb_keymap * xkb, unsigned which, unsigned nTotalAliases)
 {
     struct xkb_names * names;
 
@@ -163,7 +163,7 @@ XkbcAllocNames(struct xkb_desc * xkb, unsigned which, unsigned nTotalAliases)
 }
 
 static void
-XkbcFreeNames(struct xkb_desc * xkb)
+XkbcFreeNames(struct xkb_keymap * xkb)
 {
     struct xkb_names * names;
     struct xkb_client_map * map;
@@ -201,7 +201,7 @@ XkbcFreeNames(struct xkb_desc * xkb)
 }
 
 int
-XkbcAllocControls(struct xkb_desc * xkb, unsigned which)
+XkbcAllocControls(struct xkb_keymap * xkb, unsigned which)
 {
     if (!xkb)
         return BadMatch;
@@ -223,7 +223,7 @@ XkbcAllocControls(struct xkb_desc * xkb, unsigned which)
 }
 
 static void
-XkbcFreeControls(struct xkb_desc * xkb)
+XkbcFreeControls(struct xkb_keymap * xkb)
 {
     if (xkb && xkb->ctrls) {
         free(xkb->ctrls->per_key_repeat);
@@ -233,7 +233,7 @@ XkbcFreeControls(struct xkb_desc * xkb)
 }
 
 int
-XkbcAllocIndicatorMaps(struct xkb_desc * xkb)
+XkbcAllocIndicatorMaps(struct xkb_keymap * xkb)
 {
     if (!xkb)
         return BadMatch;
@@ -248,7 +248,7 @@ XkbcAllocIndicatorMaps(struct xkb_desc * xkb)
 }
 
 static void
-XkbcFreeIndicatorMaps(struct xkb_desc * xkb)
+XkbcFreeIndicatorMaps(struct xkb_keymap * xkb)
 {
     if (xkb) {
         free(xkb->indicators);
@@ -256,12 +256,12 @@ XkbcFreeIndicatorMaps(struct xkb_desc * xkb)
     }
 }
 
-struct xkb_desc *
+struct xkb_keymap *
 XkbcAllocKeyboard(struct xkb_context *context)
 {
-    struct xkb_desc *xkb;
+    struct xkb_keymap *xkb;
 
-    xkb = uTypedCalloc(1, struct xkb_desc);
+    xkb = uTypedCalloc(1, struct xkb_keymap);
     if (!xkb)
         return NULL;
 
@@ -273,7 +273,7 @@ XkbcAllocKeyboard(struct xkb_context *context)
 }
 
 void
-XkbcFreeKeyboard(struct xkb_desc * xkb)
+XkbcFreeKeyboard(struct xkb_keymap * xkb)
 {
     if (!xkb)
         return;
diff --git a/src/malloc.c b/src/malloc.c
index ba16703..314f80c 100644
--- a/src/malloc.c
+++ b/src/malloc.c
@@ -30,7 +30,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include "XKBcommonint.h"
 
 int
-XkbcAllocClientMap(struct xkb_desc * xkb, unsigned which, unsigned nTotalTypes)
+XkbcAllocClientMap(struct xkb_keymap * xkb, unsigned which, unsigned nTotalTypes)
 {
     struct xkb_client_map * map;
 
@@ -101,7 +101,7 @@ XkbcAllocClientMap(struct xkb_desc * xkb, unsigned which, unsigned nTotalTypes)
 }
 
 int
-XkbcAllocServerMap(struct xkb_desc * xkb, unsigned which, unsigned nNewActions)
+XkbcAllocServerMap(struct xkb_keymap * xkb, unsigned which, unsigned nNewActions)
 {
     unsigned i;
     struct xkb_server_map * map;
@@ -241,7 +241,7 @@ XkbcCopyKeyType(struct xkb_key_type * from, struct xkb_key_type * into)
 }
 
 Bool
-XkbcResizeKeySyms(struct xkb_desc * xkb, xkb_keycode_t key,
+XkbcResizeKeySyms(struct xkb_keymap * xkb, xkb_keycode_t key,
                   unsigned int needed)
 {
     if (xkb->map->key_sym_map[key].size_syms >= needed)
@@ -262,7 +262,7 @@ XkbcResizeKeySyms(struct xkb_desc * xkb, xkb_keycode_t key,
 }
 
 union xkb_action *
-XkbcResizeKeyActions(struct xkb_desc * xkb, xkb_keycode_t key, uint32_t needed)
+XkbcResizeKeyActions(struct xkb_keymap * xkb, xkb_keycode_t key, uint32_t needed)
 {
     xkb_keycode_t i, nActs;
     union xkb_action *newActs;
@@ -322,7 +322,7 @@ XkbcResizeKeyActions(struct xkb_desc * xkb, xkb_keycode_t key, uint32_t needed)
 }
 
 void
-XkbcFreeClientMap(struct xkb_desc * xkb)
+XkbcFreeClientMap(struct xkb_keymap * xkb)
 {
     struct xkb_client_map * map;
     struct xkb_key_type * type;
@@ -360,7 +360,7 @@ XkbcFreeClientMap(struct xkb_desc * xkb)
 }
 
 void
-XkbcFreeServerMap(struct xkb_desc * xkb)
+XkbcFreeServerMap(struct xkb_keymap * xkb)
 {
     struct xkb_server_map * map;
 
diff --git a/src/map.c b/src/map.c
index 93a6214..8bb115e 100644
--- a/src/map.c
+++ b/src/map.c
@@ -62,7 +62,7 @@
  * Returns the total number of modifiers active in the keymap.
  */
 xkb_mod_index_t
-xkb_map_num_mods(struct xkb_desc *xkb)
+xkb_map_num_mods(struct xkb_keymap *xkb)
 {
     xkb_mod_index_t i;
 
@@ -79,7 +79,7 @@ xkb_map_num_mods(struct xkb_desc *xkb)
  * Return the name for a given modifier.
  */
 const char *
-xkb_map_mod_get_name(struct xkb_desc *xkb, xkb_mod_index_t idx)
+xkb_map_mod_get_name(struct xkb_keymap *xkb, xkb_mod_index_t idx)
 {
     if (idx >= xkb_map_num_mods(xkb))
         return NULL;
@@ -114,7 +114,7 @@ xkb_map_mod_get_name(struct xkb_desc *xkb, xkb_mod_index_t idx)
  * Returns the index for a named modifier.
  */
 xkb_mod_index_t
-xkb_map_mod_get_index(struct xkb_desc *xkb, const char *name)
+xkb_map_mod_get_index(struct xkb_keymap *xkb, const char *name)
 {
     xkb_mod_index_t i;
 
@@ -147,7 +147,7 @@ xkb_map_mod_get_index(struct xkb_desc *xkb, const char *name)
  * Return the total number of active groups in the keymap.
  */
 xkb_group_index_t
-xkb_map_num_groups(struct xkb_desc *xkb)
+xkb_map_num_groups(struct xkb_keymap *xkb)
 {
     xkb_group_index_t ret = 0;
     xkb_group_index_t i;
@@ -163,7 +163,7 @@ xkb_map_num_groups(struct xkb_desc *xkb)
  * Returns the name for a given group.
  */
 const char *
-xkb_map_group_get_name(struct xkb_desc *xkb, xkb_group_index_t idx)
+xkb_map_group_get_name(struct xkb_keymap *xkb, xkb_group_index_t idx)
 {
     if (idx >= xkb_map_num_groups(xkb))
         return NULL;
@@ -175,7 +175,7 @@ xkb_map_group_get_name(struct xkb_desc *xkb, xkb_group_index_t idx)
  * Returns the index for a named group.
  */
 xkb_group_index_t
-xkb_map_group_get_index(struct xkb_desc *xkb, const char *name)
+xkb_map_group_get_index(struct xkb_keymap *xkb, const char *name)
 {
     xkb_group_index_t num_groups = xkb_map_num_groups(xkb);
     xkb_group_index_t i;
@@ -192,7 +192,7 @@ xkb_map_group_get_index(struct xkb_desc *xkb, const char *name)
  * Returns the number of groups active for a particular key.
  */
 xkb_group_index_t
-xkb_key_num_groups(struct xkb_desc *xkb, xkb_keycode_t key)
+xkb_key_num_groups(struct xkb_keymap *xkb, xkb_keycode_t key)
 {
     return XkbKeyNumGroups(xkb, key);
 }
@@ -201,7 +201,7 @@ xkb_key_num_groups(struct xkb_desc *xkb, xkb_keycode_t key)
  * Return the total number of active LEDs in the keymap.
  */
 xkb_led_index_t
-xkb_map_num_leds(struct xkb_desc *xkb)
+xkb_map_num_leds(struct xkb_keymap *xkb)
 {
     xkb_led_index_t ret = 0;
     xkb_led_index_t i;
@@ -219,7 +219,7 @@ xkb_map_num_leds(struct xkb_desc *xkb)
  * Returns the name for a given group.
  */
 const char *
-xkb_map_led_get_name(struct xkb_desc *xkb, xkb_led_index_t idx)
+xkb_map_led_get_name(struct xkb_keymap *xkb, xkb_led_index_t idx)
 {
     if (idx >= xkb_map_num_leds(xkb))
         return NULL;
@@ -231,7 +231,7 @@ xkb_map_led_get_name(struct xkb_desc *xkb, xkb_led_index_t idx)
  * Returns the index for a named group.
  */
 xkb_group_index_t
-xkb_map_led_get_index(struct xkb_desc *xkb, const char *name)
+xkb_map_led_get_index(struct xkb_keymap *xkb, const char *name)
 {
     xkb_led_index_t num_leds = xkb_map_num_leds(xkb);
     xkb_led_index_t i;
@@ -301,7 +301,7 @@ xkb_key_get_group(struct xkb_state *state, xkb_keycode_t key)
  * As below, but takes an explicit group/level rather than state.
  */
 unsigned int
-xkb_key_get_syms_by_level(struct xkb_desc *xkb, xkb_keycode_t key, unsigned int group,
+xkb_key_get_syms_by_level(struct xkb_keymap *xkb, xkb_keycode_t key, unsigned int group,
                           unsigned int level, xkb_keysym_t **syms_out)
 {
     int num_syms;
@@ -331,7 +331,7 @@ unsigned int
 xkb_key_get_syms(struct xkb_state *state, xkb_keycode_t key,
                  xkb_keysym_t **syms_out)
 {
-    struct xkb_desc *xkb = state->xkb;
+    struct xkb_keymap *xkb = state->xkb;
     int group;
     int level;
 
diff --git a/src/misc.c b/src/misc.c
index fc0582a..f0e4546 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -85,7 +85,7 @@ static struct xkb_key_type canonicalTypes[XkbNumRequiredTypes] = {
 };
 
 int
-XkbcInitCanonicalKeyTypes(struct xkb_desc * xkb, unsigned which, int keypadVMod)
+XkbcInitCanonicalKeyTypes(struct xkb_keymap * xkb, unsigned which, int keypadVMod)
 {
     struct xkb_client_map * map;
     struct xkb_key_type *from, *to;
@@ -142,7 +142,7 @@ XkbcInitCanonicalKeyTypes(struct xkb_desc * xkb, unsigned which, int keypadVMod)
 }
 
 Bool
-XkbcVirtualModsToReal(struct xkb_desc * xkb, unsigned virtual_mask,
+XkbcVirtualModsToReal(struct xkb_keymap * xkb, unsigned virtual_mask,
                       unsigned *mask_rtrn)
 {
     int i, bit;
diff --git a/src/state.c b/src/state.c
index 9dda257..6a9505d 100644
--- a/src/state.c
+++ b/src/state.c
@@ -460,7 +460,7 @@ xkb_filter_apply_all(struct xkb_state *state, xkb_keycode_t key,
 }
 
 struct xkb_state *
-xkb_state_new(struct xkb_desc *xkb)
+xkb_state_new(struct xkb_keymap *xkb)
 {
     struct xkb_state *ret;
 
diff --git a/src/text.c b/src/text.c
index d8f6481..dd755ea 100644
--- a/src/text.c
+++ b/src/text.c
@@ -56,7 +56,7 @@ tbGetBuffer(unsigned int size)
 }
 
 static const char *
-XkbcVModIndexText(struct xkb_desc * xkb, unsigned ndx)
+XkbcVModIndexText(struct xkb_keymap * xkb, unsigned ndx)
 {
     int len;
     char *rtrn;
@@ -84,7 +84,7 @@ XkbcVModIndexText(struct xkb_desc * xkb, unsigned ndx)
 }
 
 const char *
-XkbcVModMaskText(struct xkb_desc * xkb, unsigned modMask, unsigned mask)
+XkbcVModMaskText(struct xkb_keymap * xkb, unsigned modMask, unsigned mask)
 {
     int i, bit, len, rem;
     const char *mm = NULL;
diff --git a/src/xkb.c b/src/xkb.c
index 9ff33bb..1b9f94d 100644
--- a/src/xkb.c
+++ b/src/xkb.c
@@ -96,7 +96,7 @@ xkb_canonicalise_components(struct xkb_component_names * names,
 }
 
 Bool
-XkbcComputeEffectiveMap(struct xkb_desc * xkb, struct xkb_key_type * type,
+XkbcComputeEffectiveMap(struct xkb_keymap * xkb, struct xkb_key_type * type,
                         unsigned char *map_rtrn)
 {
     int i;
diff --git a/src/xkballoc.h b/src/xkballoc.h
index 47deaad..3d445b4 100644
--- a/src/xkballoc.h
+++ b/src/xkballoc.h
@@ -32,48 +32,48 @@ authorization from the authors.
 #include "XKBcommonint.h"
 
 extern int
-XkbcAllocCompatMap(struct xkb_desc * xkb, unsigned which, unsigned nSI);
+XkbcAllocCompatMap(struct xkb_keymap * xkb, unsigned which, unsigned nSI);
 
 extern int
-XkbcAllocNames(struct xkb_desc * xkb, unsigned which, unsigned nTotalAliases);
+XkbcAllocNames(struct xkb_keymap * xkb, unsigned which, unsigned nTotalAliases);
 
 extern int
-XkbcAllocControls(struct xkb_desc * xkb, unsigned which);
+XkbcAllocControls(struct xkb_keymap * xkb, unsigned which);
 
 extern int
-XkbcAllocIndicatorMaps(struct xkb_desc * xkb);
+XkbcAllocIndicatorMaps(struct xkb_keymap * xkb);
 
-extern struct xkb_desc *
+extern struct xkb_keymap *
 XkbcAllocKeyboard(struct xkb_context *context);
 
 extern void
-XkbcFreeKeyboard(struct xkb_desc * xkb);
+XkbcFreeKeyboard(struct xkb_keymap * xkb);
 
 /***====================================================================***/
 
 extern int
-XkbcAllocClientMap(struct xkb_desc * xkb, unsigned which, unsigned nTotalTypes);
+XkbcAllocClientMap(struct xkb_keymap * xkb, unsigned which, unsigned nTotalTypes);
 
 extern int
-XkbcAllocServerMap(struct xkb_desc * xkb, unsigned which, unsigned nNewActions);
+XkbcAllocServerMap(struct xkb_keymap * xkb, unsigned which, unsigned nNewActions);
 
 extern int
 XkbcCopyKeyType(struct xkb_key_type * from, struct xkb_key_type *into);
 
 extern Bool
-XkbcResizeKeySyms(struct xkb_desc * xkb, xkb_keycode_t key, uint32_t needed);
+XkbcResizeKeySyms(struct xkb_keymap * xkb, xkb_keycode_t key, uint32_t needed);
 
 extern union xkb_action *
-XkbcResizeKeyActions(struct xkb_desc * xkb, xkb_keycode_t key, uint32_t needed);
+XkbcResizeKeyActions(struct xkb_keymap * xkb, xkb_keycode_t key, uint32_t needed);
 
 extern void
-XkbcFreeClientMap(struct xkb_desc * xkb);
+XkbcFreeClientMap(struct xkb_keymap * xkb);
 
 extern void
-XkbcFreeServerMap(struct xkb_desc * xkb);
+XkbcFreeServerMap(struct xkb_keymap * xkb);
 
 extern unsigned int
-xkb_key_get_syms_by_level(struct xkb_desc *xkb, xkb_keycode_t key,
+xkb_key_get_syms_by_level(struct xkb_keymap *xkb, xkb_keycode_t key,
                           unsigned int group, unsigned int level,
                           xkb_keysym_t **syms_out);
 
diff --git a/src/xkbcomp/action.c b/src/xkbcomp/action.c
index 7160ebf..3764310 100644
--- a/src/xkbcomp/action.c
+++ b/src/xkbcomp/action.c
@@ -212,7 +212,7 @@ ReportNotFound(unsigned action, unsigned field, const char *what,
 }
 
 static Bool
-HandleNoAction(struct xkb_desc * xkb,
+HandleNoAction(struct xkb_keymap * xkb,
                struct xkb_any_action * action,
                unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -242,7 +242,7 @@ CheckLatchLockFlags(unsigned action,
 }
 
 static Bool
-CheckModifierField(struct xkb_desc * xkb,
+CheckModifierField(struct xkb_keymap * xkb,
                    unsigned action,
                    ExprDef * value,
                    unsigned *flags_inout, unsigned *mods_rtrn)
@@ -270,7 +270,7 @@ CheckModifierField(struct xkb_desc * xkb,
 }
 
 static Bool
-HandleSetLatchMods(struct xkb_desc * xkb,
+HandleSetLatchMods(struct xkb_keymap * xkb,
                    struct xkb_any_action * action,
                    unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -315,7 +315,7 @@ HandleSetLatchMods(struct xkb_desc * xkb,
 }
 
 static Bool
-HandleLockMods(struct xkb_desc * xkb,
+HandleLockMods(struct xkb_keymap * xkb,
                struct xkb_any_action * action,
                unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -371,7 +371,7 @@ CheckGroupField(unsigned action,
 }
 
 static Bool
-HandleSetLatchGroup(struct xkb_desc * xkb,
+HandleSetLatchGroup(struct xkb_keymap * xkb,
                     struct xkb_any_action * action,
                     unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -416,7 +416,7 @@ HandleSetLatchGroup(struct xkb_desc * xkb,
 }
 
 static Bool
-HandleLockGroup(struct xkb_desc * xkb,
+HandleLockGroup(struct xkb_keymap * xkb,
                 struct xkb_any_action * action,
                 unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -442,7 +442,7 @@ HandleLockGroup(struct xkb_desc * xkb,
 }
 
 static Bool
-HandleMovePtr(struct xkb_desc * xkb,
+HandleMovePtr(struct xkb_keymap * xkb,
               struct xkb_any_action * action,
               unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -497,7 +497,7 @@ static const LookupEntry lockWhich[] = {
 };
 
 static Bool
-HandlePtrBtn(struct xkb_desc * xkb,
+HandlePtrBtn(struct xkb_keymap * xkb,
              struct xkb_any_action * action,
              unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -557,7 +557,7 @@ static const LookupEntry ptrDflts[] = {
 };
 
 static Bool
-HandleSetPtrDflt(struct xkb_desc * xkb,
+HandleSetPtrDflt(struct xkb_keymap * xkb,
                  struct xkb_any_action * action,
                  unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -629,7 +629,7 @@ static const LookupEntry isoNames[] = {
 };
 
 static Bool
-HandleISOLock(struct xkb_desc * xkb,
+HandleISOLock(struct xkb_keymap * xkb,
               struct xkb_any_action * action,
               unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -676,7 +676,7 @@ HandleISOLock(struct xkb_desc * xkb,
 }
 
 static Bool
-HandleSwitchScreen(struct xkb_desc * xkb,
+HandleSwitchScreen(struct xkb_keymap * xkb,
                    struct xkb_any_action * action,
                    unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -751,7 +751,7 @@ const LookupEntry ctrlNames[] = {
 };
 
 static Bool
-HandleSetLockControls(struct xkb_desc * xkb,
+HandleSetLockControls(struct xkb_keymap * xkb,
                       struct xkb_any_action * action,
                       unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -782,7 +782,7 @@ static const LookupEntry evNames[] = {
 };
 
 static Bool
-HandleActionMessage(struct xkb_desc * xkb,
+HandleActionMessage(struct xkb_keymap * xkb,
                     struct xkb_any_action * action,
                     unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -860,7 +860,7 @@ HandleActionMessage(struct xkb_desc * xkb,
 }
 
 static Bool
-HandleRedirectKey(struct xkb_desc * xkb,
+HandleRedirectKey(struct xkb_keymap * xkb,
                   struct xkb_any_action * action,
                   unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -912,7 +912,7 @@ HandleRedirectKey(struct xkb_desc * xkb,
 }
 
 static Bool
-HandleDeviceBtn(struct xkb_desc * xkb,
+HandleDeviceBtn(struct xkb_keymap * xkb,
                 struct xkb_any_action * action,
                 unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -981,7 +981,7 @@ HandleDeviceBtn(struct xkb_desc * xkb,
 }
 
 static Bool
-HandleDeviceValuator(struct xkb_desc * xkb,
+HandleDeviceValuator(struct xkb_keymap * xkb,
                      struct xkb_any_action * action,
                      unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -996,7 +996,7 @@ HandleDeviceValuator(struct xkb_desc * xkb,
 }
 
 static Bool
-HandlePrivate(struct xkb_desc * xkb,
+HandlePrivate(struct xkb_keymap * xkb,
               struct xkb_any_action * action,
               unsigned field, ExprDef * array_ndx, ExprDef * value)
 {
@@ -1065,7 +1065,7 @@ HandlePrivate(struct xkb_desc * xkb,
     return ReportIllegal(PrivateAction, field);
 }
 
-typedef Bool(*actionHandler) (struct xkb_desc * /* xkb */ ,
+typedef Bool(*actionHandler) (struct xkb_keymap * /* xkb */ ,
                               struct xkb_any_action * /* action */ ,
                               unsigned /* field */ ,
                               ExprDef * /* array_ndx */ ,
@@ -1119,7 +1119,7 @@ ActionsInit(void);
 
 int
 HandleActionDef(ExprDef * def,
-                struct xkb_desc * xkb,
+                struct xkb_keymap * xkb,
                 struct xkb_any_action * action, unsigned mergeMode, ActionInfo * info)
 {
     ExprDef *arg;
@@ -1226,7 +1226,7 @@ HandleActionDef(ExprDef * def,
 /***====================================================================***/
 
 int
-SetActionField(struct xkb_desc * xkb,
+SetActionField(struct xkb_keymap * xkb,
                char *elem,
                char *field,
                ExprDef * array_ndx, ExprDef * value, ActionInfo ** info_rtrn)
diff --git a/src/xkbcomp/action.h b/src/xkbcomp/action.h
index 7dd7fdc..5d4191c 100644
--- a/src/xkbcomp/action.h
+++ b/src/xkbcomp/action.h
@@ -65,13 +65,13 @@ typedef struct _ActionInfo
 } ActionInfo;
 
 extern int HandleActionDef(ExprDef * /* def */ ,
-                           struct xkb_desc * /* xkb */ ,
+                           struct xkb_keymap * /* xkb */ ,
                            struct xkb_any_action * /* action */ ,
                            unsigned /* mergeMode */ ,
                            ActionInfo * /* info */
     );
 
-extern int SetActionField(struct xkb_desc * /* xkb */ ,
+extern int SetActionField(struct xkb_keymap * /* xkb */ ,
                           char * /* elem */ ,
                           char * /* field */ ,
                           ExprDef * /* index */ ,
diff --git a/src/xkbcomp/alias.c b/src/xkbcomp/alias.c
index 7ab15aa..fc11a6b 100644
--- a/src/xkbcomp/alias.c
+++ b/src/xkbcomp/alias.c
@@ -151,7 +151,7 @@ MergeAliases(AliasInfo ** into, AliasInfo ** merge, unsigned how_merge)
 }
 
 int
-ApplyAliases(struct xkb_desc * xkb, AliasInfo ** info_in)
+ApplyAliases(struct xkb_keymap * xkb, AliasInfo ** info_in)
 {
     int i;
     struct xkb_key_alias *old, *a;
diff --git a/src/xkbcomp/alias.h b/src/xkbcomp/alias.h
index 40b116e..9883852 100644
--- a/src/xkbcomp/alias.h
+++ b/src/xkbcomp/alias.h
@@ -48,7 +48,7 @@ extern Bool MergeAliases(AliasInfo ** /* into */ ,
                          unsigned       /* how_merge */
     );
 
-extern int ApplyAliases(struct xkb_desc * /* xkb */ ,
+extern int ApplyAliases(struct xkb_keymap * /* xkb */ ,
                         AliasInfo **    /* info */
     );
 
diff --git a/src/xkbcomp/compat.c b/src/xkbcomp/compat.c
index 5db2950..9157981 100644
--- a/src/xkbcomp/compat.c
+++ b/src/xkbcomp/compat.c
@@ -68,7 +68,7 @@ typedef struct _CompatInfo
     LEDInfo *leds;
     VModInfo vmods;
     ActionInfo *act;
-    struct xkb_desc * xkb;
+    struct xkb_keymap * xkb;
 } CompatInfo;
 
 /***====================================================================***/
@@ -100,7 +100,7 @@ siText(SymInterpInfo * si, CompatInfo * info)
 }
 
 static void
-InitCompatInfo(CompatInfo * info, struct xkb_desc * xkb)
+InitCompatInfo(CompatInfo * info, struct xkb_keymap * xkb)
 {
     unsigned int i;
 
@@ -130,7 +130,7 @@ InitCompatInfo(CompatInfo * info, struct xkb_desc * xkb)
 }
 
 static void
-ClearCompatInfo(CompatInfo * info, struct xkb_desc * xkb)
+ClearCompatInfo(CompatInfo * info, struct xkb_keymap * xkb)
 {
     unsigned int i;
     ActionInfo *next;
@@ -389,14 +389,14 @@ MergeIncludedCompatMaps(CompatInfo * into, CompatInfo * from, unsigned merge)
 }
 
 typedef void (*FileHandler) (XkbFile * /* rtrn */ ,
-                             struct xkb_desc * /* xkb */ ,
+                             struct xkb_keymap * /* xkb */ ,
                              unsigned /* merge */ ,
                              CompatInfo *       /* info */
     );
 
 static Bool
 HandleIncludeCompatMap(IncludeStmt * stmt,
-                       struct xkb_desc * xkb, CompatInfo * info, FileHandler hndlr)
+                       struct xkb_keymap * xkb, CompatInfo * info, FileHandler hndlr)
 {
     unsigned newMerge;
     XkbFile *rtrn;
@@ -496,7 +496,7 @@ static const LookupEntry useModMapValues[] = {
 
 static int
 SetInterpField(SymInterpInfo * si,
-               struct xkb_desc * xkb,
+               struct xkb_keymap * xkb,
                char *field,
                ExprDef * arrayNdx, ExprDef * value, CompatInfo * info)
 {
@@ -583,7 +583,7 @@ SetInterpField(SymInterpInfo * si,
 }
 
 static int
-HandleInterpVar(VarDef * stmt, struct xkb_desc * xkb, CompatInfo * info)
+HandleInterpVar(VarDef * stmt, struct xkb_keymap * xkb, CompatInfo * info)
 {
     ExprResult elem, field;
     ExprDef *ndx;
@@ -606,7 +606,7 @@ HandleInterpVar(VarDef * stmt, struct xkb_desc * xkb, CompatInfo * info)
 }
 
 static int
-HandleInterpBody(VarDef * def, struct xkb_desc * xkb, SymInterpInfo * si,
+HandleInterpBody(VarDef * def, struct xkb_keymap * xkb, SymInterpInfo * si,
                  CompatInfo * info)
 {
     int ok = 1;
@@ -631,7 +631,7 @@ HandleInterpBody(VarDef * def, struct xkb_desc * xkb, SymInterpInfo * si,
 }
 
 static int
-HandleInterpDef(InterpDef * def, struct xkb_desc * xkb, unsigned merge,
+HandleInterpDef(InterpDef * def, struct xkb_keymap * xkb, unsigned merge,
                 CompatInfo * info)
 {
     unsigned pred, mods;
@@ -672,7 +672,7 @@ HandleInterpDef(InterpDef * def, struct xkb_desc * xkb, unsigned merge,
 
 static int
 HandleGroupCompatDef(GroupCompatDef * def,
-                     struct xkb_desc * xkb, unsigned merge, CompatInfo * info)
+                     struct xkb_keymap * xkb, unsigned merge, CompatInfo * info)
 {
     ExprResult val;
     GroupCompatInfo tmp;
@@ -704,7 +704,7 @@ HandleGroupCompatDef(GroupCompatDef * def,
 
 static void
 HandleCompatMapFile(XkbFile * file,
-                    struct xkb_desc * xkb, unsigned merge, CompatInfo * info)
+                    struct xkb_keymap * xkb, unsigned merge, CompatInfo * info)
 {
     ParseCommon *stmt;
 
@@ -795,7 +795,7 @@ CopyInterps(CompatInfo * info,
 }
 
 Bool
-CompileCompatMap(XkbFile *file, struct xkb_desc * xkb, unsigned merge,
+CompileCompatMap(XkbFile *file, struct xkb_keymap * xkb, unsigned merge,
                  LEDInfoPtr *unboundLEDs)
 {
     int i;
@@ -854,7 +854,7 @@ CompileCompatMap(XkbFile *file, struct xkb_desc * xkb, unsigned merge,
 }
 
 static uint32_t
-VModsToReal(struct xkb_desc *xkb, uint32_t vmodmask)
+VModsToReal(struct xkb_keymap *xkb, uint32_t vmodmask)
 {
     uint32_t ret = 0;
     int i;
@@ -872,7 +872,7 @@ VModsToReal(struct xkb_desc *xkb, uint32_t vmodmask)
 }
 
 static void
-UpdateActionMods(struct xkb_desc *xkb, union xkb_action *act, uint32_t rmodmask)
+UpdateActionMods(struct xkb_keymap *xkb, union xkb_action *act, uint32_t rmodmask)
 {
     switch (act->type) {
     case XkbSA_SetMods:
@@ -900,7 +900,7 @@ UpdateActionMods(struct xkb_desc *xkb, union xkb_action *act, uint32_t rmodmask)
  * generic XKB_KEYSYM_NO_SYMBOL match.
  */
 static struct xkb_sym_interpret *
-FindInterpForKey(struct xkb_desc *xkb, xkb_keycode_t key, uint32_t group, uint32_t level)
+FindInterpForKey(struct xkb_keymap *xkb, xkb_keycode_t key, uint32_t group, uint32_t level)
 {
     struct xkb_sym_interpret *ret = NULL;
     xkb_keysym_t *syms;
@@ -958,7 +958,7 @@ FindInterpForKey(struct xkb_desc *xkb, xkb_keycode_t key, uint32_t group, uint32
 /**
  */
 static Bool
-ApplyInterpsToKey(struct xkb_desc *xkb, xkb_keycode_t key)
+ApplyInterpsToKey(struct xkb_keymap *xkb, xkb_keycode_t key)
 {
 #define INTERP_SIZE (8 * 4)
     struct xkb_sym_interpret *interps[INTERP_SIZE];
@@ -1038,7 +1038,7 @@ ApplyInterpsToKey(struct xkb_desc *xkb, xkb_keycode_t key)
  * other than Shift actually do something ...
  */
 Bool
-UpdateModifiersFromCompat(struct xkb_desc *xkb)
+UpdateModifiersFromCompat(struct xkb_keymap *xkb)
 {
     xkb_keycode_t key;
     int i;
diff --git a/src/xkbcomp/expr.c b/src/xkbcomp/expr.c
index cb155db..d147e89 100644
--- a/src/xkbcomp/expr.c
+++ b/src/xkbcomp/expr.c
@@ -970,7 +970,7 @@ ExprResolveModMask(ExprDef * expr,
 int
 ExprResolveVModMask(ExprDef * expr,
                     ExprResult * val_rtrn,
-                    struct xkb_desc *xkb)
+                    struct xkb_keymap *xkb)
 {
     return ExprResolveMaskLookup(expr, val_rtrn, LookupVModMask, xkb);
 }
diff --git a/src/xkbcomp/expr.h b/src/xkbcomp/expr.h
index 414ff02..7f15f90 100644
--- a/src/xkbcomp/expr.h
+++ b/src/xkbcomp/expr.h
@@ -75,7 +75,7 @@ extern int ExprResolveModMask(ExprDef * /* expr */ ,
 
 extern int ExprResolveVModMask(ExprDef * /* expr */ ,
                                ExprResult * /* val_rtrn */ ,
-                               struct xkb_desc * /* xkb */
+                               struct xkb_keymap * /* xkb */
     );
 
 extern int ExprResolveBoolean(ExprDef * /* expr */ ,
diff --git a/src/xkbcomp/indicators.c b/src/xkbcomp/indicators.c
index 5f00916..83ef2e6 100644
--- a/src/xkbcomp/indicators.c
+++ b/src/xkbcomp/indicators.c
@@ -198,7 +198,7 @@ static const LookupEntry groupNames[] = {
 
 int
 SetIndicatorMapField(LEDInfo * led,
-                     struct xkb_desc * xkb,
+                     struct xkb_keymap * xkb,
                      char *field, ExprDef * arrayNdx, ExprDef * value)
 {
     ExprResult rtrn;
@@ -318,7 +318,7 @@ SetIndicatorMapField(LEDInfo * led,
 
 LEDInfo *
 HandleIndicatorMapDef(IndicatorMapDef * def,
-                      struct xkb_desc * xkb,
+                      struct xkb_keymap * xkb,
                       LEDInfo * dflt, LEDInfo * oldLEDs, unsigned merge)
 {
     LEDInfo led, *rtrn;
@@ -367,7 +367,7 @@ HandleIndicatorMapDef(IndicatorMapDef * def,
 }
 
 Bool
-CopyIndicatorMapDefs(struct xkb_desc * xkb, LEDInfo *leds, LEDInfo **unboundRtrn)
+CopyIndicatorMapDefs(struct xkb_keymap * xkb, LEDInfo *leds, LEDInfo **unboundRtrn)
 {
     LEDInfo *led, *next;
     LEDInfo *unbound, *last;
@@ -437,7 +437,7 @@ CopyIndicatorMapDefs(struct xkb_desc * xkb, LEDInfo *leds, LEDInfo **unboundRtrn
 }
 
 Bool
-BindIndicators(struct xkb_desc * xkb, Bool force, LEDInfo *unbound,
+BindIndicators(struct xkb_keymap * xkb, Bool force, LEDInfo *unbound,
                LEDInfo **unboundRtrn)
 {
     int i;
diff --git a/src/xkbcomp/indicators.h b/src/xkbcomp/indicators.h
index dd0e680..86e6295 100644
--- a/src/xkbcomp/indicators.h
+++ b/src/xkbcomp/indicators.h
@@ -60,24 +60,24 @@ extern LEDInfo *AddIndicatorMap(LEDInfo * /* oldLEDs */ ,
     );
 
 extern int SetIndicatorMapField(LEDInfo * /* led */ ,
-                                struct xkb_desc * /* xkb */ ,
+                                struct xkb_keymap * /* xkb */ ,
                                 char * /* field */ ,
                                 ExprDef * /* arrayNdx */ ,
                                 ExprDef *       /* value */
     );
 
 extern LEDInfo *HandleIndicatorMapDef(IndicatorMapDef * /* stmt */ ,
-                                      struct xkb_desc * /* xkb */ ,
+                                      struct xkb_keymap * /* xkb */ ,
                                       LEDInfo * /* dflt */ ,
                                       LEDInfo * /* oldLEDs */ ,
                                       unsigned  /* mergeMode */
     );
 
 extern Bool
-CopyIndicatorMapDefs(struct xkb_desc * xkb, LEDInfo *leds, LEDInfo **unboundRtrn);
+CopyIndicatorMapDefs(struct xkb_keymap * xkb, LEDInfo *leds, LEDInfo **unboundRtrn);
 
 extern Bool
-BindIndicators(struct xkb_desc * xkb, Bool force, LEDInfo *unbound,
+BindIndicators(struct xkb_keymap * xkb, Bool force, LEDInfo *unbound,
                LEDInfo **unboundRtrn);
 
 #endif /* INDICATORS_H */
diff --git a/src/xkbcomp/keycodes.c b/src/xkbcomp/keycodes.c
index f9ac62c..d5fb660 100644
--- a/src/xkbcomp/keycodes.c
+++ b/src/xkbcomp/keycodes.c
@@ -82,7 +82,7 @@ typedef struct _KeyNamesInfo
 } KeyNamesInfo;
 
 static void HandleKeycodesFile(XkbFile * file,
-                               struct xkb_desc * xkb,
+                               struct xkb_keymap * xkb,
                                unsigned merge,
                                KeyNamesInfo * info);
 
@@ -545,7 +545,7 @@ MergeIncludedKeycodes(KeyNamesInfo * into, KeyNamesInfo * from,
  * @param info Struct to store the key info in.
  */
 static Bool
-HandleIncludeKeycodes(IncludeStmt * stmt, struct xkb_desc * xkb, KeyNamesInfo * info)
+HandleIncludeKeycodes(IncludeStmt * stmt, struct xkb_keymap * xkb, KeyNamesInfo * info)
 {
     unsigned newMerge;
     XkbFile *rtrn;
@@ -804,7 +804,7 @@ HandleIndicatorNameDef(IndicatorNameDef * def,
  */
 static void
 HandleKeycodesFile(XkbFile * file,
-                   struct xkb_desc * xkb, unsigned merge, KeyNamesInfo * info)
+                   struct xkb_keymap * xkb, unsigned merge, KeyNamesInfo * info)
 {
     ParseCommon *stmt;
 
@@ -876,7 +876,7 @@ HandleKeycodesFile(XkbFile * file,
  * @return True on success, False otherwise.
  */
 Bool
-CompileKeycodes(XkbFile *file, struct xkb_desc * xkb, unsigned merge)
+CompileKeycodes(XkbFile *file, struct xkb_keymap * xkb, unsigned merge)
 {
     KeyNamesInfo info; /* contains all the info after parsing */
 
diff --git a/src/xkbcomp/keymap.c b/src/xkbcomp/keymap.c
index 9f7dd2e..65b7ad2 100644
--- a/src/xkbcomp/keymap.c
+++ b/src/xkbcomp/keymap.c
@@ -38,7 +38,7 @@
  * @param file A list of XkbFiles, each denoting one type (e.g.
  * XkmKeyNamesIdx, etc.)
  */
-struct xkb_desc *
+struct xkb_keymap *
 CompileKeymap(struct xkb_context *context, XkbFile *file, unsigned merge)
 {
     unsigned have;
@@ -47,7 +47,7 @@ CompileKeymap(struct xkb_context *context, XkbFile *file, unsigned merge)
     unsigned mainType;
     const char *mainName;
     LEDInfo *unbound = NULL, *next;
-    struct xkb_desc *xkb = XkbcAllocKeyboard(context);
+    struct xkb_keymap *xkb = XkbcAllocKeyboard(context);
     struct {
         XkbFile *keycodes;
         XkbFile *types;
diff --git a/src/xkbcomp/keytypes.c b/src/xkbcomp/keytypes.c
index 3c6628a..ddf174c 100644
--- a/src/xkbcomp/keytypes.c
+++ b/src/xkbcomp/keytypes.c
@@ -106,7 +106,7 @@ static xkb_atom_t tok_KEYPAD;
 /***====================================================================***/
 
 static void
-InitKeyTypesInfo(KeyTypesInfo * info, struct xkb_desc * xkb, KeyTypesInfo * from)
+InitKeyTypesInfo(KeyTypesInfo * info, struct xkb_keymap * xkb, KeyTypesInfo * from)
 {
     tok_ONE_LEVEL = xkb_intern_atom("ONE_LEVEL");
     tok_TWO_LEVEL = xkb_intern_atom("TWO_LEVEL");
@@ -246,7 +246,7 @@ ReportTypeBadWidth(const char *type, int has, int needs)
 }
 
 static Bool
-AddKeyType(struct xkb_desc * xkb, KeyTypesInfo * info, KeyTypeInfo * new)
+AddKeyType(struct xkb_keymap * xkb, KeyTypesInfo * info, KeyTypeInfo * new)
 {
     KeyTypeInfo *old;
 
@@ -332,7 +332,7 @@ AddKeyType(struct xkb_desc * xkb, KeyTypesInfo * info, KeyTypeInfo * new)
 
 static void
 MergeIncludedKeyTypes(KeyTypesInfo * into,
-                      KeyTypesInfo * from, unsigned merge, struct xkb_desc * xkb)
+                      KeyTypesInfo * from, unsigned merge, struct xkb_keymap * xkb)
 {
     KeyTypeInfo *type;
 
@@ -357,14 +357,14 @@ MergeIncludedKeyTypes(KeyTypesInfo * into,
 }
 
 typedef void (*FileHandler) (XkbFile * /* file */ ,
-                             struct xkb_desc * /* xkb */ ,
+                             struct xkb_keymap * /* xkb */ ,
                              unsigned /* merge */ ,
                              KeyTypesInfo *     /* included */
     );
 
 static Bool
 HandleIncludeKeyTypes(IncludeStmt * stmt,
-                      struct xkb_desc * xkb, KeyTypesInfo * info, FileHandler hndlr)
+                      struct xkb_keymap * xkb, KeyTypesInfo * info, FileHandler hndlr)
 {
     unsigned newMerge;
     XkbFile *rtrn;
@@ -512,7 +512,7 @@ NextMapEntry(KeyTypeInfo * type)
 }
 
 static Bool
-AddPreserve(struct xkb_desc * xkb,
+AddPreserve(struct xkb_keymap * xkb,
             KeyTypeInfo * type, PreserveInfo * new, Bool clobber, Bool report)
 {
     PreserveInfo *old;
@@ -584,7 +584,7 @@ AddPreserve(struct xkb_desc * xkb,
  * @param report True if a warning is to be printed on.
  */
 static Bool
-AddMapEntry(struct xkb_desc * xkb,
+AddMapEntry(struct xkb_keymap * xkb,
             KeyTypeInfo * type,
             struct xkb_kt_map_entry * new, Bool clobber, Bool report)
 {
@@ -638,7 +638,7 @@ AddMapEntry(struct xkb_desc * xkb,
 
 static Bool
 SetMapEntry(KeyTypeInfo * type,
-            struct xkb_desc * xkb, ExprDef * arrayNdx, ExprDef * value)
+            struct xkb_keymap * xkb, ExprDef * arrayNdx, ExprDef * value)
 {
     ExprResult rtrn;
     struct xkb_kt_map_entry entry;
@@ -676,7 +676,7 @@ SetMapEntry(KeyTypeInfo * type,
 
 static Bool
 SetPreserve(KeyTypeInfo * type,
-            struct xkb_desc * xkb, ExprDef * arrayNdx, ExprDef * value)
+            struct xkb_keymap * xkb, ExprDef * arrayNdx, ExprDef * value)
 {
     ExprResult rtrn;
     PreserveInfo new;
@@ -816,7 +816,7 @@ SetLevelName(KeyTypeInfo * type, ExprDef * arrayNdx, ExprDef * value)
  */
 static Bool
 SetKeyTypeField(KeyTypeInfo * type,
-                struct xkb_desc * xkb,
+                struct xkb_keymap * xkb,
                 char *field,
                 ExprDef * arrayNdx, ExprDef * value, KeyTypesInfo * info)
 {
@@ -874,7 +874,7 @@ SetKeyTypeField(KeyTypeInfo * type,
 }
 
 static Bool
-HandleKeyTypeVar(VarDef * stmt, struct xkb_desc * xkb, KeyTypesInfo * info)
+HandleKeyTypeVar(VarDef * stmt, struct xkb_keymap * xkb, KeyTypesInfo * info)
 {
     ExprResult elem, field;
     ExprDef *arrayNdx;
@@ -900,7 +900,7 @@ HandleKeyTypeVar(VarDef * stmt, struct xkb_desc * xkb, KeyTypesInfo * info)
 
 static int
 HandleKeyTypeBody(VarDef * def,
-                  struct xkb_desc * xkb, KeyTypeInfo * type, KeyTypesInfo * info)
+                  struct xkb_keymap * xkb, KeyTypeInfo * type, KeyTypesInfo * info)
 {
     int ok = 1;
     ExprResult tmp, field;
@@ -929,7 +929,7 @@ HandleKeyTypeBody(VarDef * def,
  */
 static int
 HandleKeyTypeDef(KeyTypeDef * def,
-                 struct xkb_desc * xkb, unsigned merge, KeyTypesInfo * info)
+                 struct xkb_keymap * xkb, unsigned merge, KeyTypesInfo * info)
 {
     unsigned int i;
     KeyTypeInfo type;
@@ -1009,7 +1009,7 @@ HandleKeyTypeDef(KeyTypeDef * def,
  */
 static void
 HandleKeyTypesFile(XkbFile * file,
-                   struct xkb_desc * xkb, unsigned merge, KeyTypesInfo * info)
+                   struct xkb_keymap * xkb, unsigned merge, KeyTypesInfo * info)
 {
     ParseCommon *stmt;
 
@@ -1070,7 +1070,7 @@ HandleKeyTypesFile(XkbFile * file,
 }
 
 static Bool
-CopyDefToKeyType(struct xkb_desc * xkb, struct xkb_key_type * type, KeyTypeInfo * def)
+CopyDefToKeyType(struct xkb_keymap * xkb, struct xkb_key_type * type, KeyTypeInfo * def)
 {
     unsigned int i;
     PreserveInfo *pre;
@@ -1143,7 +1143,7 @@ CopyDefToKeyType(struct xkb_desc * xkb, struct xkb_key_type * type, KeyTypeInfo 
 }
 
 Bool
-CompileKeyTypes(XkbFile *file, struct xkb_desc * xkb, unsigned merge)
+CompileKeyTypes(XkbFile *file, struct xkb_keymap * xkb, unsigned merge)
 {
     KeyTypesInfo info;
 
diff --git a/src/xkbcomp/misc.c b/src/xkbcomp/misc.c
index 7bb05a5..f48bcdc 100644
--- a/src/xkbcomp/misc.c
+++ b/src/xkbcomp/misc.c
@@ -239,7 +239,7 @@ typedef struct _KeyNameDesc
  * @return True if found, False otherwise.
  */
 Bool
-FindNamedKey(struct xkb_desc * xkb,
+FindNamedKey(struct xkb_keymap * xkb,
              unsigned long name,
              xkb_keycode_t *kc_rtrn,
              Bool use_aliases, Bool create, xkb_keycode_t start_from)
@@ -307,7 +307,7 @@ FindNamedKey(struct xkb_desc * xkb,
 }
 
 Bool
-FindKeyNameForAlias(struct xkb_desc * xkb, unsigned long lname,
+FindKeyNameForAlias(struct xkb_keymap * xkb, unsigned long lname,
                     unsigned long *real_name)
 {
     unsigned int i;
diff --git a/src/xkbcomp/misc.h b/src/xkbcomp/misc.h
index 7588cb3..01fb416 100644
--- a/src/xkbcomp/misc.h
+++ b/src/xkbcomp/misc.h
@@ -76,7 +76,7 @@ extern Bool ProcessIncludeFile(struct xkb_context * /* context */,
                                unsigned *       /* merge_rtrn */
     );
 
-extern Bool FindNamedKey(struct xkb_desc * /* xkb */ ,
+extern Bool FindNamedKey(struct xkb_keymap * /* xkb */ ,
                          unsigned long /* name */ ,
                          xkb_keycode_t * /* kc_rtrn */ ,
                          Bool /* use_aliases */ ,
@@ -84,7 +84,7 @@ extern Bool FindNamedKey(struct xkb_desc * /* xkb */ ,
                          xkb_keycode_t    /* start_from */
     );
 
-extern Bool FindKeyNameForAlias(struct xkb_desc * /* xkb */ ,
+extern Bool FindKeyNameForAlias(struct xkb_keymap * /* xkb */ ,
                                 unsigned long /* lname */ ,
                                 unsigned long * /* real_name */
     );
diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c
index a2c4a15..5548e5b 100644
--- a/src/xkbcomp/symbols.c
+++ b/src/xkbcomp/symbols.c
@@ -277,7 +277,7 @@ typedef struct _SymbolsInfo
 } SymbolsInfo;
 
 static void
-InitSymbolsInfo(SymbolsInfo * info, struct xkb_desc * xkb)
+InitSymbolsInfo(SymbolsInfo * info, struct xkb_keymap * xkb)
 {
     int i;
 
@@ -705,7 +705,7 @@ MergeKeys(SymbolsInfo * info, KeyInfo * into, KeyInfo * from)
 }
 
 static Bool
-AddKeySymbols(SymbolsInfo * info, KeyInfo * key, struct xkb_desc * xkb)
+AddKeySymbols(SymbolsInfo * info, KeyInfo * key, struct xkb_keymap * xkb)
 {
     unsigned int i;
     unsigned long real_name;
@@ -817,7 +817,7 @@ AddModMapEntry(SymbolsInfo * info, ModMapEntry * new)
 
 static void
 MergeIncludedSymbols(SymbolsInfo * into, SymbolsInfo * from,
-                     unsigned merge, struct xkb_desc * xkb)
+                     unsigned merge, struct xkb_keymap * xkb)
 {
     unsigned int i;
     KeyInfo *key;
@@ -867,14 +867,14 @@ MergeIncludedSymbols(SymbolsInfo * into, SymbolsInfo * from,
 }
 
 typedef void (*FileHandler) (XkbFile * /* rtrn */ ,
-                             struct xkb_desc * /* xkb */ ,
+                             struct xkb_keymap * /* xkb */ ,
                              unsigned /* merge */ ,
                              SymbolsInfo *      /* included */
     );
 
 static Bool
 HandleIncludeSymbols(IncludeStmt * stmt,
-                     struct xkb_desc * xkb, SymbolsInfo * info, FileHandler hndlr)
+                     struct xkb_keymap * xkb, SymbolsInfo * info, FileHandler hndlr)
 {
     unsigned newMerge;
     XkbFile *rtrn;
@@ -1021,7 +1021,7 @@ GetGroupIndex(KeyInfo * key,
 
 static Bool
 AddSymbolsToKey(KeyInfo * key,
-                struct xkb_desc * xkb,
+                struct xkb_keymap * xkb,
                 char *field,
                 ExprDef * arrayNdx, ExprDef * value, SymbolsInfo * info)
 {
@@ -1088,7 +1088,7 @@ AddSymbolsToKey(KeyInfo * key,
 
 static Bool
 AddActionsToKey(KeyInfo * key,
-                struct xkb_desc * xkb,
+                struct xkb_keymap * xkb,
                 char *field,
                 ExprDef * arrayNdx, ExprDef * value, SymbolsInfo * info)
 {
@@ -1176,7 +1176,7 @@ static const LookupEntry repeatEntries[] = {
 
 static Bool
 SetSymbolsField(KeyInfo * key,
-                struct xkb_desc * xkb,
+                struct xkb_keymap * xkb,
                 char *field,
                 ExprDef * arrayNdx, ExprDef * value, SymbolsInfo * info)
 {
@@ -1360,7 +1360,7 @@ SetGroupName(SymbolsInfo * info, ExprDef * arrayNdx, ExprDef * value)
 }
 
 static int
-HandleSymbolsVar(VarDef * stmt, struct xkb_desc * xkb, SymbolsInfo * info)
+HandleSymbolsVar(VarDef * stmt, struct xkb_keymap * xkb, SymbolsInfo * info)
 {
     ExprResult elem, field, tmp;
     ExprDef *arrayNdx;
@@ -1449,7 +1449,7 @@ HandleSymbolsVar(VarDef * stmt, struct xkb_desc * xkb, SymbolsInfo * info)
 
 static Bool
 HandleSymbolsBody(VarDef * def,
-                  struct xkb_desc * xkb, KeyInfo * key, SymbolsInfo * info)
+                  struct xkb_keymap * xkb, KeyInfo * key, SymbolsInfo * info)
 {
     Bool ok = True;
     ExprResult tmp, field;
@@ -1532,7 +1532,7 @@ SetExplicitGroup(SymbolsInfo * info, KeyInfo * key)
 
 static int
 HandleSymbolsDef(SymbolsDef * stmt,
-                 struct xkb_desc * xkb, unsigned merge, SymbolsInfo * info)
+                 struct xkb_keymap * xkb, unsigned merge, SymbolsInfo * info)
 {
     KeyInfo key;
 
@@ -1562,7 +1562,7 @@ HandleSymbolsDef(SymbolsDef * stmt,
 
 static Bool
 HandleModMapDef(ModMapDef * def,
-                struct xkb_desc * xkb, unsigned merge, SymbolsInfo * info)
+                struct xkb_keymap * xkb, unsigned merge, SymbolsInfo * info)
 {
     ExprDef *key;
     ModMapEntry tmp;
@@ -1605,7 +1605,7 @@ HandleModMapDef(ModMapDef * def,
 
 static void
 HandleSymbolsFile(XkbFile * file,
-                  struct xkb_desc * xkb, unsigned merge, SymbolsInfo * info)
+                  struct xkb_keymap * xkb, unsigned merge, SymbolsInfo * info)
 {
     ParseCommon *stmt;
 
@@ -1665,7 +1665,7 @@ HandleSymbolsFile(XkbFile * file,
 }
 
 static Bool
-FindKeyForSymbol(struct xkb_desc * xkb, xkb_keysym_t sym, xkb_keycode_t *kc_rtrn)
+FindKeyForSymbol(struct xkb_keymap * xkb, xkb_keysym_t sym, xkb_keycode_t *kc_rtrn)
 {
     xkb_keycode_t key;
     unsigned int group, level;
@@ -1697,7 +1697,7 @@ FindKeyForSymbol(struct xkb_desc * xkb, xkb_keysym_t sym, xkb_keycode_t *kc_rtrn
  * @return True if found, False otherwise.
  */
 static Bool
-FindNamedType(struct xkb_desc * xkb, xkb_atom_t atom, unsigned *type_rtrn)
+FindNamedType(struct xkb_keymap * xkb, xkb_atom_t atom, unsigned *type_rtrn)
 {
     unsigned n;
     const char *name = XkbcAtomText(atom);
@@ -1933,7 +1933,7 @@ PrepareKeyDef(KeyInfo * key)
  * This function recurses.
  */
 static Bool
-CopySymbolsDef(struct xkb_desc * xkb, KeyInfo *key, int start_from)
+CopySymbolsDef(struct xkb_keymap * xkb, KeyInfo *key, int start_from)
 {
     unsigned int i;
     xkb_keycode_t kc;
@@ -2132,7 +2132,7 @@ CopySymbolsDef(struct xkb_desc * xkb, KeyInfo *key, int start_from)
 }
 
 static Bool
-CopyModMapDef(struct xkb_desc * xkb, ModMapEntry *entry)
+CopyModMapDef(struct xkb_keymap * xkb, ModMapEntry *entry)
 {
     xkb_keycode_t kc;
 
@@ -2174,7 +2174,7 @@ CopyModMapDef(struct xkb_desc * xkb, ModMapEntry *entry)
  * @param merge Merge strategy (e.g. MergeOverride).
  */
 Bool
-CompileSymbols(XkbFile *file, struct xkb_desc * xkb, unsigned merge)
+CompileSymbols(XkbFile *file, struct xkb_keymap * xkb, unsigned merge)
 {
     unsigned int i;
     SymbolsInfo info;
diff --git a/src/xkbcomp/vmod.c b/src/xkbcomp/vmod.c
index 1a9d43d..49d4b76 100644
--- a/src/xkbcomp/vmod.c
+++ b/src/xkbcomp/vmod.c
@@ -36,14 +36,14 @@
 #include "vmod.h"
 
 void
-InitVModInfo(VModInfo * info, struct xkb_desc * xkb)
+InitVModInfo(VModInfo * info, struct xkb_keymap * xkb)
 {
     ClearVModInfo(info, xkb);
     info->errorCount = 0;
 }
 
 void
-ClearVModInfo(VModInfo * info, struct xkb_desc * xkb)
+ClearVModInfo(VModInfo * info, struct xkb_keymap * xkb)
 {
     int i;
 
@@ -78,7 +78,7 @@ ClearVModInfo(VModInfo * info, struct xkb_desc * xkb)
  * @param mergeMode Merge strategy (e.g. MergeOverride)
  */
 Bool
-HandleVModDef(VModDef * stmt, struct xkb_desc *xkb, unsigned mergeMode,
+HandleVModDef(VModDef * stmt, struct xkb_keymap *xkb, unsigned mergeMode,
               VModInfo * info)
 {
     int i, bit, nextFree;
@@ -162,7 +162,7 @@ HandleVModDef(VModDef * stmt, struct xkb_desc *xkb, unsigned mergeMode,
  * undefined.
  */
 static int
-LookupVModIndex(const struct xkb_desc *xkb, xkb_atom_t field, unsigned type,
+LookupVModIndex(const struct xkb_keymap *xkb, xkb_atom_t field, unsigned type,
                 ExprResult * val_rtrn)
 {
     int i;
@@ -216,7 +216,7 @@ LookupVModMask(const void * priv, xkb_atom_t field, unsigned type,
 }
 
 int
-FindKeypadVMod(struct xkb_desc * xkb)
+FindKeypadVMod(struct xkb_keymap * xkb)
 {
     xkb_atom_t name;
     ExprResult rtrn;
@@ -230,7 +230,7 @@ FindKeypadVMod(struct xkb_desc * xkb)
 }
 
 Bool
-ResolveVirtualModifier(ExprDef * def, struct xkb_desc *xkb,
+ResolveVirtualModifier(ExprDef * def, struct xkb_keymap *xkb,
                        ExprResult * val_rtrn, VModInfo * info)
 {
     struct xkb_names * names;
diff --git a/src/xkbcomp/vmod.h b/src/xkbcomp/vmod.h
index ee95109..d89c680 100644
--- a/src/xkbcomp/vmod.h
+++ b/src/xkbcomp/vmod.h
@@ -29,7 +29,7 @@
 
 typedef struct _VModInfo
 {
-    struct xkb_desc * xkb;
+    struct xkb_keymap * xkb;
     unsigned defined;
     unsigned available;
     unsigned newlyDefined;
@@ -37,28 +37,28 @@ typedef struct _VModInfo
 } VModInfo;
 
 extern void InitVModInfo(VModInfo * /* info */ ,
-                         struct xkb_desc *     /* xkb */
+                         struct xkb_keymap *     /* xkb */
     );
 
 extern void ClearVModInfo(VModInfo * /* info */ ,
-                          struct xkb_desc *    /* xkb */
+                          struct xkb_keymap *    /* xkb */
     );
 
 extern Bool HandleVModDef(VModDef * /* stmt */ ,
-                          struct xkb_desc * /* xkb */ ,
+                          struct xkb_keymap * /* xkb */ ,
                           unsigned /* mergeMode */ ,
                           VModInfo *    /* info */
     );
 
 extern Bool ApplyVModDefs(VModInfo * /* info */ ,
-                          struct xkb_desc *    /* xkb */
+                          struct xkb_keymap *    /* xkb */
     );
 
-extern int FindKeypadVMod(struct xkb_desc *    /* xkb */
+extern int FindKeypadVMod(struct xkb_keymap *    /* xkb */
     );
 
 extern Bool ResolveVirtualModifier(ExprDef * /* def */ ,
-                                   struct xkb_desc * /* xkb */ ,
+                                   struct xkb_keymap * /* xkb */ ,
                                    ExprResult * /* value_rtrn */ ,
                                    VModInfo *   /* info */
     );
diff --git a/src/xkbcomp/xkbcomp.c b/src/xkbcomp/xkbcomp.c
index 051c51f..9534232 100644
--- a/src/xkbcomp/xkbcomp.c
+++ b/src/xkbcomp/xkbcomp.c
@@ -114,13 +114,13 @@ unwind_file:
     return names;
 }
 
-struct xkb_desc *
+struct xkb_keymap *
 xkb_map_new_from_names(struct xkb_context *context,
                        const struct xkb_rule_names *rmlvo)
 {
     XkbRF_VarDefsRec defs;
     struct xkb_component_names *names;
-    struct xkb_desc *xkb;
+    struct xkb_keymap *xkb;
 
     if (!rmlvo || ISEMPTY(rmlvo->rules) || ISEMPTY(rmlvo->layout)) {
         ERROR("rules and layout required to generate XKB keymap\n");
@@ -185,11 +185,11 @@ XkbChooseMap(XkbFile *file, const char *name)
     return map;
 }
 
-static struct xkb_desc *
+static struct xkb_keymap *
 compile_keymap(struct xkb_context *context, XkbFile *file)
 {
     XkbFile *mapToUse;
-    struct xkb_desc * xkb = NULL;
+    struct xkb_keymap * xkb = NULL;
 
     /* Find map to use */
     mapToUse = XkbChooseMap(file, NULL);
@@ -216,7 +216,7 @@ err:
     return xkb;
 }
 
-struct xkb_desc *
+struct xkb_keymap *
 xkb_map_new_from_kccgst(struct xkb_context *context,
                         const struct xkb_component_names *kccgst)
 {
@@ -255,7 +255,7 @@ xkb_map_new_from_kccgst(struct xkb_context *context,
     return compile_keymap(context, file);
 }
 
-struct xkb_desc *
+struct xkb_keymap *
 xkb_map_new_from_string(struct xkb_context *context,
                         const char *string,
                         enum xkb_keymap_format format)
@@ -280,7 +280,7 @@ xkb_map_new_from_string(struct xkb_context *context,
     return compile_keymap(context, file);
 }
 
-struct xkb_desc *
+struct xkb_keymap *
 xkb_map_new_from_fd(struct xkb_context *context,
                     int fd,
                     enum xkb_keymap_format format)
@@ -313,13 +313,13 @@ xkb_map_new_from_fd(struct xkb_context *context,
 }
 
 void
-xkb_map_ref(struct xkb_desc *xkb)
+xkb_map_ref(struct xkb_keymap *xkb)
 {
     xkb->refcnt++;
 }
 
 void
-xkb_map_unref(struct xkb_desc *xkb)
+xkb_map_unref(struct xkb_keymap *xkb)
 {
     if (--xkb->refcnt > 0)
         return;
diff --git a/src/xkbcomp/xkbcomp.h b/src/xkbcomp/xkbcomp.h
index 5b47c15..6271e57 100644
--- a/src/xkbcomp/xkbcomp.h
+++ b/src/xkbcomp/xkbcomp.h
@@ -254,25 +254,25 @@ typedef struct _XkbFile
     Bool compiled;
 } XkbFile;
 
-extern struct xkb_desc *
+extern struct xkb_keymap *
 CompileKeymap(struct xkb_context *context, XkbFile *file, unsigned merge);
 
 extern Bool
-CompileKeycodes(XkbFile *file, struct xkb_desc * xkb, unsigned merge);
+CompileKeycodes(XkbFile *file, struct xkb_keymap * xkb, unsigned merge);
 
 extern Bool
-CompileKeyTypes(XkbFile *file, struct xkb_desc * xkb, unsigned merge);
+CompileKeyTypes(XkbFile *file, struct xkb_keymap * xkb, unsigned merge);
 
 typedef struct _LEDInfo *LEDInfoPtr;
 
 extern Bool
-CompileCompatMap(XkbFile *file, struct xkb_desc * xkb, unsigned merge,
+CompileCompatMap(XkbFile *file, struct xkb_keymap * xkb, unsigned merge,
                  LEDInfoPtr *unboundLEDs);
 
 extern Bool
-CompileSymbols(XkbFile *file, struct xkb_desc * xkb, unsigned merge);
+CompileSymbols(XkbFile *file, struct xkb_keymap * xkb, unsigned merge);
 
 extern Bool
-UpdateModifiersFromCompat(struct xkb_desc *xkb);
+UpdateModifiersFromCompat(struct xkb_keymap *xkb);
 
 #endif /* XKBCOMP_H */
diff --git a/src/xkbmisc.h b/src/xkbmisc.h
index 7167aa0..5d2d1c6 100644
--- a/src/xkbmisc.h
+++ b/src/xkbmisc.h
@@ -38,16 +38,16 @@ typedef uint32_t xkb_atom_t;
 /***====================================================================***/
 
 extern Bool
-XkbcComputeEffectiveMap(struct xkb_desc * xkb, struct xkb_key_type * type,
+XkbcComputeEffectiveMap(struct xkb_keymap * xkb, struct xkb_key_type * type,
                         unsigned char *map_rtrn);
 
 /***====================================================================***/
 
 extern int
-XkbcInitCanonicalKeyTypes(struct xkb_desc * xkb, unsigned which, int keypadVMod);
+XkbcInitCanonicalKeyTypes(struct xkb_keymap * xkb, unsigned which, int keypadVMod);
 
 extern Bool
-XkbcVirtualModsToReal(struct xkb_desc * xkb, unsigned virtual_mask,
+XkbcVirtualModsToReal(struct xkb_keymap * xkb, unsigned virtual_mask,
                       unsigned *mask_rtrn);
 
 extern void
@@ -86,7 +86,7 @@ extern const char *
 XkbcAtomText(xkb_atom_t atm);
 
 extern const char *
-XkbcVModMaskText(struct xkb_desc * xkb, unsigned modMask, unsigned mask);
+XkbcVModMaskText(struct xkb_keymap * xkb, unsigned modMask, unsigned mask);
 
 extern const char *
 XkbcModIndexText(unsigned ndx);
diff --git a/test/filecomp.c b/test/filecomp.c
index 26bfaa6..5a557a4 100644
--- a/test/filecomp.c
+++ b/test/filecomp.c
@@ -41,7 +41,7 @@ static char buffer[8192];
 int main(int argc, char *argv[])
 {
     struct xkb_context *context;
-    struct xkb_desc *xkb;
+    struct xkb_keymap *xkb;
     char *path;
     int fd;
     int i, len, from_string = 0;
diff --git a/test/namescomp.c b/test/namescomp.c
index d16d375..6fb3448 100644
--- a/test/namescomp.c
+++ b/test/namescomp.c
@@ -33,7 +33,7 @@ authorization from the authors.
 int main(int argc, char *argv[])
 {
     struct xkb_context *context;
-    struct xkb_desc *xkb;
+    struct xkb_keymap *xkb;
     struct xkb_component_names kccgst;
 
     /* Require Kc + T + C + S */
diff --git a/test/rulescomp.c b/test/rulescomp.c
index da9f619..593d299 100644
--- a/test/rulescomp.c
+++ b/test/rulescomp.c
@@ -34,7 +34,7 @@ authorization from the authors.
 int main(int argc, char *argv[])
 {
     struct xkb_context *context;
-    struct xkb_desc *xkb;
+    struct xkb_keymap *xkb;
     struct xkb_rule_names rmlvo;
 
     /* Require rmlvo */
diff --git a/test/state.c b/test/state.c
index 231a8c0..2486f71 100644
--- a/test/state.c
+++ b/test/state.c
@@ -88,7 +88,7 @@ print_state(struct xkb_state *state)
 }
 
 static void
-test_update_key(struct xkb_desc *xkb)
+test_update_key(struct xkb_keymap *xkb)
 {
     struct xkb_state *state = xkb_state_new(xkb);
     xkb_keysym_t *syms;
@@ -150,7 +150,7 @@ test_update_key(struct xkb_desc *xkb)
 }
 
 static void
-test_serialisation(struct xkb_desc *xkb)
+test_serialisation(struct xkb_keymap *xkb)
 {
     struct xkb_state *state = xkb_state_new(xkb);
     xkb_mod_mask_t base_mods;
@@ -206,7 +206,7 @@ int
 main(int argc, char *argv[])
 {
     struct xkb_context *context;
-    struct xkb_desc *xkb;
+    struct xkb_keymap *xkb;
     struct xkb_rule_names rmlvo;
 
     rmlvo.rules = "evdev";