-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathnox11_funcs.h
2822 lines (2799 loc) · 131 KB
/
nox11_funcs.h
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
#if 0
generated by util script makekeysyms.pl:
-----
#!/usr/bin/perl
print "#if 0\n";
print "generated by util script makekeysyms.pl:\n\n";
print "-----\n";
system("cat $0");
print "-----\n";
print "#endif\n\n";
# probably should use rfb/keysym.h:
$file = shift;
$file = "/usr/X11R6/include/X11/keysymdef.h" unless $file;
open(KS, "<$file") || die "$file: $!";
while (<KS>) {
chomp;
next if /^#define (XK_MISCELLANY|XK_XKB_KEYS|XK_LATIN1|XK_LATIN2|XK_LATIN3|XK_LATIN4|XK_GREEK)/;
next if /^#define (XK_LATIN8|XK_LATIN9|XK_CAUCASUS|XK_KATAKANA|XK_ARABIC|XK_CYRILLIC|XK_HEBREW|XK_THAI|XK_KOREAN|XK_ARMENIAN|XK_GEORGIAN|XK_VIETNAMESE|XK_CURRENCY)/;
if (/^#define\s+(XK_\w+)/) {
push @xk, $1;
} elsif (/^#(ifdef|ifndef|endif)/) {
$_ =~ s/ifndef XK_0/ifndef XK_0_nosuch/;
push @xk, $_;
}
}
close(KS);
print <<"END";
KeySym XStringToKeysym(char *s) {
END
foreach $ks (@xk) {
$s = $ks;
if ($ks =~ /#/) {
print "$ks\n";
next;
}
$s =~ s/^XK_//;
print " if (!strcmp(s, \"$s\")) return $ks;\n";
}
print <<"END";
return NoSymbol;
}
END
print <<"END";
char *XKeysymToString(KeySym k) {
END
foreach $ks (@xk) {
$s = $ks;
if ($ks =~ /#/) {
print "$ks\n";
next;
}
$s =~ s/^XK_//;
print " if (k == $ks) return \"$s\";\n";
}
print <<"END";
return NULL;
}
KeySym XKeycodeToKeysym(Display *display, KeyCode keycode, int index) {
return NoSymbol;
}
KeyCode XKeysymToKeycode(Display *display, KeySym keysym) {
return NoSymbol;
}
XErrorHandler XSetErrorHandler (XErrorHandler h) {
return h;
}
END
exit 0;
-----
#endif
KeySym XStringToKeysym(char *s) {
#ifndef XK_0_nosuch
if (!strcmp(s, "VoidSymbol")) return XK_VoidSymbol;
#ifdef XK_MISCELLANY
if (!strcmp(s, "BackSpace")) return XK_BackSpace;
if (!strcmp(s, "Tab")) return XK_Tab;
if (!strcmp(s, "Linefeed")) return XK_Linefeed;
if (!strcmp(s, "Clear")) return XK_Clear;
if (!strcmp(s, "Return")) return XK_Return;
if (!strcmp(s, "Pause")) return XK_Pause;
if (!strcmp(s, "Scroll_Lock")) return XK_Scroll_Lock;
if (!strcmp(s, "Sys_Req")) return XK_Sys_Req;
if (!strcmp(s, "Escape")) return XK_Escape;
if (!strcmp(s, "Delete")) return XK_Delete;
if (!strcmp(s, "Multi_key")) return XK_Multi_key;
if (!strcmp(s, "SingleCandidate")) return XK_SingleCandidate;
if (!strcmp(s, "MultipleCandidate")) return XK_MultipleCandidate;
if (!strcmp(s, "PreviousCandidate")) return XK_PreviousCandidate;
if (!strcmp(s, "Kanji")) return XK_Kanji;
if (!strcmp(s, "Muhenkan")) return XK_Muhenkan;
if (!strcmp(s, "Henkan_Mode")) return XK_Henkan_Mode;
if (!strcmp(s, "Henkan")) return XK_Henkan;
if (!strcmp(s, "Romaji")) return XK_Romaji;
if (!strcmp(s, "Hiragana")) return XK_Hiragana;
if (!strcmp(s, "Katakana")) return XK_Katakana;
if (!strcmp(s, "Hiragana_Katakana")) return XK_Hiragana_Katakana;
if (!strcmp(s, "Zenkaku")) return XK_Zenkaku;
if (!strcmp(s, "Hankaku")) return XK_Hankaku;
if (!strcmp(s, "Zenkaku_Hankaku")) return XK_Zenkaku_Hankaku;
if (!strcmp(s, "Touroku")) return XK_Touroku;
if (!strcmp(s, "Massyo")) return XK_Massyo;
if (!strcmp(s, "Kana_Lock")) return XK_Kana_Lock;
if (!strcmp(s, "Kana_Shift")) return XK_Kana_Shift;
if (!strcmp(s, "Eisu_Shift")) return XK_Eisu_Shift;
if (!strcmp(s, "Eisu_toggle")) return XK_Eisu_toggle;
if (!strcmp(s, "Zen_Koho")) return XK_Zen_Koho;
if (!strcmp(s, "Mae_Koho")) return XK_Mae_Koho;
if (!strcmp(s, "Home")) return XK_Home;
if (!strcmp(s, "Left")) return XK_Left;
if (!strcmp(s, "Up")) return XK_Up;
if (!strcmp(s, "Right")) return XK_Right;
if (!strcmp(s, "Down")) return XK_Down;
if (!strcmp(s, "Prior")) return XK_Prior;
if (!strcmp(s, "Page_Up")) return XK_Page_Up;
if (!strcmp(s, "Next")) return XK_Next;
if (!strcmp(s, "Page_Down")) return XK_Page_Down;
if (!strcmp(s, "End")) return XK_End;
if (!strcmp(s, "Begin")) return XK_Begin;
if (!strcmp(s, "Select")) return XK_Select;
if (!strcmp(s, "Print")) return XK_Print;
if (!strcmp(s, "Execute")) return XK_Execute;
if (!strcmp(s, "Insert")) return XK_Insert;
if (!strcmp(s, "Undo")) return XK_Undo;
if (!strcmp(s, "Redo")) return XK_Redo;
if (!strcmp(s, "Menu")) return XK_Menu;
if (!strcmp(s, "Find")) return XK_Find;
if (!strcmp(s, "Cancel")) return XK_Cancel;
if (!strcmp(s, "Help")) return XK_Help;
if (!strcmp(s, "Break")) return XK_Break;
if (!strcmp(s, "Mode_switch")) return XK_Mode_switch;
if (!strcmp(s, "script_switch")) return XK_script_switch;
if (!strcmp(s, "Num_Lock")) return XK_Num_Lock;
if (!strcmp(s, "KP_Space")) return XK_KP_Space;
if (!strcmp(s, "KP_Tab")) return XK_KP_Tab;
if (!strcmp(s, "KP_Enter")) return XK_KP_Enter;
if (!strcmp(s, "KP_F1")) return XK_KP_F1;
if (!strcmp(s, "KP_F2")) return XK_KP_F2;
if (!strcmp(s, "KP_F3")) return XK_KP_F3;
if (!strcmp(s, "KP_F4")) return XK_KP_F4;
if (!strcmp(s, "KP_Home")) return XK_KP_Home;
if (!strcmp(s, "KP_Left")) return XK_KP_Left;
if (!strcmp(s, "KP_Up")) return XK_KP_Up;
if (!strcmp(s, "KP_Right")) return XK_KP_Right;
if (!strcmp(s, "KP_Down")) return XK_KP_Down;
if (!strcmp(s, "KP_Prior")) return XK_KP_Prior;
if (!strcmp(s, "KP_Page_Up")) return XK_KP_Page_Up;
if (!strcmp(s, "KP_Next")) return XK_KP_Next;
if (!strcmp(s, "KP_Page_Down")) return XK_KP_Page_Down;
if (!strcmp(s, "KP_End")) return XK_KP_End;
if (!strcmp(s, "KP_Begin")) return XK_KP_Begin;
if (!strcmp(s, "KP_Insert")) return XK_KP_Insert;
if (!strcmp(s, "KP_Delete")) return XK_KP_Delete;
if (!strcmp(s, "KP_Equal")) return XK_KP_Equal;
if (!strcmp(s, "KP_Multiply")) return XK_KP_Multiply;
if (!strcmp(s, "KP_Add")) return XK_KP_Add;
if (!strcmp(s, "KP_Separator")) return XK_KP_Separator;
if (!strcmp(s, "KP_Subtract")) return XK_KP_Subtract;
if (!strcmp(s, "KP_Decimal")) return XK_KP_Decimal;
if (!strcmp(s, "KP_Divide")) return XK_KP_Divide;
if (!strcmp(s, "KP_0")) return XK_KP_0;
if (!strcmp(s, "KP_1")) return XK_KP_1;
if (!strcmp(s, "KP_2")) return XK_KP_2;
if (!strcmp(s, "KP_3")) return XK_KP_3;
if (!strcmp(s, "KP_4")) return XK_KP_4;
if (!strcmp(s, "KP_5")) return XK_KP_5;
if (!strcmp(s, "KP_6")) return XK_KP_6;
if (!strcmp(s, "KP_7")) return XK_KP_7;
if (!strcmp(s, "KP_8")) return XK_KP_8;
if (!strcmp(s, "KP_9")) return XK_KP_9;
if (!strcmp(s, "F1")) return XK_F1;
if (!strcmp(s, "F2")) return XK_F2;
if (!strcmp(s, "F3")) return XK_F3;
if (!strcmp(s, "F4")) return XK_F4;
if (!strcmp(s, "F5")) return XK_F5;
if (!strcmp(s, "F6")) return XK_F6;
if (!strcmp(s, "F7")) return XK_F7;
if (!strcmp(s, "F8")) return XK_F8;
if (!strcmp(s, "F9")) return XK_F9;
if (!strcmp(s, "F10")) return XK_F10;
if (!strcmp(s, "F11")) return XK_F11;
if (!strcmp(s, "L1")) return XK_L1;
if (!strcmp(s, "F12")) return XK_F12;
if (!strcmp(s, "L2")) return XK_L2;
if (!strcmp(s, "F13")) return XK_F13;
if (!strcmp(s, "L3")) return XK_L3;
if (!strcmp(s, "F14")) return XK_F14;
if (!strcmp(s, "L4")) return XK_L4;
if (!strcmp(s, "F15")) return XK_F15;
if (!strcmp(s, "L5")) return XK_L5;
if (!strcmp(s, "F16")) return XK_F16;
if (!strcmp(s, "L6")) return XK_L6;
if (!strcmp(s, "F17")) return XK_F17;
if (!strcmp(s, "L7")) return XK_L7;
if (!strcmp(s, "F18")) return XK_F18;
if (!strcmp(s, "L8")) return XK_L8;
if (!strcmp(s, "F19")) return XK_F19;
if (!strcmp(s, "L9")) return XK_L9;
if (!strcmp(s, "F20")) return XK_F20;
if (!strcmp(s, "L10")) return XK_L10;
if (!strcmp(s, "F21")) return XK_F21;
if (!strcmp(s, "R1")) return XK_R1;
if (!strcmp(s, "F22")) return XK_F22;
if (!strcmp(s, "R2")) return XK_R2;
if (!strcmp(s, "F23")) return XK_F23;
if (!strcmp(s, "R3")) return XK_R3;
if (!strcmp(s, "F24")) return XK_F24;
if (!strcmp(s, "R4")) return XK_R4;
if (!strcmp(s, "F25")) return XK_F25;
if (!strcmp(s, "R5")) return XK_R5;
if (!strcmp(s, "F26")) return XK_F26;
if (!strcmp(s, "R6")) return XK_R6;
if (!strcmp(s, "F27")) return XK_F27;
if (!strcmp(s, "R7")) return XK_R7;
if (!strcmp(s, "F28")) return XK_F28;
if (!strcmp(s, "R8")) return XK_R8;
if (!strcmp(s, "F29")) return XK_F29;
if (!strcmp(s, "R9")) return XK_R9;
if (!strcmp(s, "F30")) return XK_F30;
if (!strcmp(s, "R10")) return XK_R10;
if (!strcmp(s, "F31")) return XK_F31;
if (!strcmp(s, "R11")) return XK_R11;
if (!strcmp(s, "F32")) return XK_F32;
if (!strcmp(s, "R12")) return XK_R12;
if (!strcmp(s, "F33")) return XK_F33;
if (!strcmp(s, "R13")) return XK_R13;
if (!strcmp(s, "F34")) return XK_F34;
if (!strcmp(s, "R14")) return XK_R14;
if (!strcmp(s, "F35")) return XK_F35;
if (!strcmp(s, "R15")) return XK_R15;
if (!strcmp(s, "Shift_L")) return XK_Shift_L;
if (!strcmp(s, "Shift_R")) return XK_Shift_R;
if (!strcmp(s, "Control_L")) return XK_Control_L;
if (!strcmp(s, "Control_R")) return XK_Control_R;
if (!strcmp(s, "Caps_Lock")) return XK_Caps_Lock;
if (!strcmp(s, "Shift_Lock")) return XK_Shift_Lock;
if (!strcmp(s, "Meta_L")) return XK_Meta_L;
if (!strcmp(s, "Meta_R")) return XK_Meta_R;
if (!strcmp(s, "Alt_L")) return XK_Alt_L;
if (!strcmp(s, "Alt_R")) return XK_Alt_R;
if (!strcmp(s, "Super_L")) return XK_Super_L;
if (!strcmp(s, "Super_R")) return XK_Super_R;
if (!strcmp(s, "Hyper_L")) return XK_Hyper_L;
if (!strcmp(s, "Hyper_R")) return XK_Hyper_R;
#endif /* XK_MISCELLANY */
#ifdef XK_XKB_KEYS
if (!strcmp(s, "ISO_Lock")) return XK_ISO_Lock;
if (!strcmp(s, "ISO_Level2_Latch")) return XK_ISO_Level2_Latch;
if (!strcmp(s, "ISO_Level3_Shift")) return XK_ISO_Level3_Shift;
if (!strcmp(s, "ISO_Level3_Latch")) return XK_ISO_Level3_Latch;
if (!strcmp(s, "ISO_Level3_Lock")) return XK_ISO_Level3_Lock;
if (!strcmp(s, "ISO_Group_Shift")) return XK_ISO_Group_Shift;
if (!strcmp(s, "ISO_Group_Latch")) return XK_ISO_Group_Latch;
if (!strcmp(s, "ISO_Group_Lock")) return XK_ISO_Group_Lock;
if (!strcmp(s, "ISO_Next_Group")) return XK_ISO_Next_Group;
if (!strcmp(s, "ISO_Next_Group_Lock")) return XK_ISO_Next_Group_Lock;
if (!strcmp(s, "ISO_Prev_Group")) return XK_ISO_Prev_Group;
if (!strcmp(s, "ISO_Prev_Group_Lock")) return XK_ISO_Prev_Group_Lock;
if (!strcmp(s, "ISO_First_Group")) return XK_ISO_First_Group;
if (!strcmp(s, "ISO_First_Group_Lock")) return XK_ISO_First_Group_Lock;
if (!strcmp(s, "ISO_Last_Group")) return XK_ISO_Last_Group;
if (!strcmp(s, "ISO_Last_Group_Lock")) return XK_ISO_Last_Group_Lock;
if (!strcmp(s, "ISO_Left_Tab")) return XK_ISO_Left_Tab;
if (!strcmp(s, "ISO_Move_Line_Up")) return XK_ISO_Move_Line_Up;
if (!strcmp(s, "ISO_Move_Line_Down")) return XK_ISO_Move_Line_Down;
if (!strcmp(s, "ISO_Partial_Line_Up")) return XK_ISO_Partial_Line_Up;
if (!strcmp(s, "ISO_Partial_Line_Down")) return XK_ISO_Partial_Line_Down;
if (!strcmp(s, "ISO_Partial_Space_Left")) return XK_ISO_Partial_Space_Left;
if (!strcmp(s, "ISO_Partial_Space_Right")) return XK_ISO_Partial_Space_Right;
if (!strcmp(s, "ISO_Set_Margin_Left")) return XK_ISO_Set_Margin_Left;
if (!strcmp(s, "ISO_Set_Margin_Right")) return XK_ISO_Set_Margin_Right;
if (!strcmp(s, "ISO_Release_Margin_Left")) return XK_ISO_Release_Margin_Left;
if (!strcmp(s, "ISO_Release_Margin_Right")) return XK_ISO_Release_Margin_Right;
if (!strcmp(s, "ISO_Release_Both_Margins")) return XK_ISO_Release_Both_Margins;
if (!strcmp(s, "ISO_Fast_Cursor_Left")) return XK_ISO_Fast_Cursor_Left;
if (!strcmp(s, "ISO_Fast_Cursor_Right")) return XK_ISO_Fast_Cursor_Right;
if (!strcmp(s, "ISO_Fast_Cursor_Up")) return XK_ISO_Fast_Cursor_Up;
if (!strcmp(s, "ISO_Fast_Cursor_Down")) return XK_ISO_Fast_Cursor_Down;
if (!strcmp(s, "ISO_Continuous_Underline")) return XK_ISO_Continuous_Underline;
if (!strcmp(s, "ISO_Discontinuous_Underline")) return XK_ISO_Discontinuous_Underline;
if (!strcmp(s, "ISO_Emphasize")) return XK_ISO_Emphasize;
if (!strcmp(s, "ISO_Center_Object")) return XK_ISO_Center_Object;
if (!strcmp(s, "ISO_Enter")) return XK_ISO_Enter;
if (!strcmp(s, "dead_grave")) return XK_dead_grave;
if (!strcmp(s, "dead_acute")) return XK_dead_acute;
if (!strcmp(s, "dead_circumflex")) return XK_dead_circumflex;
if (!strcmp(s, "dead_tilde")) return XK_dead_tilde;
if (!strcmp(s, "dead_macron")) return XK_dead_macron;
if (!strcmp(s, "dead_breve")) return XK_dead_breve;
if (!strcmp(s, "dead_abovedot")) return XK_dead_abovedot;
if (!strcmp(s, "dead_diaeresis")) return XK_dead_diaeresis;
if (!strcmp(s, "dead_abovering")) return XK_dead_abovering;
if (!strcmp(s, "dead_doubleacute")) return XK_dead_doubleacute;
if (!strcmp(s, "dead_caron")) return XK_dead_caron;
if (!strcmp(s, "dead_cedilla")) return XK_dead_cedilla;
if (!strcmp(s, "dead_ogonek")) return XK_dead_ogonek;
if (!strcmp(s, "dead_iota")) return XK_dead_iota;
if (!strcmp(s, "dead_voiced_sound")) return XK_dead_voiced_sound;
if (!strcmp(s, "dead_semivoiced_sound")) return XK_dead_semivoiced_sound;
if (!strcmp(s, "dead_belowdot")) return XK_dead_belowdot;
if (!strcmp(s, "First_Virtual_Screen")) return XK_First_Virtual_Screen;
if (!strcmp(s, "Prev_Virtual_Screen")) return XK_Prev_Virtual_Screen;
if (!strcmp(s, "Next_Virtual_Screen")) return XK_Next_Virtual_Screen;
if (!strcmp(s, "Last_Virtual_Screen")) return XK_Last_Virtual_Screen;
if (!strcmp(s, "Terminate_Server")) return XK_Terminate_Server;
if (!strcmp(s, "AccessX_Enable")) return XK_AccessX_Enable;
if (!strcmp(s, "AccessX_Feedback_Enable")) return XK_AccessX_Feedback_Enable;
if (!strcmp(s, "RepeatKeys_Enable")) return XK_RepeatKeys_Enable;
if (!strcmp(s, "SlowKeys_Enable")) return XK_SlowKeys_Enable;
if (!strcmp(s, "BounceKeys_Enable")) return XK_BounceKeys_Enable;
if (!strcmp(s, "StickyKeys_Enable")) return XK_StickyKeys_Enable;
if (!strcmp(s, "MouseKeys_Enable")) return XK_MouseKeys_Enable;
if (!strcmp(s, "MouseKeys_Accel_Enable")) return XK_MouseKeys_Accel_Enable;
if (!strcmp(s, "Overlay1_Enable")) return XK_Overlay1_Enable;
if (!strcmp(s, "Overlay2_Enable")) return XK_Overlay2_Enable;
if (!strcmp(s, "AudibleBell_Enable")) return XK_AudibleBell_Enable;
if (!strcmp(s, "Pointer_Left")) return XK_Pointer_Left;
if (!strcmp(s, "Pointer_Right")) return XK_Pointer_Right;
if (!strcmp(s, "Pointer_Up")) return XK_Pointer_Up;
if (!strcmp(s, "Pointer_Down")) return XK_Pointer_Down;
if (!strcmp(s, "Pointer_UpLeft")) return XK_Pointer_UpLeft;
if (!strcmp(s, "Pointer_UpRight")) return XK_Pointer_UpRight;
if (!strcmp(s, "Pointer_DownLeft")) return XK_Pointer_DownLeft;
if (!strcmp(s, "Pointer_DownRight")) return XK_Pointer_DownRight;
if (!strcmp(s, "Pointer_Button_Dflt")) return XK_Pointer_Button_Dflt;
if (!strcmp(s, "Pointer_Button1")) return XK_Pointer_Button1;
if (!strcmp(s, "Pointer_Button2")) return XK_Pointer_Button2;
if (!strcmp(s, "Pointer_Button3")) return XK_Pointer_Button3;
if (!strcmp(s, "Pointer_Button4")) return XK_Pointer_Button4;
if (!strcmp(s, "Pointer_Button5")) return XK_Pointer_Button5;
if (!strcmp(s, "Pointer_DblClick_Dflt")) return XK_Pointer_DblClick_Dflt;
if (!strcmp(s, "Pointer_DblClick1")) return XK_Pointer_DblClick1;
if (!strcmp(s, "Pointer_DblClick2")) return XK_Pointer_DblClick2;
if (!strcmp(s, "Pointer_DblClick3")) return XK_Pointer_DblClick3;
if (!strcmp(s, "Pointer_DblClick4")) return XK_Pointer_DblClick4;
if (!strcmp(s, "Pointer_DblClick5")) return XK_Pointer_DblClick5;
if (!strcmp(s, "Pointer_Drag_Dflt")) return XK_Pointer_Drag_Dflt;
if (!strcmp(s, "Pointer_Drag1")) return XK_Pointer_Drag1;
if (!strcmp(s, "Pointer_Drag2")) return XK_Pointer_Drag2;
if (!strcmp(s, "Pointer_Drag3")) return XK_Pointer_Drag3;
if (!strcmp(s, "Pointer_Drag4")) return XK_Pointer_Drag4;
if (!strcmp(s, "Pointer_Drag5")) return XK_Pointer_Drag5;
if (!strcmp(s, "Pointer_EnableKeys")) return XK_Pointer_EnableKeys;
if (!strcmp(s, "Pointer_Accelerate")) return XK_Pointer_Accelerate;
if (!strcmp(s, "Pointer_DfltBtnNext")) return XK_Pointer_DfltBtnNext;
if (!strcmp(s, "Pointer_DfltBtnPrev")) return XK_Pointer_DfltBtnPrev;
#endif
#ifdef XK_3270
if (!strcmp(s, "3270_Duplicate")) return XK_3270_Duplicate;
if (!strcmp(s, "3270_FieldMark")) return XK_3270_FieldMark;
if (!strcmp(s, "3270_Right2")) return XK_3270_Right2;
if (!strcmp(s, "3270_Left2")) return XK_3270_Left2;
if (!strcmp(s, "3270_BackTab")) return XK_3270_BackTab;
if (!strcmp(s, "3270_EraseEOF")) return XK_3270_EraseEOF;
if (!strcmp(s, "3270_EraseInput")) return XK_3270_EraseInput;
if (!strcmp(s, "3270_Reset")) return XK_3270_Reset;
if (!strcmp(s, "3270_Quit")) return XK_3270_Quit;
if (!strcmp(s, "3270_PA1")) return XK_3270_PA1;
if (!strcmp(s, "3270_PA2")) return XK_3270_PA2;
if (!strcmp(s, "3270_PA3")) return XK_3270_PA3;
if (!strcmp(s, "3270_Test")) return XK_3270_Test;
if (!strcmp(s, "3270_Attn")) return XK_3270_Attn;
if (!strcmp(s, "3270_CursorBlink")) return XK_3270_CursorBlink;
if (!strcmp(s, "3270_AltCursor")) return XK_3270_AltCursor;
if (!strcmp(s, "3270_KeyClick")) return XK_3270_KeyClick;
if (!strcmp(s, "3270_Jump")) return XK_3270_Jump;
if (!strcmp(s, "3270_Ident")) return XK_3270_Ident;
if (!strcmp(s, "3270_Rule")) return XK_3270_Rule;
if (!strcmp(s, "3270_Copy")) return XK_3270_Copy;
if (!strcmp(s, "3270_Play")) return XK_3270_Play;
if (!strcmp(s, "3270_Setup")) return XK_3270_Setup;
if (!strcmp(s, "3270_Record")) return XK_3270_Record;
if (!strcmp(s, "3270_ChangeScreen")) return XK_3270_ChangeScreen;
if (!strcmp(s, "3270_DeleteWord")) return XK_3270_DeleteWord;
if (!strcmp(s, "3270_ExSelect")) return XK_3270_ExSelect;
if (!strcmp(s, "3270_CursorSelect")) return XK_3270_CursorSelect;
if (!strcmp(s, "3270_PrintScreen")) return XK_3270_PrintScreen;
if (!strcmp(s, "3270_Enter")) return XK_3270_Enter;
#endif
#ifdef XK_LATIN1
if (!strcmp(s, "space")) return XK_space;
if (!strcmp(s, "exclam")) return XK_exclam;
if (!strcmp(s, "quotedbl")) return XK_quotedbl;
if (!strcmp(s, "numbersign")) return XK_numbersign;
if (!strcmp(s, "dollar")) return XK_dollar;
if (!strcmp(s, "percent")) return XK_percent;
if (!strcmp(s, "ampersand")) return XK_ampersand;
if (!strcmp(s, "apostrophe")) return XK_apostrophe;
if (!strcmp(s, "quoteright")) return XK_quoteright;
if (!strcmp(s, "parenleft")) return XK_parenleft;
if (!strcmp(s, "parenright")) return XK_parenright;
if (!strcmp(s, "asterisk")) return XK_asterisk;
if (!strcmp(s, "plus")) return XK_plus;
if (!strcmp(s, "comma")) return XK_comma;
if (!strcmp(s, "minus")) return XK_minus;
if (!strcmp(s, "period")) return XK_period;
if (!strcmp(s, "slash")) return XK_slash;
if (!strcmp(s, "0")) return XK_0;
if (!strcmp(s, "1")) return XK_1;
if (!strcmp(s, "2")) return XK_2;
if (!strcmp(s, "3")) return XK_3;
if (!strcmp(s, "4")) return XK_4;
if (!strcmp(s, "5")) return XK_5;
if (!strcmp(s, "6")) return XK_6;
if (!strcmp(s, "7")) return XK_7;
if (!strcmp(s, "8")) return XK_8;
if (!strcmp(s, "9")) return XK_9;
if (!strcmp(s, "colon")) return XK_colon;
if (!strcmp(s, "semicolon")) return XK_semicolon;
if (!strcmp(s, "less")) return XK_less;
if (!strcmp(s, "equal")) return XK_equal;
if (!strcmp(s, "greater")) return XK_greater;
if (!strcmp(s, "question")) return XK_question;
if (!strcmp(s, "at")) return XK_at;
if (!strcmp(s, "A")) return XK_A;
if (!strcmp(s, "B")) return XK_B;
if (!strcmp(s, "C")) return XK_C;
if (!strcmp(s, "D")) return XK_D;
if (!strcmp(s, "E")) return XK_E;
if (!strcmp(s, "F")) return XK_F;
if (!strcmp(s, "G")) return XK_G;
if (!strcmp(s, "H")) return XK_H;
if (!strcmp(s, "I")) return XK_I;
if (!strcmp(s, "J")) return XK_J;
if (!strcmp(s, "K")) return XK_K;
if (!strcmp(s, "L")) return XK_L;
if (!strcmp(s, "M")) return XK_M;
if (!strcmp(s, "N")) return XK_N;
if (!strcmp(s, "O")) return XK_O;
if (!strcmp(s, "P")) return XK_P;
if (!strcmp(s, "Q")) return XK_Q;
if (!strcmp(s, "R")) return XK_R;
if (!strcmp(s, "S")) return XK_S;
if (!strcmp(s, "T")) return XK_T;
if (!strcmp(s, "U")) return XK_U;
if (!strcmp(s, "V")) return XK_V;
if (!strcmp(s, "W")) return XK_W;
if (!strcmp(s, "X")) return XK_X;
if (!strcmp(s, "Y")) return XK_Y;
if (!strcmp(s, "Z")) return XK_Z;
if (!strcmp(s, "bracketleft")) return XK_bracketleft;
if (!strcmp(s, "backslash")) return XK_backslash;
if (!strcmp(s, "bracketright")) return XK_bracketright;
if (!strcmp(s, "asciicircum")) return XK_asciicircum;
if (!strcmp(s, "underscore")) return XK_underscore;
if (!strcmp(s, "grave")) return XK_grave;
if (!strcmp(s, "quoteleft")) return XK_quoteleft;
if (!strcmp(s, "a")) return XK_a;
if (!strcmp(s, "b")) return XK_b;
if (!strcmp(s, "c")) return XK_c;
if (!strcmp(s, "d")) return XK_d;
if (!strcmp(s, "e")) return XK_e;
if (!strcmp(s, "f")) return XK_f;
if (!strcmp(s, "g")) return XK_g;
if (!strcmp(s, "h")) return XK_h;
if (!strcmp(s, "i")) return XK_i;
if (!strcmp(s, "j")) return XK_j;
if (!strcmp(s, "k")) return XK_k;
if (!strcmp(s, "l")) return XK_l;
if (!strcmp(s, "m")) return XK_m;
if (!strcmp(s, "n")) return XK_n;
if (!strcmp(s, "o")) return XK_o;
if (!strcmp(s, "p")) return XK_p;
if (!strcmp(s, "q")) return XK_q;
if (!strcmp(s, "r")) return XK_r;
if (!strcmp(s, "s")) return XK_s;
if (!strcmp(s, "t")) return XK_t;
if (!strcmp(s, "u")) return XK_u;
if (!strcmp(s, "v")) return XK_v;
if (!strcmp(s, "w")) return XK_w;
if (!strcmp(s, "x")) return XK_x;
if (!strcmp(s, "y")) return XK_y;
if (!strcmp(s, "z")) return XK_z;
if (!strcmp(s, "braceleft")) return XK_braceleft;
if (!strcmp(s, "bar")) return XK_bar;
if (!strcmp(s, "braceright")) return XK_braceright;
if (!strcmp(s, "asciitilde")) return XK_asciitilde;
if (!strcmp(s, "nobreakspace")) return XK_nobreakspace;
if (!strcmp(s, "exclamdown")) return XK_exclamdown;
if (!strcmp(s, "cent")) return XK_cent;
if (!strcmp(s, "sterling")) return XK_sterling;
if (!strcmp(s, "currency")) return XK_currency;
if (!strcmp(s, "yen")) return XK_yen;
if (!strcmp(s, "brokenbar")) return XK_brokenbar;
if (!strcmp(s, "section")) return XK_section;
if (!strcmp(s, "diaeresis")) return XK_diaeresis;
if (!strcmp(s, "copyright")) return XK_copyright;
if (!strcmp(s, "ordfeminine")) return XK_ordfeminine;
if (!strcmp(s, "guillemotleft")) return XK_guillemotleft;
if (!strcmp(s, "notsign")) return XK_notsign;
if (!strcmp(s, "hyphen")) return XK_hyphen;
if (!strcmp(s, "registered")) return XK_registered;
if (!strcmp(s, "macron")) return XK_macron;
if (!strcmp(s, "degree")) return XK_degree;
if (!strcmp(s, "plusminus")) return XK_plusminus;
if (!strcmp(s, "twosuperior")) return XK_twosuperior;
if (!strcmp(s, "threesuperior")) return XK_threesuperior;
if (!strcmp(s, "acute")) return XK_acute;
if (!strcmp(s, "mu")) return XK_mu;
if (!strcmp(s, "paragraph")) return XK_paragraph;
if (!strcmp(s, "periodcentered")) return XK_periodcentered;
if (!strcmp(s, "cedilla")) return XK_cedilla;
if (!strcmp(s, "onesuperior")) return XK_onesuperior;
if (!strcmp(s, "masculine")) return XK_masculine;
if (!strcmp(s, "guillemotright")) return XK_guillemotright;
if (!strcmp(s, "onequarter")) return XK_onequarter;
if (!strcmp(s, "onehalf")) return XK_onehalf;
if (!strcmp(s, "threequarters")) return XK_threequarters;
if (!strcmp(s, "questiondown")) return XK_questiondown;
if (!strcmp(s, "Agrave")) return XK_Agrave;
if (!strcmp(s, "Aacute")) return XK_Aacute;
if (!strcmp(s, "Acircumflex")) return XK_Acircumflex;
if (!strcmp(s, "Atilde")) return XK_Atilde;
if (!strcmp(s, "Adiaeresis")) return XK_Adiaeresis;
if (!strcmp(s, "Aring")) return XK_Aring;
if (!strcmp(s, "AE")) return XK_AE;
if (!strcmp(s, "Ccedilla")) return XK_Ccedilla;
if (!strcmp(s, "Egrave")) return XK_Egrave;
if (!strcmp(s, "Eacute")) return XK_Eacute;
if (!strcmp(s, "Ecircumflex")) return XK_Ecircumflex;
if (!strcmp(s, "Ediaeresis")) return XK_Ediaeresis;
if (!strcmp(s, "Igrave")) return XK_Igrave;
if (!strcmp(s, "Iacute")) return XK_Iacute;
if (!strcmp(s, "Icircumflex")) return XK_Icircumflex;
if (!strcmp(s, "Idiaeresis")) return XK_Idiaeresis;
if (!strcmp(s, "ETH")) return XK_ETH;
if (!strcmp(s, "Eth")) return XK_Eth;
if (!strcmp(s, "Ntilde")) return XK_Ntilde;
if (!strcmp(s, "Ograve")) return XK_Ograve;
if (!strcmp(s, "Oacute")) return XK_Oacute;
if (!strcmp(s, "Ocircumflex")) return XK_Ocircumflex;
if (!strcmp(s, "Otilde")) return XK_Otilde;
if (!strcmp(s, "Odiaeresis")) return XK_Odiaeresis;
if (!strcmp(s, "multiply")) return XK_multiply;
if (!strcmp(s, "Ooblique")) return XK_Ooblique;
if (!strcmp(s, "Ugrave")) return XK_Ugrave;
if (!strcmp(s, "Uacute")) return XK_Uacute;
if (!strcmp(s, "Ucircumflex")) return XK_Ucircumflex;
if (!strcmp(s, "Udiaeresis")) return XK_Udiaeresis;
if (!strcmp(s, "Yacute")) return XK_Yacute;
if (!strcmp(s, "THORN")) return XK_THORN;
if (!strcmp(s, "Thorn")) return XK_Thorn;
if (!strcmp(s, "ssharp")) return XK_ssharp;
if (!strcmp(s, "agrave")) return XK_agrave;
if (!strcmp(s, "aacute")) return XK_aacute;
if (!strcmp(s, "acircumflex")) return XK_acircumflex;
if (!strcmp(s, "atilde")) return XK_atilde;
if (!strcmp(s, "adiaeresis")) return XK_adiaeresis;
if (!strcmp(s, "aring")) return XK_aring;
if (!strcmp(s, "ae")) return XK_ae;
if (!strcmp(s, "ccedilla")) return XK_ccedilla;
if (!strcmp(s, "egrave")) return XK_egrave;
if (!strcmp(s, "eacute")) return XK_eacute;
if (!strcmp(s, "ecircumflex")) return XK_ecircumflex;
if (!strcmp(s, "ediaeresis")) return XK_ediaeresis;
if (!strcmp(s, "igrave")) return XK_igrave;
if (!strcmp(s, "iacute")) return XK_iacute;
if (!strcmp(s, "icircumflex")) return XK_icircumflex;
if (!strcmp(s, "idiaeresis")) return XK_idiaeresis;
if (!strcmp(s, "eth")) return XK_eth;
if (!strcmp(s, "ntilde")) return XK_ntilde;
if (!strcmp(s, "ograve")) return XK_ograve;
if (!strcmp(s, "oacute")) return XK_oacute;
if (!strcmp(s, "ocircumflex")) return XK_ocircumflex;
if (!strcmp(s, "otilde")) return XK_otilde;
if (!strcmp(s, "odiaeresis")) return XK_odiaeresis;
if (!strcmp(s, "division")) return XK_division;
if (!strcmp(s, "oslash")) return XK_oslash;
if (!strcmp(s, "ugrave")) return XK_ugrave;
if (!strcmp(s, "uacute")) return XK_uacute;
if (!strcmp(s, "ucircumflex")) return XK_ucircumflex;
if (!strcmp(s, "udiaeresis")) return XK_udiaeresis;
if (!strcmp(s, "yacute")) return XK_yacute;
if (!strcmp(s, "thorn")) return XK_thorn;
if (!strcmp(s, "ydiaeresis")) return XK_ydiaeresis;
#endif /* XK_LATIN1 */
#ifdef XK_LATIN2
if (!strcmp(s, "Aogonek")) return XK_Aogonek;
if (!strcmp(s, "breve")) return XK_breve;
if (!strcmp(s, "Lstroke")) return XK_Lstroke;
if (!strcmp(s, "Lcaron")) return XK_Lcaron;
if (!strcmp(s, "Sacute")) return XK_Sacute;
if (!strcmp(s, "Scaron")) return XK_Scaron;
if (!strcmp(s, "Scedilla")) return XK_Scedilla;
if (!strcmp(s, "Tcaron")) return XK_Tcaron;
if (!strcmp(s, "Zacute")) return XK_Zacute;
if (!strcmp(s, "Zcaron")) return XK_Zcaron;
if (!strcmp(s, "Zabovedot")) return XK_Zabovedot;
if (!strcmp(s, "aogonek")) return XK_aogonek;
if (!strcmp(s, "ogonek")) return XK_ogonek;
if (!strcmp(s, "lstroke")) return XK_lstroke;
if (!strcmp(s, "lcaron")) return XK_lcaron;
if (!strcmp(s, "sacute")) return XK_sacute;
if (!strcmp(s, "caron")) return XK_caron;
if (!strcmp(s, "scaron")) return XK_scaron;
if (!strcmp(s, "scedilla")) return XK_scedilla;
if (!strcmp(s, "tcaron")) return XK_tcaron;
if (!strcmp(s, "zacute")) return XK_zacute;
if (!strcmp(s, "doubleacute")) return XK_doubleacute;
if (!strcmp(s, "zcaron")) return XK_zcaron;
if (!strcmp(s, "zabovedot")) return XK_zabovedot;
if (!strcmp(s, "Racute")) return XK_Racute;
if (!strcmp(s, "Abreve")) return XK_Abreve;
if (!strcmp(s, "Lacute")) return XK_Lacute;
if (!strcmp(s, "Cacute")) return XK_Cacute;
if (!strcmp(s, "Ccaron")) return XK_Ccaron;
if (!strcmp(s, "Eogonek")) return XK_Eogonek;
if (!strcmp(s, "Ecaron")) return XK_Ecaron;
if (!strcmp(s, "Dcaron")) return XK_Dcaron;
if (!strcmp(s, "Dstroke")) return XK_Dstroke;
if (!strcmp(s, "Nacute")) return XK_Nacute;
if (!strcmp(s, "Ncaron")) return XK_Ncaron;
if (!strcmp(s, "Odoubleacute")) return XK_Odoubleacute;
if (!strcmp(s, "Rcaron")) return XK_Rcaron;
if (!strcmp(s, "Uring")) return XK_Uring;
if (!strcmp(s, "Udoubleacute")) return XK_Udoubleacute;
if (!strcmp(s, "Tcedilla")) return XK_Tcedilla;
if (!strcmp(s, "racute")) return XK_racute;
if (!strcmp(s, "abreve")) return XK_abreve;
if (!strcmp(s, "lacute")) return XK_lacute;
if (!strcmp(s, "cacute")) return XK_cacute;
if (!strcmp(s, "ccaron")) return XK_ccaron;
if (!strcmp(s, "eogonek")) return XK_eogonek;
if (!strcmp(s, "ecaron")) return XK_ecaron;
if (!strcmp(s, "dcaron")) return XK_dcaron;
if (!strcmp(s, "dstroke")) return XK_dstroke;
if (!strcmp(s, "nacute")) return XK_nacute;
if (!strcmp(s, "ncaron")) return XK_ncaron;
if (!strcmp(s, "odoubleacute")) return XK_odoubleacute;
if (!strcmp(s, "udoubleacute")) return XK_udoubleacute;
if (!strcmp(s, "rcaron")) return XK_rcaron;
if (!strcmp(s, "uring")) return XK_uring;
if (!strcmp(s, "tcedilla")) return XK_tcedilla;
if (!strcmp(s, "abovedot")) return XK_abovedot;
#endif /* XK_LATIN2 */
#ifdef XK_LATIN3
if (!strcmp(s, "Hstroke")) return XK_Hstroke;
if (!strcmp(s, "Hcircumflex")) return XK_Hcircumflex;
if (!strcmp(s, "Iabovedot")) return XK_Iabovedot;
if (!strcmp(s, "Gbreve")) return XK_Gbreve;
if (!strcmp(s, "Jcircumflex")) return XK_Jcircumflex;
if (!strcmp(s, "hstroke")) return XK_hstroke;
if (!strcmp(s, "hcircumflex")) return XK_hcircumflex;
if (!strcmp(s, "idotless")) return XK_idotless;
if (!strcmp(s, "gbreve")) return XK_gbreve;
if (!strcmp(s, "jcircumflex")) return XK_jcircumflex;
if (!strcmp(s, "Cabovedot")) return XK_Cabovedot;
if (!strcmp(s, "Ccircumflex")) return XK_Ccircumflex;
if (!strcmp(s, "Gabovedot")) return XK_Gabovedot;
if (!strcmp(s, "Gcircumflex")) return XK_Gcircumflex;
if (!strcmp(s, "Ubreve")) return XK_Ubreve;
if (!strcmp(s, "Scircumflex")) return XK_Scircumflex;
if (!strcmp(s, "cabovedot")) return XK_cabovedot;
if (!strcmp(s, "ccircumflex")) return XK_ccircumflex;
if (!strcmp(s, "gabovedot")) return XK_gabovedot;
if (!strcmp(s, "gcircumflex")) return XK_gcircumflex;
if (!strcmp(s, "ubreve")) return XK_ubreve;
if (!strcmp(s, "scircumflex")) return XK_scircumflex;
#endif /* XK_LATIN3 */
#ifdef XK_LATIN4
if (!strcmp(s, "kra")) return XK_kra;
if (!strcmp(s, "kappa")) return XK_kappa;
if (!strcmp(s, "Rcedilla")) return XK_Rcedilla;
if (!strcmp(s, "Itilde")) return XK_Itilde;
if (!strcmp(s, "Lcedilla")) return XK_Lcedilla;
if (!strcmp(s, "Emacron")) return XK_Emacron;
if (!strcmp(s, "Gcedilla")) return XK_Gcedilla;
if (!strcmp(s, "Tslash")) return XK_Tslash;
if (!strcmp(s, "rcedilla")) return XK_rcedilla;
if (!strcmp(s, "itilde")) return XK_itilde;
if (!strcmp(s, "lcedilla")) return XK_lcedilla;
if (!strcmp(s, "emacron")) return XK_emacron;
if (!strcmp(s, "gcedilla")) return XK_gcedilla;
if (!strcmp(s, "tslash")) return XK_tslash;
if (!strcmp(s, "ENG")) return XK_ENG;
if (!strcmp(s, "eng")) return XK_eng;
if (!strcmp(s, "Amacron")) return XK_Amacron;
if (!strcmp(s, "Iogonek")) return XK_Iogonek;
if (!strcmp(s, "Eabovedot")) return XK_Eabovedot;
if (!strcmp(s, "Imacron")) return XK_Imacron;
if (!strcmp(s, "Ncedilla")) return XK_Ncedilla;
if (!strcmp(s, "Omacron")) return XK_Omacron;
if (!strcmp(s, "Kcedilla")) return XK_Kcedilla;
if (!strcmp(s, "Uogonek")) return XK_Uogonek;
if (!strcmp(s, "Utilde")) return XK_Utilde;
if (!strcmp(s, "Umacron")) return XK_Umacron;
if (!strcmp(s, "amacron")) return XK_amacron;
if (!strcmp(s, "iogonek")) return XK_iogonek;
if (!strcmp(s, "eabovedot")) return XK_eabovedot;
if (!strcmp(s, "imacron")) return XK_imacron;
if (!strcmp(s, "ncedilla")) return XK_ncedilla;
if (!strcmp(s, "omacron")) return XK_omacron;
if (!strcmp(s, "kcedilla")) return XK_kcedilla;
if (!strcmp(s, "uogonek")) return XK_uogonek;
if (!strcmp(s, "utilde")) return XK_utilde;
if (!strcmp(s, "umacron")) return XK_umacron;
#endif /* XK_LATIN4 */
#ifdef XK_KATAKANA
if (!strcmp(s, "overline")) return XK_overline;
if (!strcmp(s, "kana_fullstop")) return XK_kana_fullstop;
if (!strcmp(s, "kana_openingbracket")) return XK_kana_openingbracket;
if (!strcmp(s, "kana_closingbracket")) return XK_kana_closingbracket;
if (!strcmp(s, "kana_comma")) return XK_kana_comma;
if (!strcmp(s, "kana_conjunctive")) return XK_kana_conjunctive;
if (!strcmp(s, "kana_middledot")) return XK_kana_middledot;
if (!strcmp(s, "kana_WO")) return XK_kana_WO;
if (!strcmp(s, "kana_a")) return XK_kana_a;
if (!strcmp(s, "kana_i")) return XK_kana_i;
if (!strcmp(s, "kana_u")) return XK_kana_u;
if (!strcmp(s, "kana_e")) return XK_kana_e;
if (!strcmp(s, "kana_o")) return XK_kana_o;
if (!strcmp(s, "kana_ya")) return XK_kana_ya;
if (!strcmp(s, "kana_yu")) return XK_kana_yu;
if (!strcmp(s, "kana_yo")) return XK_kana_yo;
if (!strcmp(s, "kana_tsu")) return XK_kana_tsu;
if (!strcmp(s, "kana_tu")) return XK_kana_tu;
if (!strcmp(s, "prolongedsound")) return XK_prolongedsound;
if (!strcmp(s, "kana_A")) return XK_kana_A;
if (!strcmp(s, "kana_I")) return XK_kana_I;
if (!strcmp(s, "kana_U")) return XK_kana_U;
if (!strcmp(s, "kana_E")) return XK_kana_E;
if (!strcmp(s, "kana_O")) return XK_kana_O;
if (!strcmp(s, "kana_KA")) return XK_kana_KA;
if (!strcmp(s, "kana_KI")) return XK_kana_KI;
if (!strcmp(s, "kana_KU")) return XK_kana_KU;
if (!strcmp(s, "kana_KE")) return XK_kana_KE;
if (!strcmp(s, "kana_KO")) return XK_kana_KO;
if (!strcmp(s, "kana_SA")) return XK_kana_SA;
if (!strcmp(s, "kana_SHI")) return XK_kana_SHI;
if (!strcmp(s, "kana_SU")) return XK_kana_SU;
if (!strcmp(s, "kana_SE")) return XK_kana_SE;
if (!strcmp(s, "kana_SO")) return XK_kana_SO;
if (!strcmp(s, "kana_TA")) return XK_kana_TA;
if (!strcmp(s, "kana_CHI")) return XK_kana_CHI;
if (!strcmp(s, "kana_TI")) return XK_kana_TI;
if (!strcmp(s, "kana_TSU")) return XK_kana_TSU;
if (!strcmp(s, "kana_TU")) return XK_kana_TU;
if (!strcmp(s, "kana_TE")) return XK_kana_TE;
if (!strcmp(s, "kana_TO")) return XK_kana_TO;
if (!strcmp(s, "kana_NA")) return XK_kana_NA;
if (!strcmp(s, "kana_NI")) return XK_kana_NI;
if (!strcmp(s, "kana_NU")) return XK_kana_NU;
if (!strcmp(s, "kana_NE")) return XK_kana_NE;
if (!strcmp(s, "kana_NO")) return XK_kana_NO;
if (!strcmp(s, "kana_HA")) return XK_kana_HA;
if (!strcmp(s, "kana_HI")) return XK_kana_HI;
if (!strcmp(s, "kana_FU")) return XK_kana_FU;
if (!strcmp(s, "kana_HU")) return XK_kana_HU;
if (!strcmp(s, "kana_HE")) return XK_kana_HE;
if (!strcmp(s, "kana_HO")) return XK_kana_HO;
if (!strcmp(s, "kana_MA")) return XK_kana_MA;
if (!strcmp(s, "kana_MI")) return XK_kana_MI;
if (!strcmp(s, "kana_MU")) return XK_kana_MU;
if (!strcmp(s, "kana_ME")) return XK_kana_ME;
if (!strcmp(s, "kana_MO")) return XK_kana_MO;
if (!strcmp(s, "kana_YA")) return XK_kana_YA;
if (!strcmp(s, "kana_YU")) return XK_kana_YU;
if (!strcmp(s, "kana_YO")) return XK_kana_YO;
if (!strcmp(s, "kana_RA")) return XK_kana_RA;
if (!strcmp(s, "kana_RI")) return XK_kana_RI;
if (!strcmp(s, "kana_RU")) return XK_kana_RU;
if (!strcmp(s, "kana_RE")) return XK_kana_RE;
if (!strcmp(s, "kana_RO")) return XK_kana_RO;
if (!strcmp(s, "kana_WA")) return XK_kana_WA;
if (!strcmp(s, "kana_N")) return XK_kana_N;
if (!strcmp(s, "voicedsound")) return XK_voicedsound;
if (!strcmp(s, "semivoicedsound")) return XK_semivoicedsound;
if (!strcmp(s, "kana_switch")) return XK_kana_switch;
#endif /* XK_KATAKANA */
#ifdef XK_ARABIC
if (!strcmp(s, "Arabic_comma")) return XK_Arabic_comma;
if (!strcmp(s, "Arabic_semicolon")) return XK_Arabic_semicolon;
if (!strcmp(s, "Arabic_question_mark")) return XK_Arabic_question_mark;
if (!strcmp(s, "Arabic_hamza")) return XK_Arabic_hamza;
if (!strcmp(s, "Arabic_maddaonalef")) return XK_Arabic_maddaonalef;
if (!strcmp(s, "Arabic_hamzaonalef")) return XK_Arabic_hamzaonalef;
if (!strcmp(s, "Arabic_hamzaonwaw")) return XK_Arabic_hamzaonwaw;
if (!strcmp(s, "Arabic_hamzaunderalef")) return XK_Arabic_hamzaunderalef;
if (!strcmp(s, "Arabic_hamzaonyeh")) return XK_Arabic_hamzaonyeh;
if (!strcmp(s, "Arabic_alef")) return XK_Arabic_alef;
if (!strcmp(s, "Arabic_beh")) return XK_Arabic_beh;
if (!strcmp(s, "Arabic_tehmarbuta")) return XK_Arabic_tehmarbuta;
if (!strcmp(s, "Arabic_teh")) return XK_Arabic_teh;
if (!strcmp(s, "Arabic_theh")) return XK_Arabic_theh;
if (!strcmp(s, "Arabic_jeem")) return XK_Arabic_jeem;
if (!strcmp(s, "Arabic_hah")) return XK_Arabic_hah;
if (!strcmp(s, "Arabic_khah")) return XK_Arabic_khah;
if (!strcmp(s, "Arabic_dal")) return XK_Arabic_dal;
if (!strcmp(s, "Arabic_thal")) return XK_Arabic_thal;
if (!strcmp(s, "Arabic_ra")) return XK_Arabic_ra;
if (!strcmp(s, "Arabic_zain")) return XK_Arabic_zain;
if (!strcmp(s, "Arabic_seen")) return XK_Arabic_seen;
if (!strcmp(s, "Arabic_sheen")) return XK_Arabic_sheen;
if (!strcmp(s, "Arabic_sad")) return XK_Arabic_sad;
if (!strcmp(s, "Arabic_dad")) return XK_Arabic_dad;
if (!strcmp(s, "Arabic_tah")) return XK_Arabic_tah;
if (!strcmp(s, "Arabic_zah")) return XK_Arabic_zah;
if (!strcmp(s, "Arabic_ain")) return XK_Arabic_ain;
if (!strcmp(s, "Arabic_ghain")) return XK_Arabic_ghain;
if (!strcmp(s, "Arabic_tatweel")) return XK_Arabic_tatweel;
if (!strcmp(s, "Arabic_feh")) return XK_Arabic_feh;
if (!strcmp(s, "Arabic_qaf")) return XK_Arabic_qaf;
if (!strcmp(s, "Arabic_kaf")) return XK_Arabic_kaf;
if (!strcmp(s, "Arabic_lam")) return XK_Arabic_lam;
if (!strcmp(s, "Arabic_meem")) return XK_Arabic_meem;
if (!strcmp(s, "Arabic_noon")) return XK_Arabic_noon;
if (!strcmp(s, "Arabic_ha")) return XK_Arabic_ha;
if (!strcmp(s, "Arabic_heh")) return XK_Arabic_heh;
if (!strcmp(s, "Arabic_waw")) return XK_Arabic_waw;
if (!strcmp(s, "Arabic_alefmaksura")) return XK_Arabic_alefmaksura;
if (!strcmp(s, "Arabic_yeh")) return XK_Arabic_yeh;
if (!strcmp(s, "Arabic_fathatan")) return XK_Arabic_fathatan;
if (!strcmp(s, "Arabic_dammatan")) return XK_Arabic_dammatan;
if (!strcmp(s, "Arabic_kasratan")) return XK_Arabic_kasratan;
if (!strcmp(s, "Arabic_fatha")) return XK_Arabic_fatha;
if (!strcmp(s, "Arabic_damma")) return XK_Arabic_damma;
if (!strcmp(s, "Arabic_kasra")) return XK_Arabic_kasra;
if (!strcmp(s, "Arabic_shadda")) return XK_Arabic_shadda;
if (!strcmp(s, "Arabic_sukun")) return XK_Arabic_sukun;
if (!strcmp(s, "Arabic_switch")) return XK_Arabic_switch;
#endif /* XK_ARABIC */
#ifdef XK_CYRILLIC
if (!strcmp(s, "Serbian_dje")) return XK_Serbian_dje;
if (!strcmp(s, "Macedonia_gje")) return XK_Macedonia_gje;
if (!strcmp(s, "Cyrillic_io")) return XK_Cyrillic_io;
if (!strcmp(s, "Ukrainian_ie")) return XK_Ukrainian_ie;
if (!strcmp(s, "Ukranian_je")) return XK_Ukranian_je;
if (!strcmp(s, "Macedonia_dse")) return XK_Macedonia_dse;
if (!strcmp(s, "Ukrainian_i")) return XK_Ukrainian_i;
if (!strcmp(s, "Ukranian_i")) return XK_Ukranian_i;
if (!strcmp(s, "Ukrainian_yi")) return XK_Ukrainian_yi;
if (!strcmp(s, "Ukranian_yi")) return XK_Ukranian_yi;
if (!strcmp(s, "Cyrillic_je")) return XK_Cyrillic_je;
if (!strcmp(s, "Serbian_je")) return XK_Serbian_je;
if (!strcmp(s, "Cyrillic_lje")) return XK_Cyrillic_lje;
if (!strcmp(s, "Serbian_lje")) return XK_Serbian_lje;
if (!strcmp(s, "Cyrillic_nje")) return XK_Cyrillic_nje;
if (!strcmp(s, "Serbian_nje")) return XK_Serbian_nje;
if (!strcmp(s, "Serbian_tshe")) return XK_Serbian_tshe;
if (!strcmp(s, "Macedonia_kje")) return XK_Macedonia_kje;
if (!strcmp(s, "Byelorussian_shortu")) return XK_Byelorussian_shortu;
if (!strcmp(s, "Cyrillic_dzhe")) return XK_Cyrillic_dzhe;
if (!strcmp(s, "Serbian_dze")) return XK_Serbian_dze;
if (!strcmp(s, "numerosign")) return XK_numerosign;
if (!strcmp(s, "Serbian_DJE")) return XK_Serbian_DJE;
if (!strcmp(s, "Macedonia_GJE")) return XK_Macedonia_GJE;
if (!strcmp(s, "Cyrillic_IO")) return XK_Cyrillic_IO;
if (!strcmp(s, "Ukrainian_IE")) return XK_Ukrainian_IE;
if (!strcmp(s, "Ukranian_JE")) return XK_Ukranian_JE;
if (!strcmp(s, "Macedonia_DSE")) return XK_Macedonia_DSE;
if (!strcmp(s, "Ukrainian_I")) return XK_Ukrainian_I;
if (!strcmp(s, "Ukranian_I")) return XK_Ukranian_I;
if (!strcmp(s, "Ukrainian_YI")) return XK_Ukrainian_YI;
if (!strcmp(s, "Ukranian_YI")) return XK_Ukranian_YI;
if (!strcmp(s, "Cyrillic_JE")) return XK_Cyrillic_JE;
if (!strcmp(s, "Serbian_JE")) return XK_Serbian_JE;
if (!strcmp(s, "Cyrillic_LJE")) return XK_Cyrillic_LJE;
if (!strcmp(s, "Serbian_LJE")) return XK_Serbian_LJE;
if (!strcmp(s, "Cyrillic_NJE")) return XK_Cyrillic_NJE;
if (!strcmp(s, "Serbian_NJE")) return XK_Serbian_NJE;
if (!strcmp(s, "Serbian_TSHE")) return XK_Serbian_TSHE;
if (!strcmp(s, "Macedonia_KJE")) return XK_Macedonia_KJE;
if (!strcmp(s, "Byelorussian_SHORTU")) return XK_Byelorussian_SHORTU;
if (!strcmp(s, "Cyrillic_DZHE")) return XK_Cyrillic_DZHE;
if (!strcmp(s, "Serbian_DZE")) return XK_Serbian_DZE;
if (!strcmp(s, "Cyrillic_yu")) return XK_Cyrillic_yu;
if (!strcmp(s, "Cyrillic_a")) return XK_Cyrillic_a;
if (!strcmp(s, "Cyrillic_be")) return XK_Cyrillic_be;
if (!strcmp(s, "Cyrillic_tse")) return XK_Cyrillic_tse;
if (!strcmp(s, "Cyrillic_de")) return XK_Cyrillic_de;
if (!strcmp(s, "Cyrillic_ie")) return XK_Cyrillic_ie;
if (!strcmp(s, "Cyrillic_ef")) return XK_Cyrillic_ef;
if (!strcmp(s, "Cyrillic_ghe")) return XK_Cyrillic_ghe;
if (!strcmp(s, "Cyrillic_ha")) return XK_Cyrillic_ha;
if (!strcmp(s, "Cyrillic_i")) return XK_Cyrillic_i;
if (!strcmp(s, "Cyrillic_shorti")) return XK_Cyrillic_shorti;
if (!strcmp(s, "Cyrillic_ka")) return XK_Cyrillic_ka;
if (!strcmp(s, "Cyrillic_el")) return XK_Cyrillic_el;
if (!strcmp(s, "Cyrillic_em")) return XK_Cyrillic_em;
if (!strcmp(s, "Cyrillic_en")) return XK_Cyrillic_en;
if (!strcmp(s, "Cyrillic_o")) return XK_Cyrillic_o;
if (!strcmp(s, "Cyrillic_pe")) return XK_Cyrillic_pe;
if (!strcmp(s, "Cyrillic_ya")) return XK_Cyrillic_ya;
if (!strcmp(s, "Cyrillic_er")) return XK_Cyrillic_er;
if (!strcmp(s, "Cyrillic_es")) return XK_Cyrillic_es;
if (!strcmp(s, "Cyrillic_te")) return XK_Cyrillic_te;
if (!strcmp(s, "Cyrillic_u")) return XK_Cyrillic_u;
if (!strcmp(s, "Cyrillic_zhe")) return XK_Cyrillic_zhe;
if (!strcmp(s, "Cyrillic_ve")) return XK_Cyrillic_ve;
if (!strcmp(s, "Cyrillic_softsign")) return XK_Cyrillic_softsign;
if (!strcmp(s, "Cyrillic_yeru")) return XK_Cyrillic_yeru;
if (!strcmp(s, "Cyrillic_ze")) return XK_Cyrillic_ze;
if (!strcmp(s, "Cyrillic_sha")) return XK_Cyrillic_sha;
if (!strcmp(s, "Cyrillic_e")) return XK_Cyrillic_e;
if (!strcmp(s, "Cyrillic_shcha")) return XK_Cyrillic_shcha;
if (!strcmp(s, "Cyrillic_che")) return XK_Cyrillic_che;
if (!strcmp(s, "Cyrillic_hardsign")) return XK_Cyrillic_hardsign;
if (!strcmp(s, "Cyrillic_YU")) return XK_Cyrillic_YU;
if (!strcmp(s, "Cyrillic_A")) return XK_Cyrillic_A;
if (!strcmp(s, "Cyrillic_BE")) return XK_Cyrillic_BE;
if (!strcmp(s, "Cyrillic_TSE")) return XK_Cyrillic_TSE;
if (!strcmp(s, "Cyrillic_DE")) return XK_Cyrillic_DE;
if (!strcmp(s, "Cyrillic_IE")) return XK_Cyrillic_IE;
if (!strcmp(s, "Cyrillic_EF")) return XK_Cyrillic_EF;
if (!strcmp(s, "Cyrillic_GHE")) return XK_Cyrillic_GHE;
if (!strcmp(s, "Cyrillic_HA")) return XK_Cyrillic_HA;
if (!strcmp(s, "Cyrillic_I")) return XK_Cyrillic_I;
if (!strcmp(s, "Cyrillic_SHORTI")) return XK_Cyrillic_SHORTI;
if (!strcmp(s, "Cyrillic_KA")) return XK_Cyrillic_KA;
if (!strcmp(s, "Cyrillic_EL")) return XK_Cyrillic_EL;
if (!strcmp(s, "Cyrillic_EM")) return XK_Cyrillic_EM;
if (!strcmp(s, "Cyrillic_EN")) return XK_Cyrillic_EN;
if (!strcmp(s, "Cyrillic_O")) return XK_Cyrillic_O;
if (!strcmp(s, "Cyrillic_PE")) return XK_Cyrillic_PE;
if (!strcmp(s, "Cyrillic_YA")) return XK_Cyrillic_YA;
if (!strcmp(s, "Cyrillic_ER")) return XK_Cyrillic_ER;
if (!strcmp(s, "Cyrillic_ES")) return XK_Cyrillic_ES;
if (!strcmp(s, "Cyrillic_TE")) return XK_Cyrillic_TE;
if (!strcmp(s, "Cyrillic_U")) return XK_Cyrillic_U;
if (!strcmp(s, "Cyrillic_ZHE")) return XK_Cyrillic_ZHE;
if (!strcmp(s, "Cyrillic_VE")) return XK_Cyrillic_VE;
if (!strcmp(s, "Cyrillic_SOFTSIGN")) return XK_Cyrillic_SOFTSIGN;
if (!strcmp(s, "Cyrillic_YERU")) return XK_Cyrillic_YERU;
if (!strcmp(s, "Cyrillic_ZE")) return XK_Cyrillic_ZE;
if (!strcmp(s, "Cyrillic_SHA")) return XK_Cyrillic_SHA;
if (!strcmp(s, "Cyrillic_E")) return XK_Cyrillic_E;
if (!strcmp(s, "Cyrillic_SHCHA")) return XK_Cyrillic_SHCHA;
if (!strcmp(s, "Cyrillic_CHE")) return XK_Cyrillic_CHE;
if (!strcmp(s, "Cyrillic_HARDSIGN")) return XK_Cyrillic_HARDSIGN;
#endif /* XK_CYRILLIC */
#ifdef XK_GREEK
if (!strcmp(s, "Greek_ALPHAaccent")) return XK_Greek_ALPHAaccent;
if (!strcmp(s, "Greek_EPSILONaccent")) return XK_Greek_EPSILONaccent;
if (!strcmp(s, "Greek_ETAaccent")) return XK_Greek_ETAaccent;
if (!strcmp(s, "Greek_IOTAaccent")) return XK_Greek_IOTAaccent;
if (!strcmp(s, "Greek_IOTAdieresis")) return XK_Greek_IOTAdieresis;
if (!strcmp(s, "Greek_OMICRONaccent")) return XK_Greek_OMICRONaccent;
if (!strcmp(s, "Greek_UPSILONaccent")) return XK_Greek_UPSILONaccent;
if (!strcmp(s, "Greek_UPSILONdieresis")) return XK_Greek_UPSILONdieresis;
if (!strcmp(s, "Greek_OMEGAaccent")) return XK_Greek_OMEGAaccent;
if (!strcmp(s, "Greek_accentdieresis")) return XK_Greek_accentdieresis;
if (!strcmp(s, "Greek_horizbar")) return XK_Greek_horizbar;
if (!strcmp(s, "Greek_alphaaccent")) return XK_Greek_alphaaccent;
if (!strcmp(s, "Greek_epsilonaccent")) return XK_Greek_epsilonaccent;
if (!strcmp(s, "Greek_etaaccent")) return XK_Greek_etaaccent;
if (!strcmp(s, "Greek_iotaaccent")) return XK_Greek_iotaaccent;
if (!strcmp(s, "Greek_iotadieresis")) return XK_Greek_iotadieresis;
if (!strcmp(s, "Greek_iotaaccentdieresis")) return XK_Greek_iotaaccentdieresis;
if (!strcmp(s, "Greek_omicronaccent")) return XK_Greek_omicronaccent;
if (!strcmp(s, "Greek_upsilonaccent")) return XK_Greek_upsilonaccent;
if (!strcmp(s, "Greek_upsilondieresis")) return XK_Greek_upsilondieresis;
if (!strcmp(s, "Greek_upsilonaccentdieresis")) return XK_Greek_upsilonaccentdieresis;
if (!strcmp(s, "Greek_omegaaccent")) return XK_Greek_omegaaccent;
if (!strcmp(s, "Greek_ALPHA")) return XK_Greek_ALPHA;
if (!strcmp(s, "Greek_BETA")) return XK_Greek_BETA;
if (!strcmp(s, "Greek_GAMMA")) return XK_Greek_GAMMA;
if (!strcmp(s, "Greek_DELTA")) return XK_Greek_DELTA;
if (!strcmp(s, "Greek_EPSILON")) return XK_Greek_EPSILON;
if (!strcmp(s, "Greek_ZETA")) return XK_Greek_ZETA;
if (!strcmp(s, "Greek_ETA")) return XK_Greek_ETA;
if (!strcmp(s, "Greek_THETA")) return XK_Greek_THETA;
if (!strcmp(s, "Greek_IOTA")) return XK_Greek_IOTA;
if (!strcmp(s, "Greek_KAPPA")) return XK_Greek_KAPPA;
if (!strcmp(s, "Greek_LAMDA")) return XK_Greek_LAMDA;
if (!strcmp(s, "Greek_LAMBDA")) return XK_Greek_LAMBDA;
if (!strcmp(s, "Greek_MU")) return XK_Greek_MU;
if (!strcmp(s, "Greek_NU")) return XK_Greek_NU;
if (!strcmp(s, "Greek_XI")) return XK_Greek_XI;
if (!strcmp(s, "Greek_OMICRON")) return XK_Greek_OMICRON;
if (!strcmp(s, "Greek_PI")) return XK_Greek_PI;
if (!strcmp(s, "Greek_RHO")) return XK_Greek_RHO;
if (!strcmp(s, "Greek_SIGMA")) return XK_Greek_SIGMA;
if (!strcmp(s, "Greek_TAU")) return XK_Greek_TAU;
if (!strcmp(s, "Greek_UPSILON")) return XK_Greek_UPSILON;
if (!strcmp(s, "Greek_PHI")) return XK_Greek_PHI;
if (!strcmp(s, "Greek_CHI")) return XK_Greek_CHI;
if (!strcmp(s, "Greek_PSI")) return XK_Greek_PSI;
if (!strcmp(s, "Greek_OMEGA")) return XK_Greek_OMEGA;
if (!strcmp(s, "Greek_alpha")) return XK_Greek_alpha;
if (!strcmp(s, "Greek_beta")) return XK_Greek_beta;
if (!strcmp(s, "Greek_gamma")) return XK_Greek_gamma;
if (!strcmp(s, "Greek_delta")) return XK_Greek_delta;
if (!strcmp(s, "Greek_epsilon")) return XK_Greek_epsilon;
if (!strcmp(s, "Greek_zeta")) return XK_Greek_zeta;