Commit 92e07726b29d129d2ca793c3614353d35a1a6b40

Ran Benita 2012-09-27T20:16:12

test: add keycodes files which map directly to evdev codes This is a proof-of-concept for the long key names. The keycodes in the file evdev-xkbcommon are autogenerated from linux/input.h, and uses the names given there; all of the previous names are aliased to the new names, so they continue to work with the symbols files, etc. You can try it with 'sudo ./test/interactive -r evdev-xkbcommon -n 0' The -n 0 means that we don't offset the evdev scan codes - just feed them directly. The -r evdev-xkbcommon just means to use a new rules file which makes us use the new keycodes file. (The only problem I can see is with the MENU and LSGT names which has some conflicts). Maybe some day xkeyboard-config could ship something similar, so that the 8 offset is unneeded. Signed-off-by: Ran Benita <ran234@gmail.com>

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
diff --git a/test/data/keycodes/aliases-xkbcommon b/test/data/keycodes/aliases-xkbcommon
new file mode 100644
index 0000000..96a17ab
--- /dev/null
+++ b/test/data/keycodes/aliases-xkbcommon
@@ -0,0 +1,99 @@
+
+// keycode aliases for phonetic keyboard maps
+
+default
+xkb_keycodes "qwerty" {
+
+   alias <LatQ> = <Q>;
+   alias <LatW> = <W>;
+   alias <LatE> = <E>;
+   alias <LatR> = <R>;
+   alias <LatT> = <T>;
+   alias <LatY> = <Y>;
+   alias <LatU> = <U>;
+   alias <LatI> = <I>;
+   alias <LatO> = <O>;
+   alias <LatP> = <P>;
+
+   alias <LatA> = <A>;
+   alias <LatS> = <S>;
+   alias <LatD> = <D>;
+   alias <LatF> = <F>;
+   alias <LatG> = <G>;
+   alias <LatH> = <H>;
+   alias <LatJ> = <J>;
+   alias <LatK> = <K>;
+   alias <LatL> = <L>;
+
+   alias <LatZ> = <Z>;
+   alias <LatX> = <X>;
+   alias <LatC> = <C>;
+   alias <LatV> = <V>;
+   alias <LatB> = <B>;
+   alias <LatN> = <N>;
+   alias <LatM> = <M>;
+};
+
+xkb_keycodes "azerty" {
+
+   alias <LatA> = <Q>;
+   alias <LatZ> = <W>;
+   alias <LatE> = <E>;
+   alias <LatR> = <R>;
+   alias <LatT> = <T>;
+   alias <LatY> = <Y>;
+   alias <LatU> = <U>;
+   alias <LatI> = <I>;
+   alias <LatO> = <O>;
+   alias <LatP> = <P>;
+
+   alias <LatQ> = <A>;
+   alias <LatS> = <S>;
+   alias <LatD> = <D>;
+   alias <LatF> = <F>;
+   alias <LatG> = <G>;
+   alias <LatH> = <H>;
+   alias <LatJ> = <J>;
+   alias <LatK> = <K>;
+   alias <LatL> = <L>;
+   alias <LatM> = <SEMICOLON>;
+
+   alias <LatW> = <Z>;
+   alias <LatX> = <X>;
+   alias <LatC> = <C>;
+   alias <LatV> = <V>;
+   alias <LatB> = <B>;
+   alias <LatN> = <N>;
+};
+
+xkb_keycodes "qwertz" {
+
+   alias <LatQ> = <Q>;
+   alias <LatW> = <W>;
+   alias <LatE> = <E>;
+   alias <LatR> = <R>;
+   alias <LatT> = <T>;
+   alias <LatZ> = <Y>;
+   alias <LatU> = <U>;
+   alias <LatI> = <I>;
+   alias <LatO> = <O>;
+   alias <LatP> = <P>;
+
+   alias <LatA> = <A>;
+   alias <LatS> = <S>;
+   alias <LatD> = <D>;
+   alias <LatF> = <F>;
+   alias <LatG> = <G>;
+   alias <LatH> = <H>;
+   alias <LatJ> = <J>;
+   alias <LatK> = <K>;
+   alias <LatL> = <L>;
+
+   alias <LatY> = <Z>;
+   alias <LatX> = <X>;
+   alias <LatC> = <C>;
+   alias <LatV> = <V>;
+   alias <LatB> = <B>;
+   alias <LatN> = <N>;
+   alias <LatM> = <M>;
+};
diff --git a/test/data/keycodes/evdev-xkbcommon b/test/data/keycodes/evdev-xkbcommon
new file mode 100644
index 0000000..e388362
--- /dev/null
+++ b/test/data/keycodes/evdev-xkbcommon
@@ -0,0 +1,504 @@
+default xkb_keycodes "evdev" {
+    <ESC>               =  1;
+    <1>                 =  2;
+    <2>                 =  3;
+    <3>                 =  4;
+    <4>                 =  5;
+    <5>                 =  6;
+    <6>                 =  7;
+    <7>                 =  8;
+    <8>                 =  9;
+    <9>                 =  10;
+    <0>                 =  11;
+    <MINUS>             =  12;
+    <EQUAL>             =  13;
+    <BACKSPACE>         =  14;
+    <TAB>               =  15;
+    <Q>                 =  16;
+    <W>                 =  17;
+    <E>                 =  18;
+    <R>                 =  19;
+    <T>                 =  20;
+    <Y>                 =  21;
+    <U>                 =  22;
+    <I>                 =  23;
+    <O>                 =  24;
+    <P>                 =  25;
+    <LEFTBRACE>         =  26;
+    <RIGHTBRACE>        =  27;
+    <ENTER>             =  28;
+    <LEFTCTRL>          =  29;
+    <A>                 =  30;
+    <S>                 =  31;
+    <D>                 =  32;
+    <F>                 =  33;
+    <G>                 =  34;
+    <H>                 =  35;
+    <J>                 =  36;
+    <K>                 =  37;
+    <L>                 =  38;
+    <SEMICOLON>         =  39;
+    <APOSTROPHE>        =  40;
+    <GRAVE>             =  41;
+    <LEFTSHIFT>         =  42;
+    <BACKSLASH>         =  43;
+    <Z>                 =  44;
+    <X>                 =  45;
+    <C>                 =  46;
+    <V>                 =  47;
+    <B>                 =  48;
+    <N>                 =  49;
+    <M>                 =  50;
+    <COMMA>             =  51;
+    <DOT>               =  52;
+    <SLASH>             =  53;
+    <RIGHTSHIFT>        =  54;
+    <KPASTERISK>        =  55;
+    <LEFTALT>           =  56;
+    <SPACE>             =  57;
+    <CAPSLOCK>          =  58;
+    <F1>                =  59;
+    <F2>                =  60;
+    <F3>                =  61;
+    <F4>                =  62;
+    <F5>                =  63;
+    <F6>                =  64;
+    <F7>                =  65;
+    <F8>                =  66;
+    <F9>                =  67;
+    <F10>               =  68;
+    <NUMLOCK>           =  69;
+    <SCROLLLOCK>        =  70;
+    <KP7>               =  71;
+    <KP8>               =  72;
+    <KP9>               =  73;
+    <KPMINUS>           =  74;
+    <KP4>               =  75;
+    <KP5>               =  76;
+    <KP6>               =  77;
+    <KPPLUS>            =  78;
+    <KP1>               =  79;
+    <KP2>               =  80;
+    <KP3>               =  81;
+    <KP0>               =  82;
+    <KPDOT>             =  83;
+    <ZENKAKUHANKAKU>    =  85;
+    <102ND>             =  86;
+    <F11>               =  87;
+    <F12>               =  88;
+    <RO>                =  89;
+    <KATAKANA>          =  90;
+    <HIRAGANA>          =  91;
+    <HENKAN>            =  92;
+    <KATAKANAHIRAGANA>  =  93;
+    <MUHENKAN>          =  94;
+    <KPJPCOMMA>         =  95;
+    <KPENTER>           =  96;
+    <RIGHTCTRL>         =  97;
+    <KPSLASH>           =  98;
+    <SYSRQ>             =  99;
+    <RIGHTALT>          =  100;
+    <LINEFEED>          =  101;
+    <HOME>              =  102;
+    <UP>                =  103;
+    <PAGEUP>            =  104;
+    <LEFT>              =  105;
+    <RIGHT>             =  106;
+    <END>               =  107;
+    <DOWN>              =  108;
+    <PAGEDOWN>          =  109;
+    <INSERT>            =  110;
+    <DELETE>            =  111;
+    <MACRO>             =  112;
+    <MUTE>              =  113;
+    <VOLUMEDOWN>        =  114;
+    <VOLUMEUP>          =  115;
+    <POWER>             =  116;
+    <KPEQUAL>           =  117;
+    <KPPLUSMINUS>       =  118;
+    <PAUSE>             =  119;
+    <SCALE>             =  120;
+    <KPCOMMA>           =  121;
+    <HANGEUL>           =  122;
+    <HANJA>             =  123;
+    <YEN>               =  124;
+    <LEFTMETA>          =  125;
+    <RIGHTMETA>         =  126;
+    <COMPOSE>           =  127;
+    <STOP>              =  128;
+    <AGAIN>             =  129;
+    <PROPS>             =  130;
+    <UNDO>              =  131;
+    <FRONT>             =  132;
+    <COPY>              =  133;
+    <OPEN>              =  134;
+    <PASTE>             =  135;
+    <FIND>              =  136;
+    <CUT>               =  137;
+    <HELP>              =  138;
+    <MENU>              =  139;
+    <CALC>              =  140;
+    <SETUP>             =  141;
+    <SLEEP>             =  142;
+    <WAKEUP>            =  143;
+    <FILE>              =  144;
+    <SENDFILE>          =  145;
+    <DELETEFILE>        =  146;
+    <XFER>              =  147;
+    <PROG1>             =  148;
+    <PROG2>             =  149;
+    <WWW>               =  150;
+    <MSDOS>             =  151;
+    <COFFEE>            =  152;
+    <DIRECTION>         =  153;
+    <CYCLEWINDOWS>      =  154;
+    <MAIL>              =  155;
+    <BOOKMARKS>         =  156;
+    <COMPUTER>          =  157;
+    <BACK>              =  158;
+    <FORWARD>           =  159;
+    <CLOSECD>           =  160;
+    <EJECTCD>           =  161;
+    <EJECTCLOSECD>      =  162;
+    <NEXTSONG>          =  163;
+    <PLAYPAUSE>         =  164;
+    <PREVIOUSSONG>      =  165;
+    <STOPCD>            =  166;
+    <RECORD>            =  167;
+    <REWIND>            =  168;
+    <PHONE>             =  169;
+    <ISO>               =  170;
+    <CONFIG>            =  171;
+    <HOMEPAGE>          =  172;
+    <REFRESH>           =  173;
+    <EXIT>              =  174;
+    <MOVE>              =  175;
+    <EDIT>              =  176;
+    <SCROLLUP>          =  177;
+    <SCROLLDOWN>        =  178;
+    <KPLEFTPAREN>       =  179;
+    <KPRIGHTPAREN>      =  180;
+    <NEW>               =  181;
+    <REDO>              =  182;
+    <F13>               =  183;
+    <F14>               =  184;
+    <F15>               =  185;
+    <F16>               =  186;
+    <F17>               =  187;
+    <F18>               =  188;
+    <F19>               =  189;
+    <F20>               =  190;
+    <F21>               =  191;
+    <F22>               =  192;
+    <F23>               =  193;
+    <F24>               =  194;
+    <PLAYCD>            =  200;
+    <PAUSECD>           =  201;
+    <PROG3>             =  202;
+    <PROG4>             =  203;
+    <DASHBOARD>         =  204;
+    <SUSPEND>           =  205;
+    <CLOSE>             =  206;
+    <PLAY>              =  207;
+    <FASTFORWARD>       =  208;
+    <BASSBOOST>         =  209;
+    <PRINT>             =  210;
+    <HP>                =  211;
+    <CAMERA>            =  212;
+    <SOUND>             =  213;
+    <QUESTION>          =  214;
+    <EMAIL>             =  215;
+    <CHAT>              =  216;
+    <SEARCH>            =  217;
+    <CONNECT>           =  218;
+    <FINANCE>           =  219;
+    <SPORT>             =  220;
+    <SHOP>              =  221;
+    <ALTERASE>          =  222;
+    <CANCEL>            =  223;
+    <BRIGHTNESSDOWN>    =  224;
+    <BRIGHTNESSUP>      =  225;
+    <MEDIA>             =  226;
+    <SWITCHVIDEOMODE>   =  227;
+    <KBDILLUMTOGGLE>    =  228;
+    <KBDILLUMDOWN>      =  229;
+    <KBDILLUMUP>        =  230;
+    <SEND>              =  231;
+    <REPLY>             =  232;
+    <FORWARDMAIL>       =  233;
+    <SAVE>              =  234;
+    <DOCUMENTS>         =  235;
+    <BATTERY>           =  236;
+    <BLUETOOTH>         =  237;
+    <WLAN>              =  238;
+    <UWB>               =  239;
+    <UNKNOWN>           =  240;
+    <VIDEO_NEXT>        =  241;
+    <VIDEO_PREV>        =  242;
+    <BRIGHTNESS_CYCLE>  =  243;
+    <BRIGHTNESS_ZERO>   =  244;
+    <DISPLAY_OFF>       =  245;
+    <WIMAX>             =  246;
+    <RFKILL>            =  247;
+    <MICMUTE>           =  248;
+
+    // Fake keycodes for virtual keys
+    <LVL3>              =  84;
+    <MDSW>              =  195;
+    <ALT>               =  196;
+    <META>              =  197;
+    <SUPR>              =  198;
+    <HYPR>              =  199;
+
+    indicator 0x01 = "Num Lock";    // NUML
+    indicator 0x02 = "Caps Lock";   // CAPSL
+    indicator 0x03 = "Scroll Lock"; // SCROLLL
+    indicator 0x04 = "Compose";     // COMPOSE
+    indicator 0x05 = "Kana";        // KANA
+    indicator 0x06 = "Sleep";       // SLEEP
+    indicator 0x07 = "Suspend";     // SUSPEND
+    indicator 0x08 = "Mute";        // MUTE
+    indicator 0x09 = "Misc";        // MISC
+    indicator 0x0a = "Mail";        // MAIL
+    indicator 0x0b = "Charging";    // CHARGING
+
+    alias <TLDE> = <GRAVE>;
+    alias <AE01> = <1>;
+    alias <AE02> = <2>;
+    alias <AE03> = <3>;
+    alias <AE04> = <4>;
+    alias <AE05> = <5>;
+    alias <AE06> = <6>;
+    alias <AE07> = <7>;
+    alias <AE08> = <8>;
+    alias <AE09> = <9>;
+    alias <AE10> = <0>;
+    alias <AE11> = <MINUS>;
+    alias <AE12> = <EQUAL>;
+    alias <BKSP> = <BACKSPACE>;
+
+    alias <AD01> = <Q>;
+    alias <AD02> = <W>;
+    alias <AD03> = <E>;
+    alias <AD04> = <R>;
+    alias <AD05> = <T>;
+    alias <AD06> = <Y>;
+    alias <AD07> = <U>;
+    alias <AD08> = <I>;
+    alias <AD09> = <O>;
+    alias <AD10> = <P>;
+    alias <AD11> = <LEFTBRACE>;
+    alias <AD12> = <RIGHTBRACE>;
+    alias <BKSL> = <BACKSLASH>;
+    alias <AC12> = <BACKSLASH>;
+    alias <RTRN> = <ENTER>;
+
+    alias <CAPS> = <CAPSLOCK>;
+    alias <AC01> = <A>;
+    alias <AC02> = <S>;
+    alias <AC03> = <D>;
+    alias <AC04> = <F>;
+    alias <AC05> = <G>;
+    alias <AC06> = <H>;
+    alias <AC07> = <J>;
+    alias <AC08> = <K>;
+    alias <AC09> = <L>;
+    alias <AC10> = <SEMICOLON>;
+    alias <AC11> = <APOSTROPHE>;
+
+    alias <LFSH> = <LEFTSHIFT>;
+    alias <AB01> = <Z>;
+    alias <AB02> = <X>;
+    alias <AB03> = <C>;
+    alias <AB04> = <V>;
+    alias <AB05> = <B>;
+    alias <AB06> = <N>;
+    alias <AB07> = <M>;
+    alias <AB08> = <COMMA>;
+    alias <AB09> = <DOT>;
+    alias <AB10> = <SLASH>;
+    alias <RTSH> = <RIGHTSHIFT>;
+
+    alias <LALT> = <LEFTALT>;
+    alias <LCTL> = <LEFTCTRL>;
+    alias <SPCE> = <SPACE>;
+    alias <RCTL> = <RIGHTCTRL>;
+    alias <RALT> = <RIGHTALT>;
+    alias <LWIN> = <LEFTMETA>;
+    alias <RWIN> = <RIGHTMETA>;
+    alias <COMP> = <COMPOSE>;
+    alias <MENU> = <COMPOSE>;
+
+    alias <FK01> = <F1>;
+    alias <FK02> = <F2>;
+    alias <FK03> = <F3>;
+    alias <FK04> = <F4>;
+    alias <FK05> = <F5>;
+    alias <FK06> = <F6>;
+    alias <FK07> = <F7>;
+    alias <FK08> = <F8>;
+    alias <FK09> = <F9>;
+    alias <FK10> = <F10>;
+    alias <FK11> = <F11>;
+    alias <FK12> = <F12>;
+
+    alias <PRSC> = <SYSRQ>;
+    alias <SCLK> = <SCROLLLOCK>;
+    alias <PAUS> = <PAUSE>;
+
+    alias <INS> = <INSERT>;
+    alias <PGUP> = <PAGEUP>;
+    alias <DELE> = <DELETE>;
+    alias <PGDN> = <PAGEDOWN>;
+
+    alias <RGHT> = <RIGHT>;
+
+    alias <NMLK> = <NUMLOCK>;
+    alias <KPDV> = <KPSLASH>;
+    alias <KPMU> = <KPASTERISK>;
+    alias <KPSU> = <KPMINUS>;
+
+    alias <KPAD> = <KPPLUS>;
+
+    alias <KPEN> = <KPENTER>;
+
+    alias <KPDL> = <KPDOT>;
+    alias <KPEQ> = <KPEQUAL>;
+
+    alias <FK13> = <F13>;
+    alias <FK14> = <F14>;
+    alias <FK15> = <F15>;
+    alias <FK16> = <F16>;
+    alias <FK17> = <F17>;
+    alias <FK18> = <F18>;
+    alias <FK19> = <F19>;
+    alias <FK20> = <F20>;
+    alias <FK21> = <F21>;
+    alias <FK22> = <F22>;
+    alias <FK23> = <F23>;
+    alias <FK24> = <F24>;
+
+    alias <HZTG> = <APOSTROPHE>;
+    alias <HKTG> = <KATAKANAHIRAGANA>;
+    alias <AB11> = <RO>;
+    alias <HENK> = <HENKAN>;
+    alias <MUHE> = <MUHENKAN>;
+    alias <AE13> = <YEN>;
+    alias <KATA> = <KATAKANA>;
+    alias <HIRA> = <HIRAGANA>;
+    alias <JPCM> = <KPJPCOMMA>;
+
+    alias <HNGL> = <HANGEUL>;
+    alias <HJCV> = <HANJA>;
+
+    alias <LMTA> = <LEFTMETA>;
+    alias <RMTA> = <RIGHTMETA>;
+    alias <VOL-> = <VOLUMEDOWN>;
+    alias <VOL+> = <VOLUMEUP>;
+    alias <POWR> = <POWER>;
+    alias <AGAI> = <AGAIN>;
+    alias <PROP> = <PROPS>;
+    alias <FRNT> = <FRONT>;
+    alias <PAST> = <PASTE>;
+
+    alias <LNFD> = <LINEFEED>;
+    alias <I120> = <MACRO>;
+    alias <I126> = <KPPLUSMINUS>;
+    alias <I128> = <SCALE>;
+    alias <I129> = <KPCOMMA>;
+    alias <I147> = <MENU>;
+    alias <I148> = <CALC>;
+    alias <I149> = <SETUP>;
+    alias <I150> = <SLEEP>;
+    alias <I151> = <WAKEUP>;
+    alias <I152> = <FILE>;
+    alias <I153> = <SENDFILE>;
+    alias <I154> = <DELETEFILE>;
+    alias <I155> = <XFER>;
+    alias <I156> = <PROG1>;
+    alias <I157> = <PROG2>;
+    alias <I158> = <WWW>;
+    alias <I159> = <MSDOS>;
+    alias <I160> = <COFFEE>;
+    alias <I161> = <DIRECTION>;
+    alias <I162> = <CYCLEWINDOWS>;
+    alias <I163> = <MAIL>;
+    alias <I164> = <BOOKMARKS>;
+    alias <I165> = <COMPUTER>;
+    alias <I166> = <BACK>;
+    alias <I167> = <FORWARD>;
+    alias <I168> = <CLOSECD>;
+    alias <I169> = <EJECTCD>;
+    alias <I170> = <EJECTCLOSECD>;
+    alias <I171> = <NEXTSONG>;
+    alias <I172> = <PLAYPAUSE>;
+    alias <I173> = <PREVIOUSSONG>;
+    alias <I174> = <STOPCD>;
+    alias <I175> = <RECORD>;
+    alias <I176> = <REWIND>;
+    alias <I177> = <PHONE>;
+    alias <I178> = <ISO>;
+    alias <I179> = <CONFIG>;
+    alias <I180> = <HOMEPAGE>;
+    alias <I181> = <REFRESH>;
+    alias <I182> = <EXIT>;
+    alias <I183> = <MOVE>;
+    alias <I184> = <EDIT>;
+    alias <I185> = <SCROLLUP>;
+    alias <I186> = <SCROLLDOWN>;
+    alias <I187> = <KPLEFTPAREN>;
+    alias <I188> = <KPRIGHTPAREN>;
+    alias <I189> = <NEW>;
+    alias <I190> = <REDO>;
+    alias <I208> = <PLAYCD>;
+    alias <I209> = <PAUSECD>;
+    alias <I210> = <PROG3>;
+    alias <I211> = <PROG4>;
+    alias <I212> = <DASHBOARD>;
+    alias <I213> = <SUSPEND>;
+    alias <I214> = <CLOSE>;
+    alias <I215> = <PLAY>;
+    alias <I216> = <FASTFORWARD>;
+    alias <I217> = <BASSBOOST>;
+    alias <I218> = <PRINT>;
+    alias <I219> = <HP>;
+    alias <I220> = <CAMERA>;
+    alias <I221> = <SOUND>;
+    alias <I222> = <QUESTION>;
+    alias <I223> = <EMAIL>;
+    alias <I224> = <CHAT>;
+    alias <I225> = <SEARCH>;
+    alias <I226> = <CONNECT>;
+    alias <I227> = <FINANCE>;
+    alias <I228> = <SPORT>;
+    alias <I229> = <SHOP>;
+    alias <I230> = <ALTERASE>;
+    alias <I231> = <CANCEL>;
+    alias <I232> = <BRIGHTNESSDOWN>;
+    alias <I233> = <BRIGHTNESSUP>;
+    alias <I234> = <MEDIA>;
+    alias <I235> = <SWITCHVIDEOMODE>;
+    alias <I236> = <KBDILLUMTOGGLE>;
+    alias <I237> = <KBDILLUMDOWN>;
+    alias <I238> = <KBDILLUMUP>;
+    alias <I239> = <SEND>;
+    alias <I240> = <REPLY>;
+    alias <I241> = <FORWARDMAIL>;
+    alias <I242> = <SAVE>;
+    alias <I243> = <DOCUMENTS>;
+    alias <I244> = <BATTERY>;
+    alias <I245> = <BLUETOOTH>;
+    alias <I246> = <WLAN>;
+    alias <I247> = <UWB>;
+    alias <I248> = <UNKNOWN>;
+    alias <I249> = <VIDEO_NEXT>;
+    alias <I250> = <VIDEO_PREV>;
+    alias <I251> = <BRIGHTNESS_CYCLE>;
+    alias <I252> = <BRIGHTNESS_ZERO>;
+    alias <I253> = <DISPLAY_OFF>;
+
+    alias <ALGR> = <RIGHTALT>;
+
+    // For Brazilian ABNT2
+    alias <KPPT> = <KPCOMMA>;
+};
diff --git a/test/data/rules/evdev-xkbcommon b/test/data/rules/evdev-xkbcommon
new file mode 100644
index 0000000..bde6ad2
--- /dev/null
+++ b/test/data/rules/evdev-xkbcommon
@@ -0,0 +1,1092 @@
+// DO NOT EDIT THIS FILE - IT WAS AUTOGENERATED BY merge.sh FROM rules/*.part
+//
+//  Rules for resolving XKB components for use with XFree86
+//  Copyright 1996 by Joseph Moss
+//
+//  2002 Modifier: Ivan Pascal      The XFree86 Project
+//
+
+// If you want non-latin layouts implicitly include the en_US layout
+// uncomment lines below
+//! $nonlatin = am ara ben bd bg bt by cs deva ge gh gr guj guru il \
+//              in ir iku jp kan kh kr la lao lk mk mm mn mv mal ori pk \
+//              ru scc sy syr tel th tj tam ua uz
+
+// PC models
+! $pcmodels = pc101 pc102 pc104 pc105
+
+// Microsoft models (using MS geometry)
+! $msmodels = microsoft microsoft4000 microsoft7000 microsoftpro microsoftprousb microsoftprose
+
+// Nokia devices and keyboards
+! $nokiamodels = nokiasu8w nokiarx44 nokiarx51
+
+// PC geometries - they have special geometry but symbols are mostly pc105
+! $pcgeometries = latitude
+
+// TypeMatrix geometries
+! $tmgeometries = tm2020 tm2030PS2 tm2030USB tm2030USB-102 tm2030USB-106
+
+// Layouts that provide further specializations for the OLPC
+! $olpclayouts = af am ara br ca es et fr it kh kz in mn np ru th tr us 
+
+! $macbooks = macbook78 macbook79
+! $maclaptop = ibook powerbook macbook78 macbook79
+! $applealu = applealu_ansi applealu_iso applealu_jis
+! $macs = macintosh macintosh_old ibook powerbook macbook78 macbook79
+
+! $macvendorlayouts = ch de dk fi fr gb is it latam nl no pt se us
+
+! $azerty = be fr
+! $qwertz = al cz de hr hu ro si sk 
+
+! $inetkbds = acer_c300 acer_ferrari4k acer_laptop \
+              airkey \
+              apple armada azonaRF2300 \
+              benqx brother \
+              btc5113rf btc9000 btc9000a btc9001ah btc5090 btc9019u \
+              cherryblue cherrybluea cherryblueb \
+              cherrycyboard cherrycmexpert \
+              chicony chicony0108 chicony0420 chicony9885 \
+              compalfl90 \
+              compaqeak8 compaqik7 compaqik13 compaqik18 \
+              creativedw7000 \
+              cymotionlinux \
+              dell dellm65 inspiron dellusbmm \
+              emachines ennyah_dkb1008 evdev \
+              genius geniuscomfy2 \
+              gyration honeywell_euroboard \
+              hp250x hp5xx hp500fa hpdv5 \
+              hpi6 hpxe3gc hpxe3gf hpxe4xxx hpxt1000 hpzt11xx htcdream \
+              ibm_spacesaver ipaq inspiron intel \
+              logiaccess logicda logicink \
+              logiex110 logiclx300 \
+              logiinkse logiinkseusb logiitc logiik \
+              logitech_base itouch logiultrax \
+              logitech_g15 \
+              logidinovo logidinovoedge \
+              microsoft4000 microsoft7000 microsoftinet microsoftprousb microsoftprooem microsoftprose \
+              microsoftoffice microsoftmult \
+              mx1998 mx2500 mx2750 \
+              oretec \
+              pc105 \
+              presario propeller \
+              qtronix \
+              rapidaccess rapidaccess2 thinkpad60 \
+              samsung4500 samsung4510 \
+              silvercrest \
+              sk1300 sk2500 sk6200 sk7100 \
+              sven sven303 symplon \
+              toshiba_s3000 trust trustda \
+              unitekkb1925 yahoo
+
+// all layouts with 3rd and 4th groups
+! $threelevellayouts = al az \
+              be br bt \
+              ca ch cs cz \
+              de dk \
+              ee es \
+              fi fo fr \
+              gb gr \
+              hu \
+              ie ir is it \
+              latam \
+              lk lt \
+              mn mt \
+              nl no \
+              pl pt \
+              ro \
+              se sk \
+              tr \
+              us \
+              vn \
+              za
+
+! $evdevkbds = ibm_spacesaver
+
+! $thinkpads = thinkpad thinkpad60 thinkpadz60
+
+! $sun_t6_custom = ara be br ca ch cz de dk \
+                   ee es fi fr gb gr it kr \
+                   lt lv nl no pl pt ro ru \
+                   se sk tr tw ua
+
+! $htcdreamlayouts = us it de
+
+! $dvoraklayouts = br ca de ee es fr gb no pl se us
+
+! model		=	keycodes
+  *		=	evdev-xkbcommon
+
+! layout[1]	=	keycodes
+  $azerty       =       +aliases-xkbcommon(azerty)
+  $qwertz       =       +aliases-xkbcommon(qwertz)
+  *             =       +aliases-xkbcommon(qwerty)
+
+! layout	=	keycodes
+  $azerty       =       +aliases-xkbcommon(azerty)
+  $qwertz       =       +aliases-xkbcommon(qwertz)
+  *             =       +aliases-xkbcommon(qwerty)
+
+! model		layout	=	geometry
+  thinkpad     us              =       thinkpad(us)
+
+! model		=	geometry
+  microsoftelite	=	microsoft(elite)
+ $msmodels	=	microsoft(natural)
+  dell101	=	dell(dell101)
+  dellm65	=	dell(dellm65)
+  latitude	=	dell(latitude)
+  flexpro	=	keytronic(FlexPro)
+  hp6000	=	hp(omnibook)
+  hpmini110	=	hp(mini110)
+  hpdv5		=	hp(dv5)
+  omnikey101	=	northgate(omnikey101)
+  sanwaskbkg3	=	sanwa(sanwaskbkg3)
+ $pcmodels	=	pc(%m)
+ $pcgeometries	=	pc(%m)
+  everex	=	everex(STEPnote)
+  thinkpad	=	thinkpad(intl)
+  thinkpad60	=	thinkpad(60)
+  thinkpadz60	=	thinkpad(60)
+ $tmgeometries	=	typematrix(%m)
+  winbook	=	winbook(XP5)
+  pc98		=	nec(pc98)
+ $applealu	=	macintosh(%m)
+ $macbooks      =       macintosh(%m)
+ $macs		=	macintosh(macintosh)
+  hhk		=	hhk(basic)
+  kinesis	=	kinesis(model100)
+ $nokiamodels	=	nokia(%m)
+  *		=       pc(pc104)
+
+! model		layout		variant		=	symbols
+  *		ben		basic		=	pc+in(ben)
+  *		ben		probhat		=	pc+in(ben_probhat)
+  *		dev		basic		=	pc+in(deva)
+  *		dvorak		$dvoraklayouts		=	pc+%v(dvorak)
+  *		dvorak		basic		=	pc+us(dvorak)
+  *		dvorak		pl_basic		=	pc+pl(dvorak)
+  *		dvorak		pl		=	pc+pl(dvorak_quotes)
+  *		dvorak		pl_altquotes		=	pc+pl(dvorak_altquotes)
+  *		dzdwi		basic		=	pc+bt(basic)
+  *		fi		basic		=	pc+fi(classic)
+  *		ge		azerty_tskapo		=	pc+fr(geo)
+  *		guj		basic		=	pc+in(guj)
+  *		gur		basic		=	pc+in(guru)
+  *		ie		laptop		=	pc+ie(basic)
+  *		ie		CloGaelachLaptop		=	pc+ie(CloGaelach)
+  *		in		urd		=	pc+in(urd-phonetic)
+  *		iu		basic		=	pc+ca(ike)
+  *		lo		basic		=	pc+la(basic)
+  *		kan		basic		=	pc+in(kan)
+  *		mal		basic		=	pc+in(mal)
+  *		mal		mlplusnum		=	pc+in(mal)
+  *		ogham		basic		=	pc+ie(ogam)
+  *		ogham		laptop		=	pc+ie(ogam)
+  *		ogham		is434		=	pc+ie(ogam_is434)
+  *		ogham		is434laptop		=	pc+ie(ogam_is434)
+  *		ori		basic		=	pc+in(ori)
+  *		ro		de		=	pc+ro(winkeys)
+  *		ro		us		=	pc+ro(std)
+  *		ro		academic		=	pc+ro(std)
+  *		ro		std_comma		=	pc+ro(std)
+  *		ro		comma		=	pc+ro(basic)
+  *		ru		os		=	pc+ru(os_legacy)
+  *		pk		urd		=	pc+pk(urd-phonetic)
+  *		sapmi		basic		=	pc+no(smi)
+  *		sapmi		nodeadkeys		=	pc+no(smi_nodeadkeys)
+  *		sapmi		sefi		=	pc+fi(smi)
+  *		sin		phonetic-static		=	pc+in(sin_phonetic)
+  *		syr		basic		=	pc+sy(syc)
+  *		syr		phonetic		=	pc+sy(syc_phonetic)
+  *		tam		INSCRIPT		=	pc+in(tam)
+  *		tam		UNI		=	pc+in(tam_unicode)
+  *		tam		NUMERAL-KEYBOARD		=	pc+in(tam_keyboard_with_numerals)
+  *		tam		TAB		=	pc+in(tam_TAB)
+  *		tam		TSCII		=	pc+in(tam_TSCII)
+  *		tel		basic		=	pc+in(tel)
+  *		yu		basic		=	pc+srp(latin)
+  *		yu		unicode		=	pc+srp(latinunicode)
+  *		yu		yz		=	pc+srp(latinyz)
+  *		yu		unicodeyz		=	pc+srp(latinunicodeyz)
+  classmate	us		intl		=	pc+us(classmate-intl)
+  classmate	us		alt-intl	=	pc+us(classmate-alt-intl)
+  classmate	us		altgr-intl	=	pc+us(classmate-altgr-intl)
+  nokiarx51	cz		qwerty		=	nokia_vndr/rx-51(cz_qwerty)
+
+! model		layout				=	symbols
+  *		ar			=	pc+ara
+  *		ben			=	pc+in(ben)
+  *		bs			=	pc+ba
+  *		cs			=	pc+rs
+  *		cz_qwerty			=	pc+cz(qwerty)
+  *		dev			=	pc+in(deva)
+  *		dvorak			=	pc+us(dvorak)
+  *		dzdwi			=	pc+bt
+  *		el			=	pc+gr
+  *		en_US			=	pc+latin
+  *		guj			=	pc+in(guj)
+  *		gur			=	pc+in(guru)
+  *		iu			=	pc+ca(ike)
+  *		lo			=	pc+la
+  *		kan			=	pc+in(kan)
+  *		mi			=	pc+mao
+  *		ml			=	pc+in(mal)
+  *		ogham			=	pc+ie(ogam)
+  *		ori			=	pc+ie(ori)
+  *		sapmi			=	pc+no(smi)
+  *		sr			=	pc+srp
+  *		syr			=	pc+sy(syc)
+  *		tel			=	pc+in(tel)
+  *		tml			=	pc+in(tam)
+  *		yu			=	pc+srp
+  *		fr-latin9			=	pc+fr(latin9)
+  *		us_intl			=	pc+us(alt-intl)
+  *		ben(basic)			=	pc+in(ben)
+  *		ben(probhat)			=	pc+in(ben_probhat)
+  *		dev(basic)			=	pc+in(deva)
+  *		dvorak($dvoraklayouts)			=	pc+%v(dvorak)
+  *		dvorak(basic)			=	pc+us(dvorak)
+  *		dvorak(pl_basic)			=	pc+pl(dvorak)
+  *		dvorak(pl)			=	pc+pl(dvorak_quotes)
+  *		dvorak(pl_altquotes)			=	pc+pl(dvorak_altquotes)
+  *		dzdwi(basic)			=	pc+bt(basic)
+  *		fi(basic)			=	pc+fi(classic)
+  *		ge(azerty_tskapo)			=	pc+fr(geo)
+  *		guj(basic)			=	pc+in(guj)
+  *		gur(basic)			=	pc+in(guru)
+  *		ie(laptop)			=	pc+ie(basic)
+  *		ie(CloGaelachLaptop)			=	pc+ie(CloGaelach)
+  *		in(urd)			=	pc+in(urd-phonetic)
+  *		iu(basic)			=	pc+ca(ike)
+  *		lo(basic)			=	pc+la(basic)
+  *		kan(basic)			=	pc+in(kan)
+  *		mal(basic)			=	pc+in(mal)
+  *		mal(mlplusnum)			=	pc+in(mal)
+  *		ogham(basic)			=	pc+ie(ogam)
+  *		ogham(laptop)			=	pc+ie(ogam)
+  *		ogham(is434)			=	pc+ie(ogam_is434)
+  *		ogham(is434laptop)			=	pc+ie(ogam_is434)
+  *		ori(basic)			=	pc+in(ori)
+  *		ro(de)			=	pc+ro(winkeys)
+  *		ro(us)			=	pc+ro(std)
+  *		ro(academic)			=	pc+ro(std)
+  *		ro(std_comma)			=	pc+ro(std)
+  *		ro(comma)			=	pc+ro(basic)
+  *		ru(os)			=	pc+ru(os_legacy)
+  *		pk(urd)			=	pc+pk(urd-phonetic)
+  *		sapmi(basic)			=	pc+no(smi)
+  *		sapmi(nodeadkeys)			=	pc+no(smi_nodeadkeys)
+  *		sapmi(sefi)			=	pc+fi(smi)
+  *		sin(phonetic-static)			=	pc+in(sin_phonetic)
+  *		syr(basic)			=	pc+sy(syc)
+  *		syr(phonetic)			=	pc+sy(syc_phonetic)
+  *		tam(INSCRIPT)			=	pc+in(tam)
+  *		tam(UNI)			=	pc+in(tam_unicode)
+  *		tam(NUMERAL-KEYBOARD)			=	pc+in(tam_keyboard_with_numerals)
+  *		tam(TAB)			=	pc+in(tam_TAB)
+  *		tam(TSCII)			=	pc+in(tam_TSCII)
+  *		tel(basic)			=	pc+in(tel)
+  *		yu(basic)			=	pc+srp(latin)
+  *		yu(unicode)			=	pc+srp(latinunicode)
+  *		yu(yz)			=	pc+srp(latinyz)
+  *		yu(unicodeyz)			=	pc+srp(latinunicodeyz)
+  ataritt	$nonlatin		=	xfree68_vndr/ataritt(us)+%l%(v):2
+  ataritt	*			=	xfree68_vndr/ataritt(us)+%l%(v)
+  amiga		$nonlatin		=	xfree68_vndr/amiga(usa1)+%l%(v):2
+  amiga		*			=	xfree68_vndr/amiga(usa1)+%l%(v)
+  classmate	us			=	pc+%l(classmate)
+  empty         *                       =       empty(basic)
+  *             empty                   =       empty(basic)
+  sun4		$nonlatin		=	latin+sun_vndr/us(type4)+%l%(v):2
+  sun4		*			=	latin+sun_vndr/us(type4)+%l%(v)
+  sun5		$nonlatin		=	latin+sun_vndr/us(type5)+%l%(v):2
+  sun5		*			=	latin+sun_vndr/us(type5)+%l%(v)
+  sun6		us			=	pc+sun_vndr/us(type6)
+  sun6		en_US			=	pc+sun_vndr/us(type6)+iso9995-3(basic)
+  sun6		$sun_t6_custom		=	pc+sun_vndr/us(type6)+sun_vndr/%l%(v)
+  sun6		*			=	pc+sun_vndr/us(type6)+%l%(v)
+  sun6euro	us			=	pc+sun_vndr/us(type6)
+  sun6euro	en_US			=	pc+sun_vndr/us(type6)+iso9995-3(basic)
+  sun6euro	$sun_t6_custom		=	pc+sun_vndr/us(type6)+sun_vndr/%l%(v)
+  sun6euro	*			=	pc+sun_vndr/us(type6)+%l%(v)
+  pc98		nec_vndr/jp		=	nec_vndr/jp(pc98)
+  macintosh_old	us			=	macintosh_vndr/us(oldmac)
+  macintosh_old	en_US			=	macintosh_vndr/us(oldmac)
+  macintosh_old	$macvendorlayouts	=	macintosh_vndr/us(oldmac)+macintosh_vndr/%l%(v)
+  macintosh_old	$nonlatin		=	macintosh_vndr/us(oldmac)+%l%(v):2
+  macintosh_old	*			=	macintosh_vndr/us(oldmac)+%l%(v)
+  applealu_jis	jp			=	macintosh_vndr/apple(alukbd)+macintosh_vndr/jp(usmac)+macintosh_vndr/jp(mac):2
+  applealu_jis	*			=	macintosh_vndr/apple(alukbd)+%l%(v)+macintosh_vndr/jp(mac):2
+ $applealu	$macvendorlayouts	=	macintosh_vndr/apple(alukbd)+macintosh_vndr/%l%(v)
+ $applealu	*			=	macintosh_vndr/apple(alukbd)+%l%(v)
+ $macs		en_US			=	pc+macintosh_vndr/us(extended)
+ $macs		$macvendorlayouts	=	pc+macintosh_vndr/%l%(v)
+  nokiarx44	*			=	nokia_vndr/rx-44(%l)
+  nokiarx51	cz(qwerty)		=	nokia_vndr/rx-51(common)+nokia_vndr/rx-51(cz_qwerty)
+  nokiarx51	*			=	nokia_vndr/rx-51(common)+nokia_vndr/rx-51(%l%_v)
+  nokiasu8w	*			=	nokia_vndr/su-8w(%l)
+  olpc		$olpclayouts		=	olpc+%l%(m)
+  olpc		*			=	olpc+%l%(v)
+ $thinkpads   	br			=	pc+br(thinkpad)
+  htcdream	$htcdreamlayouts	=	%l(htcdream)
+  *	   	$nonlatin		=	pc+us+%l%(v):2
+  *		*			=	pc+%l%(v)
+
+! model		layout[1]			=	symbols
+  *		ar			=	pc+ara%(v[1])
+  *		ben			=	pc+in(ben)
+  *		bs			=	pc+ba%(v[1])
+  *		cs			=	pc+rs%(v[1])
+  *		cz_qwerty			=	pc+cz(qwerty)
+  *		dev			=	pc+in(deva)
+  *		dvorak			=	pc+us(dvorak)
+  *		dzdwi			=	pc+bt%(v[1])
+  *		el			=	pc+gr%(v[1])
+  *		en_US			=	pc+latin%(v[1])
+  *		guj			=	pc+in(guj)
+  *		gur			=	pc+in(guru)
+  *		iu			=	pc+ca(ike)
+  *		lo			=	pc+la%(v[1])
+  *		kan			=	pc+in(kan)
+  *		mi			=	pc+mao%(v[1])
+  *		ml			=	pc+in(mal)
+  *		ogham			=	pc+ie(ogam)
+  *		ori			=	pc+ie(ori)
+  *		sapmi			=	pc+no(smi)
+  *		sr			=	pc+srp%(v[1])
+  *		syr			=	pc+sy(syc)
+  *		tel			=	pc+in(tel)
+  *		tml			=	pc+in(tam)
+  *		yu			=	pc+srp%(v[1])
+  *		fr-latin9			=	pc+fr(latin9)
+  *		us_intl			=	pc+us(alt-intl)
+  *		ben(basic)			=	pc+in(ben)
+  *		ben(probhat)			=	pc+in(ben_probhat)
+  *		dev(basic)			=	pc+in(deva)
+  *		dvorak($dvoraklayouts)			=	pc+%v(dvorak)
+  *		dvorak(basic)			=	pc+us(dvorak)
+  *		dvorak(pl_basic)			=	pc+pl(dvorak)
+  *		dvorak(pl)			=	pc+pl(dvorak_quotes)
+  *		dvorak(pl_altquotes)			=	pc+pl(dvorak_altquotes)
+  *		dzdwi(basic)			=	pc+bt(basic)
+  *		fi(basic)			=	pc+fi(classic)
+  *		ge(azerty_tskapo)			=	pc+fr(geo)
+  *		guj(basic)			=	pc+in(guj)
+  *		gur(basic)			=	pc+in(guru)
+  *		ie(laptop)			=	pc+ie(basic)
+  *		ie(CloGaelachLaptop)			=	pc+ie(CloGaelach)
+  *		in(urd)			=	pc+in(urd-phonetic)
+  *		iu(basic)			=	pc+ca(ike)
+  *		lo(basic)			=	pc+la(basic)
+  *		kan(basic)			=	pc+in(kan)
+  *		mal(basic)			=	pc+in(mal)
+  *		mal(mlplusnum)			=	pc+in(mal)
+  *		ogham(basic)			=	pc+ie(ogam)
+  *		ogham(laptop)			=	pc+ie(ogam)
+  *		ogham(is434)			=	pc+ie(ogam_is434)
+  *		ogham(is434laptop)			=	pc+ie(ogam_is434)
+  *		ori(basic)			=	pc+in(ori)
+  *		ro(de)			=	pc+ro(winkeys)
+  *		ro(us)			=	pc+ro(std)
+  *		ro(academic)			=	pc+ro(std)
+  *		ro(std_comma)			=	pc+ro(std)
+  *		ro(comma)			=	pc+ro(basic)
+  *		ru(os)			=	pc+ru(os_legacy)
+  *		pk(urd)			=	pc+pk(urd-phonetic)
+  *		sapmi(basic)			=	pc+no(smi)
+  *		sapmi(nodeadkeys)			=	pc+no(smi_nodeadkeys)
+  *		sapmi(sefi)			=	pc+fi(smi)
+  *		sin(phonetic-static)			=	pc+in(sin_phonetic)
+  *		syr(basic)			=	pc+sy(syc)
+  *		syr(phonetic)			=	pc+sy(syc_phonetic)
+  *		tam(INSCRIPT)			=	pc+in(tam)
+  *		tam(UNI)			=	pc+in(tam_unicode)
+  *		tam(NUMERAL-KEYBOARD)			=	pc+in(tam_keyboard_with_numerals)
+  *		tam(TAB)			=	pc+in(tam_TAB)
+  *		tam(TSCII)			=	pc+in(tam_TSCII)
+  *		tel(basic)			=	pc+in(tel)
+  *		yu(basic)			=	pc+srp(latin)
+  *		yu(unicode)			=	pc+srp(latinunicode)
+  *		yu(yz)			=	pc+srp(latinyz)
+  *		yu(unicodeyz)			=	pc+srp(latinunicodeyz)
+  ataritt	*			=	xfree68_vndr/ataritt(us)+%l[1]%(v[1])
+  amiga		*			=	xfree68_vndr/amiga(usa1)+%l[1]%(v[1])
+  sun4		*			=	latin+sun_vndr/us(type4)+%l[1]%(v[1])
+  sun5		*			=	latin+sun_vndr/us(type5)+%l[1]%(v[1])
+  macintosh_old	us			=	macintosh_vndr/us(oldmac)
+  macintosh_old	$macvendorlayouts	=	macintosh_vndr/us(oldmac)+macintosh_vndr/%l[1]%(v[1])
+  macintosh_old	*			=	macintosh_vndr/us(oldmac)+%l[1]%(v[1])
+  applealu_jis	us			=	macintosh_vndr/apple(alukbd)+macintosh_vndr/jp(usmac)
+ $applealu	$macvendorlayouts	=	macintosh_vndr/apple(alukbd)+macintosh_vndr/%l[1]%(v[1])
+ $applealu	*			=	macintosh_vndr/apple(alukbd)+%l[1]%(v[1])
+ $macs		$macvendorlayouts	=	pc+macintosh_vndr/%l[1]%(v[1])
+  nokiarx51	cz(qwerty)		=	nokia_vndr/rx-51(common)+nokia_vndr/rx-51(cz_qwerty)
+  nokiarx51	*			=	nokia_vndr/rx-51(common)+nokia_vndr/rx-51(%l[1]%_v[1])
+ $thinkpads	br			=	pc+%l[1](thinkpad)
+  *		*			=	pc+%l[1]%(v[1])
+
+! model		layout[1]	variant[1]	=	symbols
+  *		ben		basic		=	pc+in(ben)
+  *		ben		probhat		=	pc+in(ben_probhat)
+  *		dev		basic		=	pc+in(deva)
+  *		dvorak		$dvoraklayouts		=	pc+%v(dvorak)
+  *		dvorak		basic		=	pc+us(dvorak)
+  *		dvorak		pl_basic		=	pc+pl(dvorak)
+  *		dvorak		pl		=	pc+pl(dvorak_quotes)
+  *		dvorak		pl_altquotes		=	pc+pl(dvorak_altquotes)
+  *		dzdwi		basic		=	pc+bt(basic)
+  *		fi		basic		=	pc+fi(classic)
+  *		ge		azerty_tskapo		=	pc+fr(geo)
+  *		guj		basic		=	pc+in(guj)
+  *		gur		basic		=	pc+in(guru)
+  *		ie		laptop		=	pc+ie(basic)
+  *		ie		CloGaelachLaptop		=	pc+ie(CloGaelach)
+  *		in		urd		=	pc+in(urd-phonetic)
+  *		iu		basic		=	pc+ca(ike)
+  *		lo		basic		=	pc+la(basic)
+  *		kan		basic		=	pc+in(kan)
+  *		mal		basic		=	pc+in(mal)
+  *		mal		mlplusnum		=	pc+in(mal)
+  *		ogham		basic		=	pc+ie(ogam)
+  *		ogham		laptop		=	pc+ie(ogam)
+  *		ogham		is434		=	pc+ie(ogam_is434)
+  *		ogham		is434laptop		=	pc+ie(ogam_is434)
+  *		ori		basic		=	pc+in(ori)
+  *		ro		de		=	pc+ro(winkeys)
+  *		ro		us		=	pc+ro(std)
+  *		ro		academic		=	pc+ro(std)
+  *		ro		std_comma		=	pc+ro(std)
+  *		ro		comma		=	pc+ro(basic)
+  *		ru		os		=	pc+ru(os_legacy)
+  *		pk		urd		=	pc+pk(urd-phonetic)
+  *		sapmi		basic		=	pc+no(smi)
+  *		sapmi		nodeadkeys		=	pc+no(smi_nodeadkeys)
+  *		sapmi		sefi		=	pc+fi(smi)
+  *		sin		phonetic-static		=	pc+in(sin_phonetic)
+  *		syr		basic		=	pc+sy(syc)
+  *		syr		phonetic		=	pc+sy(syc_phonetic)
+  *		tam		INSCRIPT		=	pc+in(tam)
+  *		tam		UNI		=	pc+in(tam_unicode)
+  *		tam		NUMERAL-KEYBOARD		=	pc+in(tam_keyboard_with_numerals)
+  *		tam		TAB		=	pc+in(tam_TAB)
+  *		tam		TSCII		=	pc+in(tam_TSCII)
+  *		tel		basic		=	pc+in(tel)
+  *		yu		basic		=	pc+srp(latin)
+  *		yu		unicode		=	pc+srp(latinunicode)
+  *		yu		yz		=	pc+srp(latinyz)
+  *		yu		unicodeyz		=	pc+srp(latinunicodeyz)
+
+! model		layout[2]	=	symbols
+  *		ar		=	+ara%(v[2]):2
+  *		ben		=	+in(ben):2
+  *		bs		=	+ba%(v[2]):2
+  *		cs		=	+rs%(v[2]):2
+  *		cz_qwerty		=	+cz(qwerty):2
+  *		dev		=	+in(deva):2
+  *		dvorak		=	+us(dvorak):2
+  *		dzdwi		=	+bt%(v[2]):2
+  *		el		=	+gr%(v[2]):2
+  *		en_US		=	+latin%(v[2]):2
+  *		guj		=	+in(guj):2
+  *		gur		=	+in(guru):2
+  *		iu		=	+ca(ike):2
+  *		lo		=	+la%(v[2]):2
+  *		kan		=	+in(kan):2
+  *		mi		=	+mao%(v[2]):2
+  *		ml		=	+in(mal):2
+  *		ogham		=	+ie(ogam):2
+  *		ori		=	+ie(ori):2
+  *		sapmi		=	+no(smi):2
+  *		sr		=	+srp%(v[2]):2
+  *		syr		=	+sy(syc):2
+  *		tel		=	+in(tel):2
+  *		tml		=	+in(tam):2
+  *		yu		=	+srp%(v[2]):2
+  *		fr-latin9		=	+fr(latin9):2
+  *		us_intl		=	+us(alt-intl):2
+  *		ben(basic)	=	+in(ben):2
+  *		ben(probhat)	=	+in(ben_probhat):2
+  *		dev(basic)	=	+in(deva):2
+  *		dvorak($dvoraklayouts)	=	+%v(dvorak):2
+  *		dvorak(basic)	=	+us(dvorak):2
+  *		dvorak(pl_basic)	=	+pl(dvorak):2
+  *		dvorak(pl)	=	+pl(dvorak_quotes):2
+  *		dvorak(pl_altquotes)	=	+pl(dvorak_altquotes):2
+  *		dzdwi(basic)	=	+bt(basic):2
+  *		fi(basic)	=	+fi(classic):2
+  *		ge(azerty_tskapo)	=	+fr(geo):2
+  *		guj(basic)	=	+in(guj):2
+  *		gur(basic)	=	+in(guru):2
+  *		ie(laptop)	=	+ie(basic):2
+  *		ie(CloGaelachLaptop)	=	+ie(CloGaelach):2
+  *		in(urd)	=	+in(urd-phonetic):2
+  *		iu(basic)	=	+ca(ike):2
+  *		lo(basic)	=	+la(basic):2
+  *		kan(basic)	=	+in(kan):2
+  *		mal(basic)	=	+in(mal):2
+  *		mal(mlplusnum)	=	+in(mal):2
+  *		ogham(basic)	=	+ie(ogam):2
+  *		ogham(laptop)	=	+ie(ogam):2
+  *		ogham(is434)	=	+ie(ogam_is434):2
+  *		ogham(is434laptop)	=	+ie(ogam_is434):2
+  *		ori(basic)	=	+in(ori):2
+  *		ro(de)	=	+ro(winkeys):2
+  *		ro(us)	=	+ro(std):2
+  *		ro(academic)	=	+ro(std):2
+  *		ro(std_comma)	=	+ro(std):2
+  *		ro(comma)	=	+ro(basic):2
+  *		ru(os)	=	+ru(os_legacy):2
+  *		pk(urd)	=	+pk(urd-phonetic):2
+  *		sapmi(basic)	=	+no(smi):2
+  *		sapmi(nodeadkeys)	=	+no(smi_nodeadkeys):2
+  *		sapmi(sefi)	=	+fi(smi):2
+  *		sin(phonetic-static)	=	+in(sin_phonetic):2
+  *		syr(basic)	=	+sy(syc):2
+  *		syr(phonetic)	=	+sy(syc_phonetic):2
+  *		tam(INSCRIPT)	=	+in(tam):2
+  *		tam(UNI)	=	+in(tam_unicode):2
+  *		tam(NUMERAL-KEYBOARD)	=	+in(tam_keyboard_with_numerals):2
+  *		tam(TAB)	=	+in(tam_TAB):2
+  *		tam(TSCII)	=	+in(tam_TSCII):2
+  *		tel(basic)	=	+in(tel):2
+  *		yu(basic)	=	+srp(latin):2
+  *		yu(unicode)	=	+srp(latinunicode):2
+  *		yu(yz)	=	+srp(latinyz):2
+  *		yu(unicodeyz)	=	+srp(latinunicodeyz):2
+  nokiarx51	cz(qwerty)	=	+nokia_vndr/rx-51(cz_qwerty):2
+  nokiarx51	*		=	+nokia_vndr/rx-51(%l[2]%_v[2]):2
+  *		*		=	+%l[2]%(v[2]):2
+
+! model		layout[3]	=	symbols
+  *		ar		=	+ara%(v[3]):3
+  *		ben		=	+in(ben):3
+  *		bs		=	+ba%(v[3]):3
+  *		cs		=	+rs%(v[3]):3
+  *		cz_qwerty		=	+cz(qwerty):3
+  *		dev		=	+in(deva):3
+  *		dvorak		=	+us(dvorak):3
+  *		dzdwi		=	+bt%(v[3]):3
+  *		el		=	+gr%(v[3]):3
+  *		en_US		=	+latin%(v[3]):3
+  *		guj		=	+in(guj):3
+  *		gur		=	+in(guru):3
+  *		iu		=	+ca(ike):3
+  *		lo		=	+la%(v[3]):3
+  *		kan		=	+in(kan):3
+  *		mi		=	+mao%(v[3]):3
+  *		ml		=	+in(mal):3
+  *		ogham		=	+ie(ogam):3
+  *		ori		=	+ie(ori):3
+  *		sapmi		=	+no(smi):3
+  *		sr		=	+srp%(v[3]):3
+  *		syr		=	+sy(syc):3
+  *		tel		=	+in(tel):3
+  *		tml		=	+in(tam):3
+  *		yu		=	+srp%(v[3]):3
+  *		fr-latin9		=	+fr(latin9):3
+  *		us_intl		=	+us(alt-intl):3
+  *		ben(basic)	=	+in(ben):3
+  *		ben(probhat)	=	+in(ben_probhat):3
+  *		dev(basic)	=	+in(deva):3
+  *		dvorak($dvoraklayouts)	=	+%v(dvorak):3
+  *		dvorak(basic)	=	+us(dvorak):3
+  *		dvorak(pl_basic)	=	+pl(dvorak):3
+  *		dvorak(pl)	=	+pl(dvorak_quotes):3
+  *		dvorak(pl_altquotes)	=	+pl(dvorak_altquotes):3
+  *		dzdwi(basic)	=	+bt(basic):3
+  *		fi(basic)	=	+fi(classic):3
+  *		ge(azerty_tskapo)	=	+fr(geo):3
+  *		guj(basic)	=	+in(guj):3
+  *		gur(basic)	=	+in(guru):3
+  *		ie(laptop)	=	+ie(basic):3
+  *		ie(CloGaelachLaptop)	=	+ie(CloGaelach):3
+  *		in(urd)	=	+in(urd-phonetic):3
+  *		iu(basic)	=	+ca(ike):3
+  *		lo(basic)	=	+la(basic):3
+  *		kan(basic)	=	+in(kan):3
+  *		mal(basic)	=	+in(mal):3
+  *		mal(mlplusnum)	=	+in(mal):3
+  *		ogham(basic)	=	+ie(ogam):3
+  *		ogham(laptop)	=	+ie(ogam):3
+  *		ogham(is434)	=	+ie(ogam_is434):3
+  *		ogham(is434laptop)	=	+ie(ogam_is434):3
+  *		ori(basic)	=	+in(ori):3
+  *		ro(de)	=	+ro(winkeys):3
+  *		ro(us)	=	+ro(std):3
+  *		ro(academic)	=	+ro(std):3
+  *		ro(std_comma)	=	+ro(std):3
+  *		ro(comma)	=	+ro(basic):3
+  *		ru(os)	=	+ru(os_legacy):3
+  *		pk(urd)	=	+pk(urd-phonetic):3
+  *		sapmi(basic)	=	+no(smi):3
+  *		sapmi(nodeadkeys)	=	+no(smi_nodeadkeys):3
+  *		sapmi(sefi)	=	+fi(smi):3
+  *		sin(phonetic-static)	=	+in(sin_phonetic):3
+  *		syr(basic)	=	+sy(syc):3
+  *		syr(phonetic)	=	+sy(syc_phonetic):3
+  *		tam(INSCRIPT)	=	+in(tam):3
+  *		tam(UNI)	=	+in(tam_unicode):3
+  *		tam(NUMERAL-KEYBOARD)	=	+in(tam_keyboard_with_numerals):3
+  *		tam(TAB)	=	+in(tam_TAB):3
+  *		tam(TSCII)	=	+in(tam_TSCII):3
+  *		tel(basic)	=	+in(tel):3
+  *		yu(basic)	=	+srp(latin):3
+  *		yu(unicode)	=	+srp(latinunicode):3
+  *		yu(yz)	=	+srp(latinyz):3
+  *		yu(unicodeyz)	=	+srp(latinunicodeyz):3
+  nokiarx51	cz(qwerty)	=	+nokia_vndr/rx-51(cz_qwerty):3
+  nokiarx51	*		=	+nokia_vndr/rx-51(%l[3]%_v[3]):3
+  *		*		=	+%l[3]%(v[3]):3
+
+! model		layout[4]	=	symbols
+  *		ar		=	+ara%(v[4]):4
+  *		ben		=	+in(ben):4
+  *		bs		=	+ba%(v[4]):4
+  *		cs		=	+rs%(v[4]):4
+  *		cz_qwerty		=	+cz(qwerty):4
+  *		dev		=	+in(deva):4
+  *		dvorak		=	+us(dvorak):4
+  *		dzdwi		=	+bt%(v[4]):4
+  *		el		=	+gr%(v[4]):4
+  *		en_US		=	+latin%(v[4]):4
+  *		guj		=	+in(guj):4
+  *		gur		=	+in(guru):4
+  *		iu		=	+ca(ike):4
+  *		lo		=	+la%(v[4]):4
+  *		kan		=	+in(kan):4
+  *		mi		=	+mao%(v[4]):4
+  *		ml		=	+in(mal):4
+  *		ogham		=	+ie(ogam):4
+  *		ori		=	+ie(ori):4
+  *		sapmi		=	+no(smi):4
+  *		sr		=	+srp%(v[4]):4
+  *		syr		=	+sy(syc):4
+  *		tel		=	+in(tel):4
+  *		tml		=	+in(tam):4
+  *		yu		=	+srp%(v[4]):4
+  *		fr-latin9		=	+fr(latin9):4
+  *		us_intl		=	+us(alt-intl):4
+  *		ben(basic)	=	+in(ben):4
+  *		ben(probhat)	=	+in(ben_probhat):4
+  *		dev(basic)	=	+in(deva):4
+  *		dvorak($dvoraklayouts)	=	+%v(dvorak):4
+  *		dvorak(basic)	=	+us(dvorak):4
+  *		dvorak(pl_basic)	=	+pl(dvorak):4
+  *		dvorak(pl)	=	+pl(dvorak_quotes):4
+  *		dvorak(pl_altquotes)	=	+pl(dvorak_altquotes):4
+  *		dzdwi(basic)	=	+bt(basic):4
+  *		fi(basic)	=	+fi(classic):4
+  *		ge(azerty_tskapo)	=	+fr(geo):4
+  *		guj(basic)	=	+in(guj):4
+  *		gur(basic)	=	+in(guru):4
+  *		ie(laptop)	=	+ie(basic):4
+  *		ie(CloGaelachLaptop)	=	+ie(CloGaelach):4
+  *		in(urd)	=	+in(urd-phonetic):4
+  *		iu(basic)	=	+ca(ike):4
+  *		lo(basic)	=	+la(basic):4
+  *		kan(basic)	=	+in(kan):4
+  *		mal(basic)	=	+in(mal):4
+  *		mal(mlplusnum)	=	+in(mal):4
+  *		ogham(basic)	=	+ie(ogam):4
+  *		ogham(laptop)	=	+ie(ogam):4
+  *		ogham(is434)	=	+ie(ogam_is434):4
+  *		ogham(is434laptop)	=	+ie(ogam_is434):4
+  *		ori(basic)	=	+in(ori):4
+  *		ro(de)	=	+ro(winkeys):4
+  *		ro(us)	=	+ro(std):4
+  *		ro(academic)	=	+ro(std):4
+  *		ro(std_comma)	=	+ro(std):4
+  *		ro(comma)	=	+ro(basic):4
+  *		ru(os)	=	+ru(os_legacy):4
+  *		pk(urd)	=	+pk(urd-phonetic):4
+  *		sapmi(basic)	=	+no(smi):4
+  *		sapmi(nodeadkeys)	=	+no(smi_nodeadkeys):4
+  *		sapmi(sefi)	=	+fi(smi):4
+  *		sin(phonetic-static)	=	+in(sin_phonetic):4
+  *		syr(basic)	=	+sy(syc):4
+  *		syr(phonetic)	=	+sy(syc_phonetic):4
+  *		tam(INSCRIPT)	=	+in(tam):4
+  *		tam(UNI)	=	+in(tam_unicode):4
+  *		tam(NUMERAL-KEYBOARD)	=	+in(tam_keyboard_with_numerals):4
+  *		tam(TAB)	=	+in(tam_TAB):4
+  *		tam(TSCII)	=	+in(tam_TSCII):4
+  *		tel(basic)	=	+in(tel):4
+  *		yu(basic)	=	+srp(latin):4
+  *		yu(unicode)	=	+srp(latinunicode):4
+  *		yu(yz)	=	+srp(latinyz):4
+  *		yu(unicodeyz)	=	+srp(latinunicodeyz):4
+  nokiarx51	cz(qwerty)	=	+nokia_vndr/rx-51(cz_qwerty):4
+  nokiarx51	*		=	+nokia_vndr/rx-51(%l[4]%_v[4]):4
+  *		*		=	+%l[4]%(v[4]):4
+
+! model		layout[2]	variant[2]	=	symbols
+  *		ben		basic	=	+in(ben):2
+  *		ben		probhat	=	+in(ben_probhat):2
+  *		dev		basic	=	+in(deva):2
+  *		dvorak		$dvoraklayouts	=	+%v(dvorak):2
+  *		dvorak		basic	=	+us(dvorak):2
+  *		dvorak		pl_basic	=	+pl(dvorak):2
+  *		dvorak		pl	=	+pl(dvorak_quotes):2
+  *		dvorak		pl_altquotes	=	+pl(dvorak_altquotes):2
+  *		dzdwi		basic	=	+bt(basic):2
+  *		fi		basic	=	+fi(classic):2
+  *		ge		azerty_tskapo	=	+fr(geo):2
+  *		guj		basic	=	+in(guj):2
+  *		gur		basic	=	+in(guru):2
+  *		ie		laptop	=	+ie(basic):2
+  *		ie		CloGaelachLaptop	=	+ie(CloGaelach):2
+  *		in		urd	=	+in(urd-phonetic):2
+  *		iu		basic	=	+ca(ike):2
+  *		lo		basic	=	+la(basic):2
+  *		kan		basic	=	+in(kan):2
+  *		mal		basic	=	+in(mal):2
+  *		mal		mlplusnum	=	+in(mal):2
+  *		ogham		basic	=	+ie(ogam):2
+  *		ogham		laptop	=	+ie(ogam):2
+  *		ogham		is434	=	+ie(ogam_is434):2
+  *		ogham		is434laptop	=	+ie(ogam_is434):2
+  *		ori		basic	=	+in(ori):2
+  *		ro		de	=	+ro(winkeys):2
+  *		ro		us	=	+ro(std):2
+  *		ro		academic	=	+ro(std):2
+  *		ro		std_comma	=	+ro(std):2
+  *		ro		comma	=	+ro(basic):2
+  *		ru		os	=	+ru(os_legacy):2
+  *		pk		urd	=	+pk(urd-phonetic):2
+  *		sapmi		basic	=	+no(smi):2
+  *		sapmi		nodeadkeys	=	+no(smi_nodeadkeys):2
+  *		sapmi		sefi	=	+fi(smi):2
+  *		sin		phonetic-static	=	+in(sin_phonetic):2
+  *		syr		basic	=	+sy(syc):2
+  *		syr		phonetic	=	+sy(syc_phonetic):2
+  *		tam		INSCRIPT	=	+in(tam):2
+  *		tam		UNI	=	+in(tam_unicode):2
+  *		tam		NUMERAL-KEYBOARD	=	+in(tam_keyboard_with_numerals):2
+  *		tam		TAB	=	+in(tam_TAB):2
+  *		tam		TSCII	=	+in(tam_TSCII):2
+  *		tel		basic	=	+in(tel):2
+  *		yu		basic	=	+srp(latin):2
+  *		yu		unicode	=	+srp(latinunicode):2
+  *		yu		yz	=	+srp(latinyz):2
+  *		yu		unicodeyz	=	+srp(latinunicodeyz):2
+
+! model		layout[3]	variant[3]	=	symbols
+  *		ben		basic	=	+in(ben):3
+  *		ben		probhat	=	+in(ben_probhat):3
+  *		dev		basic	=	+in(deva):3
+  *		dvorak		$dvoraklayouts	=	+%v(dvorak):3
+  *		dvorak		basic	=	+us(dvorak):3
+  *		dvorak		pl_basic	=	+pl(dvorak):3
+  *		dvorak		pl	=	+pl(dvorak_quotes):3
+  *		dvorak		pl_altquotes	=	+pl(dvorak_altquotes):3
+  *		dzdwi		basic	=	+bt(basic):3
+  *		fi		basic	=	+fi(classic):3
+  *		ge		azerty_tskapo	=	+fr(geo):3
+  *		guj		basic	=	+in(guj):3
+  *		gur		basic	=	+in(guru):3
+  *		ie		laptop	=	+ie(basic):3
+  *		ie		CloGaelachLaptop	=	+ie(CloGaelach):3
+  *		in		urd	=	+in(urd-phonetic):3
+  *		iu		basic	=	+ca(ike):3
+  *		lo		basic	=	+la(basic):3
+  *		kan		basic	=	+in(kan):3
+  *		mal		basic	=	+in(mal):3
+  *		mal		mlplusnum	=	+in(mal):3
+  *		ogham		basic	=	+ie(ogam):3
+  *		ogham		laptop	=	+ie(ogam):3
+  *		ogham		is434	=	+ie(ogam_is434):3
+  *		ogham		is434laptop	=	+ie(ogam_is434):3
+  *		ori		basic	=	+in(ori):3
+  *		ro		de	=	+ro(winkeys):3
+  *		ro		us	=	+ro(std):3
+  *		ro		academic	=	+ro(std):3
+  *		ro		std_comma	=	+ro(std):3
+  *		ro		comma	=	+ro(basic):3
+  *		ru		os	=	+ru(os_legacy):3
+  *		pk		urd	=	+pk(urd-phonetic):3
+  *		sapmi		basic	=	+no(smi):3
+  *		sapmi		nodeadkeys	=	+no(smi_nodeadkeys):3
+  *		sapmi		sefi	=	+fi(smi):3
+  *		sin		phonetic-static	=	+in(sin_phonetic):3
+  *		syr		basic	=	+sy(syc):3
+  *		syr		phonetic	=	+sy(syc_phonetic):3
+  *		tam		INSCRIPT	=	+in(tam):3
+  *		tam		UNI	=	+in(tam_unicode):3
+  *		tam		NUMERAL-KEYBOARD	=	+in(tam_keyboard_with_numerals):3
+  *		tam		TAB	=	+in(tam_TAB):3
+  *		tam		TSCII	=	+in(tam_TSCII):3
+  *		tel		basic	=	+in(tel):3
+  *		yu		basic	=	+srp(latin):3
+  *		yu		unicode	=	+srp(latinunicode):3
+  *		yu		yz	=	+srp(latinyz):3
+  *		yu		unicodeyz	=	+srp(latinunicodeyz):3
+
+! model		layout[4]	variant[4]	=	symbols
+  *		ben		basic	=	+in(ben):4
+  *		ben		probhat	=	+in(ben_probhat):4
+  *		dev		basic	=	+in(deva):4
+  *		dvorak		$dvoraklayouts	=	+%v(dvorak):4
+  *		dvorak		basic	=	+us(dvorak):4
+  *		dvorak		pl_basic	=	+pl(dvorak):4
+  *		dvorak		pl	=	+pl(dvorak_quotes):4
+  *		dvorak		pl_altquotes	=	+pl(dvorak_altquotes):4
+  *		dzdwi		basic	=	+bt(basic):4
+  *		fi		basic	=	+fi(classic):4
+  *		ge		azerty_tskapo	=	+fr(geo):4
+  *		guj		basic	=	+in(guj):4
+  *		gur		basic	=	+in(guru):4
+  *		ie		laptop	=	+ie(basic):4
+  *		ie		CloGaelachLaptop	=	+ie(CloGaelach):4
+  *		in		urd	=	+in(urd-phonetic):4
+  *		iu		basic	=	+ca(ike):4
+  *		lo		basic	=	+la(basic):4
+  *		kan		basic	=	+in(kan):4
+  *		mal		basic	=	+in(mal):4
+  *		mal		mlplusnum	=	+in(mal):4
+  *		ogham		basic	=	+ie(ogam):4
+  *		ogham		laptop	=	+ie(ogam):4
+  *		ogham		is434	=	+ie(ogam_is434):4
+  *		ogham		is434laptop	=	+ie(ogam_is434):4
+  *		ori		basic	=	+in(ori):4
+  *		ro		de	=	+ro(winkeys):4
+  *		ro		us	=	+ro(std):4
+  *		ro		academic	=	+ro(std):4
+  *		ro		std_comma	=	+ro(std):4
+  *		ro		comma	=	+ro(basic):4
+  *		ru		os	=	+ru(os_legacy):4
+  *		pk		urd	=	+pk(urd-phonetic):4
+  *		sapmi		basic	=	+no(smi):4
+  *		sapmi		nodeadkeys	=	+no(smi_nodeadkeys):4
+  *		sapmi		sefi	=	+fi(smi):4
+  *		sin		phonetic-static	=	+in(sin_phonetic):4
+  *		syr		basic	=	+sy(syc):4
+  *		syr		phonetic	=	+sy(syc_phonetic):4
+  *		tam		INSCRIPT	=	+in(tam):4
+  *		tam		UNI	=	+in(tam_unicode):4
+  *		tam		NUMERAL-KEYBOARD	=	+in(tam_keyboard_with_numerals):4
+  *		tam		TAB	=	+in(tam_TAB):4
+  *		tam		TSCII	=	+in(tam_TSCII):4
+  *		tel		basic	=	+in(tel):4
+  *		yu		basic	=	+srp(latin):4
+  *		yu		unicode	=	+srp(latinunicode):4
+  *		yu		yz	=	+srp(latinyz):4
+  *		yu		unicodeyz	=	+srp(latinunicodeyz):4
+
+! model		=	symbols
+  $evdevkbds    =   +inet(evdev)+inet(%m)
+  applealu_jis  =   +inet(evdev)+macintosh_vndr/jp(alujiskeys)
+  *             =   +inet(evdev)
+
+! layout	variant		=	compat
+  de		neo			=	+caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock)
+
+! layout[1]	variant[1]	=	compat
+  de		neo			=	+caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock)
+
+! layout[2]	variant[2]	=	compat
+  de		neo			=	+caps(caps_lock):2+misc(assign_shift_left_action):2+level5(level5_lock):2
+
+! layout[3]	variant[3]	=	compat
+  de		neo			=	+caps(caps_lock):3+misc(assign_shift_left_action):3+level5(level5_lock):3
+
+! layout[4]	variant[4]	=	compat
+  de		neo			=	+caps(caps_lock):4+misc(assign_shift_left_action):4+level5(level5_lock):4
+
+! model		layout		=	compat
+  pc98		nec_vndr/jp	=	pc98(basic)
+  *		jp		=	complete+japan
+  olpc         *               =       olpc
+  *		*		=	complete
+
+! model		layout[1]	=	compat
+  *		*		=	complete
+
+! model		=	types
+  $macs		=	complete+numpad(mac)
+  $applealu	=	complete+numpad(mac)
+  $nokiamodels	=	complete+nokia
+  *		=	complete
+
+! layout	option	=	symbols
+  $threelevellayouts	grp:alts_toggle = +level3(ralt_switch_for_alts_toggle)
+  *			misc:typo 	= +typo(base)
+
+! layout[1]	option	=	symbols
+  $threelevellayouts	grp:alts_toggle = +level3(ralt_switch_for_alts_toggle):1
+  *			misc:typo 	= +typo(base):1
+
+! layout[2]	option	=	symbols
+  $threelevellayouts	grp:alts_toggle = +level3(ralt_switch_for_alts_toggle):2
+  *			misc:typo 	= +typo(base):2
+
+! layout[3]	option	=	symbols
+  $threelevellayouts	grp:alts_toggle = +level3(ralt_switch_for_alts_toggle):3
+  *			misc:typo 	= +typo(base):3
+
+! layout[4]	option	=	symbols
+  $threelevellayouts	grp:alts_toggle = +level3(ralt_switch_for_alts_toggle):4
+  *			misc:typo 	= +typo(base):4
+
+! option	=	symbols
+  grp:shift_toggle	=	+group(shifts_toggle)
+  altwin:menu		=	+altwin(menu)
+  altwin:meta_alt	=	+altwin(meta_alt)
+  altwin:ctrl_win	=	+altwin(ctrl_win)
+  altwin:ctrl_alt_win	=	+altwin(ctrl_alt_win)
+  altwin:meta_win	=	+altwin(meta_win)
+  altwin:left_meta_win	=	+altwin(left_meta_win)
+  altwin:hyper_win	=	+altwin(hyper_win)
+  altwin:alt_super_win	=	+altwin(alt_super_win)
+  altwin:swap_lalt_lwin	=	+altwin(swap_lalt_lwin)
+  grp:switch		=	+group(switch)
+  grp:lswitch		=	+group(lswitch)
+  grp:win_switch	=	+group(win_switch)
+  grp:lwin_switch	=	+group(lwin_switch)
+  grp:rwin_switch	=	+group(rwin_switch)
+  grp:toggle		=	+group(toggle)
+  grp:shifts_toggle	=	+group(shifts_toggle)
+  grp:ctrls_toggle	=	+group(ctrls_toggle)
+  grp:alts_toggle	=	+group(alts_toggle)
+  grp:caps_toggle	=	+capslock(grouplock)
+  grp:caps_switch       =       +capslock(groupshift)
+  grp:shift_caps_toggle	=	+group(shift_caps_toggle)
+  grp:shift_caps_switch	=	+group(shift_caps_switch)
+  grp:win_menu_switch	=	+group(win_menu_switch)
+  grp:alt_caps_toggle   =       +group(alt_caps_toggle)
+  grp:alt_space_toggle	=	+group(alt_space_toggle)
+  grp:menu_toggle	=	+group(menu_toggle)
+  grp:lwin_toggle	=	+group(lwin_toggle)
+  grp:rwin_toggle	=	+group(rwin_toggle)
+  grp:lshift_toggle	=	+group(lshift_toggle)
+  grp:rshift_toggle	=	+group(rshift_toggle)
+  grp:rctrl_switch	=	+group(rctrl_switch)
+  grp:lctrl_toggle	=	+group(lctrl_toggle)
+  grp:rctrl_toggle	=	+group(rctrl_toggle)
+  grp:lalt_toggle	=	+group(lalt_toggle)
+  grp:sclk_toggle	=	+group(sclk_toggle)
+  grp:lctrl_rctrl_switch	=	+group(lctrl_rctrl_switch)
+  grp:lctrl_lwin_rctrl_menu	=	+group(lctrl_lwin_rctrl_menu)
+  grp:lctrl_lalt_toggle	=	+group(lctrl_lalt_toggle)
+  grp:rctrl_ralt_toggle	=	+group(rctrl_ralt_toggle)
+  grp:ctrl_alt_toggle	=	+group(ctrl_alt_toggle)
+  grp:ctrl_alt_toggle_bidir	=	+group(ctrl_alt_toggle_bidir)
+  grp:lctrl_lshift_toggle	=	+group(lctrl_lshift_toggle)
+  grp:rctrl_rshift_toggle	=	+group(rctrl_rshift_toggle)
+  grp:ctrl_shift_toggle	=	+group(ctrl_shift_toggle)
+  grp:ctrl_shift_toggle_bidir	=	+group(ctrl_shift_toggle_bidir)
+  grp:lalt_lshift_toggle	=	+group(lalt_lshift_toggle)
+  grp:ralt_rshift_toggle	=	+group(ralt_rshift_toggle)
+  grp:alt_shift_toggle	=	+group(alt_shift_toggle)
+  grp:alt_shift_toggle_bidir	=	+group(alt_shift_toggle_bidir)
+  lv3:switch		=	+level3(switch)
+  lv3:ralt_switch	=	+level3(ralt_switch)
+  lv3:ralt_switch_multikey	=	+level3(ralt_switch_multikey)
+  lv3:ralt_alt		=	+level3(ralt_alt)
+  lv3:lalt_switch	=	+level3(lalt_switch)
+  lv3:alt_switch	=	+level3(alt_switch)
+  lv3:menu_switch	=	+level3(menu_switch)
+  lv3:win_switch	=	+level3(win_switch)
+  lv3:lwin_switch	=	+level3(lwin_switch)
+  lv3:rwin_switch	=	+level3(rwin_switch)
+  lv3:enter_switch	=	+level3(enter_switch)
+  caps:capslock		=	+capslock(capslock)
+  caps:numlock		=	+capslock(numlock)
+  caps:shiftlock	=	+capslock(shiftlock)
+  caps:swapescape	=	+capslock(swapescape)
+  caps:escape		=	+capslock(escape)
+  caps:backspace	=	+capslock(backspace)
+  caps:super		=	+capslock(super)
+  caps:hyper		=	+capslock(hyper)
+  caps:none		=	+capslock(none)
+  caps:ctrl_modifier	=	+capslock(ctrl_modifier)
+  ctrl:nocaps		=	+ctrl(nocaps)
+  ctrl:lctrl_meta	=	+ctrl(lctrl_meta)
+  ctrl:swapcaps		=	+ctrl(swapcaps)
+  ctrl:ac_ctrl		=	+ctrl(ac_ctrl)
+  ctrl:aa_ctrl		=	+ctrl(aa_ctrl)
+  ctrl:rctrl_ralt	=	+ctrl(rctrl_ralt)
+  ctrl:menu_rctrl	=	+ctrl(menu_rctrl)
+  ctrl:ralt_rctrl	=	+ctrl(ralt_rctrl)
+  compose:ralt		=	+compose(ralt)
+  compose:lwin		=	+compose(lwin)
+  compose:rwin		=	+compose(rwin)
+  compose:menu		=	+compose(menu)
+  compose:lctrl		=	+compose(lctrl)
+  compose:rctrl		=	+compose(rctrl)
+  compose:caps		=	+compose(caps)
+  compose:102		=	+compose(102)
+  compose:paus		=	+compose(paus)
+  compose:prsc		=	+compose(prsc)
+  compose:sclk		=	+compose(sclk)
+  srvrkeys:none		=	+srvr_ctrl(no_srvr_keys)
+  eurosign:e		=	+eurosign(e)
+  eurosign:2		=	+eurosign(2)
+  eurosign:4		=	+eurosign(4)
+  eurosign:5		=	+eurosign(5)
+  rupeesign:4           =       +rupeesign(4)
+  keypad:oss            =       +keypad(oss)
+  keypad:legacy         =	+keypad(legacy)
+  keypad:legacy_wang    =	+keypad(legacy_wang)
+  keypad:oss_wang       =	+keypad(oss_wang)
+  keypad:future         =	+keypad(future)
+  keypad:future_wang    =	+keypad(future_wang)
+  keypad:hex            =	+keypad(ops)+keypad(hex)
+  keypad:atm            =	+keypad(ops)+keypad(hex)+keypad(atm)  
+  nbsp:none             =	+nbsp(none)
+  nbsp:level2           =	+nbsp(level2)
+  nbsp:level3           =	+nbsp(level3)
+  nbsp:level3s          =	+nbsp(level3s)
+  nbsp:level3n          =	+nbsp(level3n)
+  nbsp:level4           =	+nbsp(level4)
+  nbsp:level4n          =	+nbsp(level4n)
+  nbsp:level4nl         =	+nbsp(level4nl)
+  japan:nicola_f_bs     =	+jp(nicola_f_bs)
+  japan:hztg_escape     =	+jp(hztg_escape)
+  kpdl:dot              =	+kpdl(dot)
+  kpdl:comma            =	+kpdl(comma)
+  kpdl:dotoss           =	+kpdl(dotoss)
+  kpdl:dotoss_latin9    =	+kpdl(dotoss_latin9)
+  kpdl:commaoss         =	+kpdl(commaoss)
+  kpdl:momayyezoss      =	+kpdl(momayyezoss)
+  kpdl:kposs            =	+kpdl(kposs)
+  kpdl:semi             =	+kpdl(semi)
+  shift:breaks_caps     =	+shift(breaks_caps)
+  esperanto:qwerty      =	+epo(qwerty)
+  esperanto:dvorak      =	+epo(dvorak)
+  terminate:ctrl_alt_bksp =	+terminate(ctrl_alt_bksp)
+  keypad:pointerkeys	=	+keypad(pointerkeys)
+  apple:alupckeys	=	+macintosh_vndr/apple(alupckeys)
+  shift:both_capslock                =       +shift(both_capslock)
+  shift:lshift_both_capslock         =       +shift(lshift_both_capslock)
+  shift:rshift_both_capslock         =       +shift(rshift_both_capslock)
+  shift:both_capslock_cancel         =       +shift(both_capslock_cancel)
+  shift:lshift_both_capslock_cancel  =       +shift(lshift_both_capslock_cancel)
+  shift:rshift_both_capslock_cancel  =       +shift(rshift_both_capslock_cancel)
+  shift:both_shiftlock               =       +shift(both_shiftlock)
+  shift:lshift_both_shiftlock        =       +shift(lshift_both_shiftlock)
+  shift:rshift_both_shiftlock        =       +shift(rshift_both_shiftlock)
+  lv3:caps_switch                    =       +level3(caps_switch)
+  lv3:bksl_switch                    =       +level3(bksl_switch)
+  lv3:lsgt_switch                    =       +level3(lsgt_switch)
+  lv3:caps_switch_latch              =       +level3(caps_switch_latch)
+  lv3:bksl_switch_latch              =       +level3(bksl_switch_latch)
+  lv3:lsgt_switch_latch              =       +level3(lsgt_switch_latch)
+  lv5:lsgt_switch_lock            =       +level5(lsgt_switch_lock)
+  lv5:ralt_switch_lock            =       +level5(ralt_switch_lock)
+  lv5:lwin_switch_lock            =       +level5(lwin_switch_lock)
+  lv5:rwin_switch_lock            =       +level5(rwin_switch_lock)
+  lv5:lsgt_switch_lock_cancel     =       +level5(lsgt_switch_lock_cancel)
+  lv5:ralt_switch_lock_cancel     =       +level5(ralt_switch_lock_cancel)
+  lv5:lwin_switch_lock_cancel     =       +level5(lwin_switch_lock_cancel)
+  lv5:rwin_switch_lock_cancel     =       +level5(rwin_switch_lock_cancel)
+
+
+
+! option	=	compat
+  grp_led:num		=	+lednum(group_lock)
+  grp_led:caps		=	+ledcaps(group_lock)
+  grp_led:scroll	=	+ledscroll(group_lock)
+  caps:shiftlock	=	+ledcaps(shift_lock)
+  grab:break_actions    =       +xfree86(grab_break)