-
Notifications
You must be signed in to change notification settings - Fork 41
/
keylayouts.c
6565 lines (6394 loc) · 258 KB
/
keylayouts.c
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
/* Modifications
* Copyright (c) 2015-2020, CryptoTrust LLC.
* All rights reserved.
*
* Author : Tim Steiner <[email protected]>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by CryptoTrust LLC. for
* the OnlyKey Project (https://www.crp.to/ok)"
*
* 4. The names "OnlyKey" and "CryptoTrust" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
*
* 5. Products derived from this software may not be called "OnlyKey"
* nor may "OnlyKey" or "CryptoTrust" appear in their names without
* specific prior written permission. For written permission, please
* contact [email protected].
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by CryptoTrust LLC. for
* the OnlyKey Project (https://www.crp.to/ok)"
*
* 7. Redistributions in any form must be accompanied by information on
* how to obtain complete source code for this software and any
* accompanying software that uses this software. The source code
* must either be included in the distribution or be available for
* no more than the cost of distribution plus a nominal fee, and must
* be freely redistributable under reasonable conditions. For a
* binary file, complete source code means the source code for all
* modules it contains.
*
* NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS
* ARE GRANTED BY THIS LICENSE. IF SOFTWARE RECIPIENT INSTITUTES PATENT
* LITIGATION AGAINST ANY ENTITY (INCLUDING A CROSS-CLAIM OR COUNTERCLAIM
* IN A LAWSUIT) ALLEGING THAT THIS SOFTWARE (INCLUDING COMBINATIONS OF THE
* SOFTWARE WITH OTHER SOFTWARE OR HARDWARE) INFRINGES SUCH SOFTWARE
* RECIPIENT'S PATENT(S), THEN SUCH SOFTWARE RECIPIENT'S RIGHTS GRANTED BY
* THIS LICENSE SHALL TERMINATE AS OF THE DATE SUCH LITIGATION IS FILED. IF
* ANY PROVISION OF THIS AGREEMENT IS INVALID OR UNENFORCEABLE UNDER
* APPLICABLE LAW, IT SHALL NOT AFFECT THE VALIDITY OR ENFORCEABILITY OF THE
* REMAINDER OF THE TERMS OF THIS AGREEMENT, AND WITHOUT FURTHER ACTION
* BY THE PARTIES HERETO, SUCH PROVISION SHALL BE REFORMED TO THE MINIMUM
* EXTENT NECESSARY TO MAKE SUCH PROVISION VALID AND ENFORCEABLE. ALL
* SOFTWARE RECIPIENT'S RIGHTS UNDER THIS AGREEMENT SHALL TERMINATE IF IT
* FAILS TO COMPLY WITH ANY OF THE MATERIAL TERMS OR CONDITIONS OF THIS
* AGREEMENT AND DOES NOT CURE SUCH FAILURE IN A REASONABLE PERIOD OF
* TIME AFTER BECOMING AWARE OF SUCH NONCOMPLIANCE. THIS SOFTWARE IS
* PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* Original Teensyduino Core Library
* http://www.pjrc.com/teensy/
* Copyright (c) 2013 PJRC.COM, LLC.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* 1. The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* 2. If the Software is incorporated into a build system that allows
* selection among a list of target devices, then similar target
* devices manufactured by PJRC.COM must be included in the list of
* target devices and selectable in the same manner.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include <avr/pgmspace.h>
#include <stdint.h>
#include "keylayouts.h"
#ifdef M
#undef M
#endif
#define M(n) ((n) & KEYCODE_MASK)
KEYCODE_TYPE keycodes_ascii[96] = {0};
KEYCODE_TYPE keycodes_iso_8859_1[96] = {0};
uint8_t KeyboardLayout[1];
uint16_t SHIFT_MASK = 0;
uint16_t ALTGR_MASK = 0;
uint16_t RCTRL_MASK = 0;
uint16_t KEY_NON_US_100 = 0;
uint16_t DEADKEYS_MASK = 0;
uint16_t CIRCUMFLEX_BITS = 0;
uint16_t ACUTE_ACCENT_BITS = 0;
uint16_t GRAVE_ACCENT_BITS = 0;
uint16_t TILDE_BITS = 0;
uint16_t DIAERESIS_BITS = 0;
uint16_t DEADKEY_CIRCUMFLEX = 0;
uint16_t DEADKEY_ACUTE_ACCENT = 0;
uint16_t DEADKEY_GRAVE_ACCENT = 0;
uint16_t DEADKEY_TILDE = 0;
uint16_t DEADKEY_DIAERESIS = 0;
uint16_t UNICODE_20AC = 0;
uint16_t CEDILLA_BITS = 0;
uint16_t DEADKEY_CEDILLA = 0;
uint16_t RING_ABOVE_BITS = 0;
uint16_t DEADKEY_RING_ABOVE = 0;
uint16_t DEGREE_SIGN_BITS = 0;
uint16_t CARON_BITS = 0;
uint16_t BREVE_BITS = 0;
uint16_t OGONEK_BITS = 0;
uint16_t DOT_ABOVE_BITS = 0;
uint16_t DOUBLE_ACUTE_BITS = 0;
uint16_t DEADKEY_DEGREE_SIGN = 0;
uint16_t DEADKEY_CARON = 0;
uint16_t DEADKEY_BREVE = 0;
uint16_t DEADKEY_OGONEK = 0;
uint16_t DEADKEY_DOT_ABOVE = 0;
uint16_t DEADKEY_DOUBLE_ACUTE = 0;
uint16_t UNICODE_EXTRA0A = 0;
uint16_t KEYCODE_EXTRA0A = 0;
uint16_t ISO_8859_1_A0 = 0;
uint16_t UNICODE_EXTRA00 = 0;
uint16_t UNICODE_EXTRA01 = 0;
uint16_t UNICODE_EXTRA02 = 0;
uint16_t UNICODE_EXTRA03 = 0;
uint16_t UNICODE_EXTRA04 = 0;
uint16_t UNICODE_EXTRA05 = 0;
uint16_t UNICODE_EXTRA06 = 0;
uint16_t UNICODE_EXTRA07 = 0;
uint16_t UNICODE_EXTRA08 = 0;
uint16_t UNICODE_EXTRA09 = 0;
uint16_t KEYCODE_EXTRA00 = 0;
uint16_t KEYCODE_EXTRA01 = 0;
uint16_t KEYCODE_EXTRA02 = 0;
uint16_t KEYCODE_EXTRA03 = 0;
uint16_t KEYCODE_EXTRA04 = 0;
uint16_t KEYCODE_EXTRA05 = 0;
uint16_t KEYCODE_EXTRA06 = 0;
uint16_t KEYCODE_EXTRA07 = 0;
uint16_t KEYCODE_EXTRA08 = 0;
uint16_t KEYCODE_EXTRA09 = 0;
uint16_t KEYCODE_MASK = 0;
void update_keyboard_layout() {
SHIFT_MASK = 0;
ALTGR_MASK = 0;
RCTRL_MASK = 0;
KEY_NON_US_100 = 0;
DEADKEYS_MASK = 0;
CIRCUMFLEX_BITS = 0;
ACUTE_ACCENT_BITS = 0;
GRAVE_ACCENT_BITS = 0;
TILDE_BITS = 0;
DIAERESIS_BITS = 0;
DEADKEY_CIRCUMFLEX = 0;
DEADKEY_ACUTE_ACCENT = 0;
DEADKEY_GRAVE_ACCENT = 0;
DEADKEY_TILDE = 0;
DEADKEY_DIAERESIS = 0;
UNICODE_20AC = 0;
CEDILLA_BITS = 0;
DEADKEY_CEDILLA = 0;
RING_ABOVE_BITS = 0;
DEADKEY_RING_ABOVE = 0;
DEGREE_SIGN_BITS = 0;
CARON_BITS = 0;
BREVE_BITS = 0;
OGONEK_BITS = 0;
DOT_ABOVE_BITS = 0;
DOUBLE_ACUTE_BITS = 0;
DEADKEY_DEGREE_SIGN = 0;
DEADKEY_CARON = 0;
DEADKEY_BREVE = 0;
DEADKEY_OGONEK = 0;
DEADKEY_DOT_ABOVE = 0;
DEADKEY_DOUBLE_ACUTE = 0;
UNICODE_EXTRA0A = 0;
KEYCODE_EXTRA0A = 0;
uint16_t ASCII_20 = 0;
uint16_t ASCII_21 = 0;
uint16_t ASCII_22 = 0;
uint16_t ASCII_23 = 0;
uint16_t ASCII_24 = 0;
uint16_t ASCII_25 = 0;
uint16_t ASCII_26 = 0;
uint16_t ASCII_27 = 0;
uint16_t ASCII_28 = 0;
uint16_t ASCII_29 = 0;
uint16_t ASCII_2A = 0;
uint16_t ASCII_2B = 0;
uint16_t ASCII_2C = 0;
uint16_t ASCII_2D = 0;
uint16_t ASCII_2E = 0;
uint16_t ASCII_2F = 0;
uint16_t ASCII_30 = 0;
uint16_t ASCII_31 = 0;
uint16_t ASCII_32 = 0;
uint16_t ASCII_33 = 0;
uint16_t ASCII_34 = 0;
uint16_t ASCII_35 = 0;
uint16_t ASCII_36 = 0;
uint16_t ASCII_37 = 0;
uint16_t ASCII_38 = 0;
uint16_t ASCII_39 = 0;
uint16_t ASCII_3A = 0;
uint16_t ASCII_3B = 0;
uint16_t ASCII_3C = 0;
uint16_t ASCII_3D = 0;
uint16_t ASCII_3E = 0;
uint16_t ASCII_3F = 0;
uint16_t ASCII_40 = 0;
uint16_t ASCII_41 = 0;
uint16_t ASCII_42 = 0;
uint16_t ASCII_43 = 0;
uint16_t ASCII_44 = 0;
uint16_t ASCII_45 = 0;
uint16_t ASCII_46 = 0;
uint16_t ASCII_47 = 0;
uint16_t ASCII_48 = 0;
uint16_t ASCII_49 = 0;
uint16_t ASCII_4A = 0;
uint16_t ASCII_4B = 0;
uint16_t ASCII_4C = 0;
uint16_t ASCII_4D = 0;
uint16_t ASCII_4E = 0;
uint16_t ASCII_4F = 0;
uint16_t ASCII_50 = 0;
uint16_t ASCII_51 = 0;
uint16_t ASCII_52 = 0;
uint16_t ASCII_53 = 0;
uint16_t ASCII_54 = 0;
uint16_t ASCII_55 = 0;
uint16_t ASCII_56 = 0;
uint16_t ASCII_57 = 0;
uint16_t ASCII_58 = 0;
uint16_t ASCII_59 = 0;
uint16_t ASCII_5A = 0;
uint16_t ASCII_5B = 0;
uint16_t ASCII_5C = 0;
uint16_t ASCII_5D = 0;
uint16_t ASCII_5E = 0;
uint16_t ASCII_5F = 0;
uint16_t ASCII_60 = 0;
uint16_t ASCII_61 = 0;
uint16_t ASCII_62 = 0;
uint16_t ASCII_63 = 0;
uint16_t ASCII_64 = 0;
uint16_t ASCII_65 = 0;
uint16_t ASCII_66 = 0;
uint16_t ASCII_67 = 0;
uint16_t ASCII_68 = 0;
uint16_t ASCII_69 = 0;
uint16_t ASCII_6A = 0;
uint16_t ASCII_6B = 0;
uint16_t ASCII_6C = 0;
uint16_t ASCII_6D = 0;
uint16_t ASCII_6E = 0;
uint16_t ASCII_6F = 0;
uint16_t ASCII_70 = 0;
uint16_t ASCII_71 = 0;
uint16_t ASCII_72 = 0;
uint16_t ASCII_73 = 0;
uint16_t ASCII_74 = 0;
uint16_t ASCII_75 = 0;
uint16_t ASCII_76 = 0;
uint16_t ASCII_77 = 0;
uint16_t ASCII_78 = 0;
uint16_t ASCII_79 = 0;
uint16_t ASCII_7A = 0;
uint16_t ASCII_7B = 0;
uint16_t ASCII_7C = 0;
uint16_t ASCII_7D = 0;
uint16_t ASCII_7E = 0;
uint16_t ASCII_7F = 0;
ISO_8859_1_A0 = 0;
uint16_t ISO_8859_1_A1 = 0;
uint16_t ISO_8859_1_A2 = 0;
uint16_t ISO_8859_1_A3 = 0;
uint16_t ISO_8859_1_A4 = 0;
uint16_t ISO_8859_1_A5 = 0;
uint16_t ISO_8859_1_A6 = 0;
uint16_t ISO_8859_1_A7 = 0;
uint16_t ISO_8859_1_A8 = 0;
uint16_t ISO_8859_1_A9 = 0;
uint16_t ISO_8859_1_AA = 0;
uint16_t ISO_8859_1_AB = 0;
uint16_t ISO_8859_1_AC = 0;
uint16_t ISO_8859_1_AD = 0;
uint16_t ISO_8859_1_AE = 0;
uint16_t ISO_8859_1_AF = 0;
uint16_t ISO_8859_1_B0 = 0;
uint16_t ISO_8859_1_B1 = 0;
uint16_t ISO_8859_1_B2 = 0;
uint16_t ISO_8859_1_B3 = 0;
uint16_t ISO_8859_1_B4 = 0;
uint16_t ISO_8859_1_B5 = 0;
uint16_t ISO_8859_1_B6 = 0;
uint16_t ISO_8859_1_B7 = 0;
uint16_t ISO_8859_1_B8 = 0;
uint16_t ISO_8859_1_B9 = 0;
uint16_t ISO_8859_1_BA = 0;
uint16_t ISO_8859_1_BB = 0;
uint16_t ISO_8859_1_BC = 0;
uint16_t ISO_8859_1_BD = 0;
uint16_t ISO_8859_1_BE = 0;
uint16_t ISO_8859_1_BF = 0;
uint16_t ISO_8859_1_C0 = 0;
uint16_t ISO_8859_1_C1 = 0;
uint16_t ISO_8859_1_C2 = 0;
uint16_t ISO_8859_1_C3 = 0;
uint16_t ISO_8859_1_C4 = 0;
uint16_t ISO_8859_1_C5 = 0;
uint16_t ISO_8859_1_C6 = 0;
uint16_t ISO_8859_1_C7 = 0;
uint16_t ISO_8859_1_C8 = 0;
uint16_t ISO_8859_1_C9 = 0;
uint16_t ISO_8859_1_CA = 0;
uint16_t ISO_8859_1_CB = 0;
uint16_t ISO_8859_1_CC = 0;
uint16_t ISO_8859_1_CD = 0;
uint16_t ISO_8859_1_CE = 0;
uint16_t ISO_8859_1_CF = 0;
uint16_t ISO_8859_1_D0 = 0;
uint16_t ISO_8859_1_D1 = 0;
uint16_t ISO_8859_1_D2 = 0;
uint16_t ISO_8859_1_D3 = 0;
uint16_t ISO_8859_1_D4 = 0;
uint16_t ISO_8859_1_D5 = 0;
uint16_t ISO_8859_1_D6 = 0;
uint16_t ISO_8859_1_D7 = 0;
uint16_t ISO_8859_1_D8 = 0;
uint16_t ISO_8859_1_D9 = 0;
uint16_t ISO_8859_1_DA = 0;
uint16_t ISO_8859_1_DB = 0;
uint16_t ISO_8859_1_DC = 0;
uint16_t ISO_8859_1_DD = 0;
uint16_t ISO_8859_1_DE = 0;
uint16_t ISO_8859_1_DF = 0;
uint16_t ISO_8859_1_E0 = 0;
uint16_t ISO_8859_1_E1 = 0;
uint16_t ISO_8859_1_E2 = 0;
uint16_t ISO_8859_1_E3 = 0;
uint16_t ISO_8859_1_E4 = 0;
uint16_t ISO_8859_1_E5 = 0;
uint16_t ISO_8859_1_E6 = 0;
uint16_t ISO_8859_1_E7 = 0;
uint16_t ISO_8859_1_E8 = 0;
uint16_t ISO_8859_1_E9 = 0;
uint16_t ISO_8859_1_EA = 0;
uint16_t ISO_8859_1_EB = 0;
uint16_t ISO_8859_1_EC = 0;
uint16_t ISO_8859_1_ED = 0;
uint16_t ISO_8859_1_EE = 0;
uint16_t ISO_8859_1_EF = 0;
uint16_t ISO_8859_1_F0 = 0;
uint16_t ISO_8859_1_F1 = 0;
uint16_t ISO_8859_1_F2 = 0;
uint16_t ISO_8859_1_F3 = 0;
uint16_t ISO_8859_1_F4 = 0;
uint16_t ISO_8859_1_F5 = 0;
uint16_t ISO_8859_1_F6 = 0;
uint16_t ISO_8859_1_F7 = 0;
uint16_t ISO_8859_1_F8 = 0;
uint16_t ISO_8859_1_F9 = 0;
uint16_t ISO_8859_1_FA = 0;
uint16_t ISO_8859_1_FB = 0;
uint16_t ISO_8859_1_FC = 0;
uint16_t ISO_8859_1_FD = 0;
uint16_t ISO_8859_1_FE = 0;
uint16_t ISO_8859_1_FF = 0;
UNICODE_EXTRA00 = 0;
UNICODE_EXTRA01 = 0;
UNICODE_EXTRA02 = 0;
UNICODE_EXTRA03 = 0;
UNICODE_EXTRA04 = 0;
UNICODE_EXTRA05 = 0;
UNICODE_EXTRA06 = 0;
UNICODE_EXTRA07 = 0;
UNICODE_EXTRA08 = 0;
UNICODE_EXTRA09 = 0;
uint16_t UNICODE_EXTRA10 = 0;
uint16_t UNICODE_EXTRA11 = 0;
uint16_t UNICODE_EXTRA12 = 0;
uint16_t UNICODE_EXTRA13 = 0;
uint16_t UNICODE_EXTRA14 = 0;
uint16_t UNICODE_EXTRA15 = 0;
uint16_t UNICODE_EXTRA16 = 0;
uint16_t UNICODE_EXTRA17 = 0;
uint16_t UNICODE_EXTRA18 = 0;
uint16_t UNICODE_EXTRA19 = 0;
uint16_t UNICODE_EXTRA20 = 0;
uint16_t UNICODE_EXTRA21 = 0;
uint16_t UNICODE_EXTRA22 = 0;
uint16_t UNICODE_EXTRA23 = 0;
uint16_t UNICODE_EXTRA24 = 0;
uint16_t UNICODE_EXTRA25 = 0;
uint16_t UNICODE_EXTRA26 = 0;
uint16_t UNICODE_EXTRA27 = 0;
uint16_t UNICODE_EXTRA28 = 0;
uint16_t UNICODE_EXTRA29 = 0;
uint16_t UNICODE_EXTRA30 = 0;
uint16_t UNICODE_EXTRA31 = 0;
uint16_t UNICODE_EXTRA32 = 0;
uint16_t UNICODE_EXTRA33 = 0;
uint16_t UNICODE_EXTRA34 = 0;
uint16_t UNICODE_EXTRA35 = 0;
uint16_t UNICODE_EXTRA36 = 0;
uint16_t UNICODE_EXTRA37 = 0;
uint16_t UNICODE_EXTRA38 = 0;
uint16_t UNICODE_EXTRA39 = 0;
uint16_t UNICODE_EXTRA40 = 0;
uint16_t UNICODE_EXTRA41 = 0;
uint16_t UNICODE_EXTRA42 = 0;
uint16_t UNICODE_EXTRA43 = 0;
uint16_t UNICODE_EXTRA44 = 0;
uint16_t UNICODE_EXTRA45 = 0;
uint16_t UNICODE_EXTRA46 = 0;
uint16_t UNICODE_EXTRA47 = 0;
uint16_t UNICODE_EXTRA48 = 0;
uint16_t UNICODE_EXTRA49 = 0;
uint16_t UNICODE_EXTRA50 = 0;
uint16_t UNICODE_EXTRA51 = 0;
KEYCODE_EXTRA00 = 0;
KEYCODE_EXTRA01 = 0;
KEYCODE_EXTRA02 = 0;
KEYCODE_EXTRA03 = 0;
KEYCODE_EXTRA04 = 0;
KEYCODE_EXTRA05 = 0;
KEYCODE_EXTRA06 = 0;
KEYCODE_EXTRA07 = 0;
KEYCODE_EXTRA08 = 0;
KEYCODE_EXTRA09 = 0;
uint16_t KEYCODE_EXTRA10 = 0;
uint16_t KEYCODE_EXTRA11 = 0;
uint16_t KEYCODE_EXTRA12 = 0;
uint16_t KEYCODE_EXTRA13 = 0;
uint16_t KEYCODE_EXTRA14 = 0;
uint16_t KEYCODE_EXTRA15 = 0;
uint16_t KEYCODE_EXTRA16 = 0;
uint16_t KEYCODE_EXTRA17 = 0;
uint16_t KEYCODE_EXTRA18 = 0;
uint16_t KEYCODE_EXTRA19 = 0;
uint16_t KEYCODE_EXTRA20 = 0;
uint16_t KEYCODE_EXTRA21 = 0;
uint16_t KEYCODE_EXTRA22 = 0;
uint16_t KEYCODE_EXTRA23 = 0;
uint16_t KEYCODE_EXTRA24 = 0;
uint16_t KEYCODE_EXTRA25 = 0;
uint16_t KEYCODE_EXTRA26 = 0;
uint16_t KEYCODE_EXTRA27 = 0;
uint16_t KEYCODE_EXTRA28 = 0;
uint16_t KEYCODE_EXTRA29 = 0;
uint16_t KEYCODE_EXTRA30 = 0;
uint16_t KEYCODE_EXTRA31 = 0;
uint16_t KEYCODE_EXTRA32 = 0;
uint16_t KEYCODE_EXTRA33 = 0;
uint16_t KEYCODE_EXTRA34 = 0;
uint16_t KEYCODE_EXTRA35 = 0;
uint16_t KEYCODE_EXTRA36 = 0;
uint16_t KEYCODE_EXTRA37 = 0;
uint16_t KEYCODE_EXTRA38 = 0;
uint16_t KEYCODE_EXTRA39 = 0;
uint16_t KEYCODE_EXTRA40 = 0;
uint16_t KEYCODE_EXTRA41 = 0;
uint16_t KEYCODE_EXTRA42 = 0;
uint16_t KEYCODE_EXTRA43 = 0;
uint16_t KEYCODE_EXTRA44 = 0;
uint16_t KEYCODE_EXTRA45 = 0;
uint16_t KEYCODE_EXTRA46 = 0;
uint16_t KEYCODE_EXTRA47 = 0;
uint16_t KEYCODE_EXTRA48 = 0;
uint16_t KEYCODE_EXTRA49 = 0;
uint16_t KEYCODE_EXTRA50 = 0;
uint16_t KEYCODE_EXTRA51 = 0;
if (KeyboardLayout[0] == LAYOUT_USA_ENGLISH || KeyboardLayout[0] == LAYOUT_DVORAK || KeyboardLayout[0] == 0x00) {
SHIFT_MASK=0x0040;
//KEYCODE_TYPE=uint8_t
KEYCODE_MASK=0x007F;
ASCII_20=KEY_SPACE;// 32
ASCII_21=KEY_1 + SHIFT_MASK;// 33 !
ASCII_22=KEY_QUOTE + SHIFT_MASK;// 34 "
ASCII_23=KEY_3 + SHIFT_MASK;// 35 #
ASCII_24=KEY_4 + SHIFT_MASK;// 36 $
ASCII_25=KEY_5 + SHIFT_MASK;// 37 %
ASCII_26=KEY_7 + SHIFT_MASK;// 38 &
ASCII_27=KEY_QUOTE;// 39 '
ASCII_28=KEY_9 + SHIFT_MASK;// 40 (
ASCII_29=KEY_0 + SHIFT_MASK;// 41 )
ASCII_2A=KEY_8 + SHIFT_MASK;// 42 *
ASCII_2B=KEY_EQUAL + SHIFT_MASK;// 43 +
ASCII_2C=KEY_COMMA;// 44 ,
ASCII_2D=KEY_MINUS;// 45 -
ASCII_2E=KEY_PERIOD;// 46 .
ASCII_2F=KEY_SLASH;// 47 /
ASCII_30=KEY_0;// 48 0
ASCII_31=KEY_1;// 49 1
ASCII_32=KEY_2;// 50 2
ASCII_33=KEY_3;// 51 3
ASCII_34=KEY_4;// 52 4
ASCII_35=KEY_5;// 53 5
ASCII_36=KEY_6;// 54 6
ASCII_37=KEY_7;// 55 7
ASCII_38=KEY_8;// 55 8
ASCII_39=KEY_9;// 57 9
ASCII_3A=KEY_SEMICOLON + SHIFT_MASK;// 58 :
ASCII_3B=KEY_SEMICOLON;// 59 ;
ASCII_3C=KEY_COMMA + SHIFT_MASK;// 60 <
ASCII_3D=KEY_EQUAL;// 61 )=
ASCII_3E=KEY_PERIOD + SHIFT_MASK;// 62 >
ASCII_3F=KEY_SLASH + SHIFT_MASK;// 63 ?
ASCII_40=KEY_2 + SHIFT_MASK;// 64 @
ASCII_41=KEY_A + SHIFT_MASK;// 65 A
ASCII_42=KEY_B + SHIFT_MASK;// 66 B
ASCII_43=KEY_C + SHIFT_MASK;// 67 C
ASCII_44=KEY_D + SHIFT_MASK;// 68 D
ASCII_45=KEY_E + SHIFT_MASK;// 69 E
ASCII_46=KEY_F + SHIFT_MASK;// 70 F
ASCII_47=KEY_G + SHIFT_MASK;// 71 G
ASCII_48=KEY_H + SHIFT_MASK;// 72 H
ASCII_49=KEY_I + SHIFT_MASK;// 73 I
ASCII_4A=KEY_J + SHIFT_MASK;// 74 J
ASCII_4B=KEY_K + SHIFT_MASK;// 75 K
ASCII_4C=KEY_L + SHIFT_MASK;// 76 L
ASCII_4D=KEY_M + SHIFT_MASK;// 77 M
ASCII_4E=KEY_N + SHIFT_MASK;// 78 N
ASCII_4F=KEY_O + SHIFT_MASK;// 79 O
ASCII_50=KEY_P + SHIFT_MASK;// 80 P
ASCII_51=KEY_Q + SHIFT_MASK;// 81 Q
ASCII_52=KEY_R + SHIFT_MASK;// 82 R
ASCII_53=KEY_S + SHIFT_MASK;// 83 S
ASCII_54=KEY_T + SHIFT_MASK;// 84 T
ASCII_55=KEY_U + SHIFT_MASK;// 85 U
ASCII_56=KEY_V + SHIFT_MASK;// 86 V
ASCII_57=KEY_W + SHIFT_MASK;// 87 W
ASCII_58=KEY_X + SHIFT_MASK;// 88 X
ASCII_59=KEY_Y + SHIFT_MASK;// 89 Y
ASCII_5A=KEY_Z + SHIFT_MASK;// 90 Z
ASCII_5B=KEY_LEFT_BRACE;// 91 [
ASCII_5C=KEY_BACKSLASH;// 92
ASCII_5D=KEY_RIGHT_BRACE;// 93 ]
ASCII_5E=KEY_6 + SHIFT_MASK;// 94 ^
ASCII_5F=KEY_MINUS + SHIFT_MASK;// 95 _
ASCII_60=KEY_TILDE;// 96 `
ASCII_61=KEY_A;// 97 a
ASCII_62=KEY_B;// 98 b
ASCII_63=KEY_C;// 99 c
ASCII_64=KEY_D;// 100 d
ASCII_65=KEY_E;// 101 e
ASCII_66=KEY_F;// 102 f
ASCII_67=KEY_G;// 103 g
ASCII_68=KEY_H;// 104 h
ASCII_69=KEY_I;// 105 i
ASCII_6A=KEY_J;// 106 j
ASCII_6B=KEY_K;// 107 k
ASCII_6C=KEY_L;// 108 l
ASCII_6D=KEY_M;// 109 m
ASCII_6E=KEY_N;// 110 n
ASCII_6F=KEY_O;// 111 o
ASCII_70=KEY_P;// 112 p
ASCII_71=KEY_Q;// 113 q
ASCII_72=KEY_R;// 114 r
ASCII_73=KEY_S;// 115 s
ASCII_74=KEY_T;// 116 t
ASCII_75=KEY_U;// 117 u
ASCII_76=KEY_V;// 118 v
ASCII_77=KEY_W;// 119 w
ASCII_78=KEY_X;// 120 x
ASCII_79=KEY_Y;// 121 y
ASCII_7A=KEY_Z;// 122 z
ASCII_7B=KEY_LEFT_BRACE + SHIFT_MASK;// 123 {
ASCII_7C=KEY_BACKSLASH + SHIFT_MASK;// 124 |
ASCII_7D=KEY_RIGHT_BRACE + SHIFT_MASK;// 125 }
ASCII_7E=KEY_TILDE + SHIFT_MASK;// 126 ~
ASCII_7F=KEY_BACKSPACE;// 127
if (KeyboardLayout[0] == LAYOUT_DVORAK) {
ASCII_2D=KEY_QUOTE; // -
ASCII_5F=KEY_QUOTE + SHIFT_MASK; // _
ASCII_3D=KEY_RIGHT_BRACE; // =
ASCII_2B=KEY_RIGHT_BRACE + SHIFT_MASK; // +
ASCII_71=KEY_X; // q
ASCII_51=KEY_X + SHIFT_MASK;// Q
ASCII_77=KEY_COMMA; // w
ASCII_57=KEY_COMMA + SHIFT_MASK; // W
ASCII_65=KEY_D; // e
ASCII_45=KEY_D + SHIFT_MASK; // E
ASCII_72=KEY_O; // r
ASCII_52=KEY_O + SHIFT_MASK; // R
ASCII_74=KEY_K; // t
ASCII_54=KEY_K + SHIFT_MASK; // T
ASCII_79=KEY_T; // y
ASCII_59=KEY_T + SHIFT_MASK; // Y
ASCII_75=KEY_F; // u
ASCII_55=KEY_F + SHIFT_MASK; // U
ASCII_69=KEY_G; // i
ASCII_49=KEY_G + SHIFT_MASK; // I
ASCII_6F=KEY_S; // o
ASCII_4F=KEY_S + SHIFT_MASK; // O
ASCII_70=KEY_R; // p
ASCII_50=KEY_R + SHIFT_MASK; // P
ASCII_5B=KEY_MINUS; // [
ASCII_7B=KEY_MINUS + SHIFT_MASK; // {
ASCII_5D=KEY_EQUAL; // ]
ASCII_7D=KEY_EQUAL + SHIFT_MASK; // }
ASCII_73=KEY_SEMICOLON; // s
ASCII_53=KEY_SEMICOLON + SHIFT_MASK; // S
ASCII_64=KEY_H; // d
ASCII_44=KEY_H + SHIFT_MASK; // D
ASCII_66=KEY_Y; // f
ASCII_46=KEY_Y + SHIFT_MASK; // F
ASCII_67=KEY_U; // g
ASCII_47=KEY_U + SHIFT_MASK; // G
ASCII_68=KEY_J; // h
ASCII_48=KEY_J + SHIFT_MASK; // H
ASCII_6A=KEY_C; // j
ASCII_4A=KEY_C + SHIFT_MASK; // J
ASCII_6B=KEY_V; // k
ASCII_4B=KEY_V + SHIFT_MASK; // K
ASCII_6C=KEY_P; // l
ASCII_4C=KEY_P + SHIFT_MASK; // L
ASCII_3B=KEY_Z; // ;
ASCII_3A=KEY_Z + SHIFT_MASK; // :
ASCII_27=KEY_Q; // '
ASCII_22=KEY_Q + SHIFT_MASK; // "
ASCII_7A=KEY_SLASH; // z
ASCII_5A=KEY_SLASH + SHIFT_MASK; // Z
ASCII_78=KEY_B; // x
ASCII_58=KEY_B + SHIFT_MASK; // X
ASCII_63=KEY_I; // c
ASCII_43=KEY_I + SHIFT_MASK; // C
ASCII_76=KEY_PERIOD; // v
ASCII_56=KEY_PERIOD + SHIFT_MASK; // V
ASCII_62=KEY_N; // b
ASCII_42=KEY_N + SHIFT_MASK; // B
ASCII_6E=KEY_L; // n
ASCII_4E=KEY_L + SHIFT_MASK; // N
ASCII_2C=KEY_W; // ,
ASCII_3C=KEY_W + SHIFT_MASK; // <
ASCII_2E=KEY_E; // .
ASCII_3E=KEY_E + SHIFT_MASK; // >
ASCII_2F=KEY_LEFT_BRACE; // /
ASCII_3F=KEY_LEFT_BRACE + SHIFT_MASK; // ?
}
// LAYOUT_USA_ENGLISH
}
else if (KeyboardLayout[0] == LAYOUT_US_INTERNATIONAL) {
SHIFT_MASK=0x0040;
ALTGR_MASK=0x0080;
DEADKEYS_MASK=0x0700;
CIRCUMFLEX_BITS=0x0100;
ACUTE_ACCENT_BITS=0x0200;
GRAVE_ACCENT_BITS=0x0300;
TILDE_BITS=0x0400;
DIAERESIS_BITS=0x0500;
//KEYCODE_TYPE=uint16_t
KEYCODE_MASK=0x07FF;
DEADKEY_CIRCUMFLEX=KEY_6 + SHIFT_MASK;
DEADKEY_ACUTE_ACCENT=KEY_QUOTE;
DEADKEY_GRAVE_ACCENT=KEY_TILDE;
DEADKEY_TILDE=KEY_TILDE + SHIFT_MASK;
DEADKEY_DIAERESIS=KEY_QUOTE + SHIFT_MASK;
ASCII_20=KEY_SPACE;// 32
ASCII_21=KEY_1 + SHIFT_MASK;// 33 !
ASCII_22=DIAERESIS_BITS + KEY_SPACE;// 34 "
ASCII_23=KEY_3 + SHIFT_MASK;// 35 #
ASCII_24=KEY_4 + SHIFT_MASK;// 36 $
ASCII_25=KEY_5 + SHIFT_MASK;// 37 %
ASCII_26=KEY_7 + SHIFT_MASK;// 38 &
ASCII_27=ACUTE_ACCENT_BITS + KEY_SPACE;// 39 '
ASCII_28=KEY_9 + SHIFT_MASK;// 40 (
ASCII_29=KEY_0 + SHIFT_MASK;// 41 )
ASCII_2A=KEY_8 + SHIFT_MASK;// 42 *
ASCII_2B=KEY_EQUAL + SHIFT_MASK;// 43 +
ASCII_2C=KEY_COMMA;// 44 ,
ASCII_2D=KEY_MINUS;// 45 -
ASCII_2E=KEY_PERIOD;// 46 .
ASCII_2F=KEY_SLASH;// 47 /
ASCII_30=KEY_0;// 48 0
ASCII_31=KEY_1;// 49 1
ASCII_32=KEY_2;// 50 2
ASCII_33=KEY_3;// 51 3
ASCII_34=KEY_4;// 52 4
ASCII_35=KEY_5;// 53 5
ASCII_36=KEY_6;// 54 6
ASCII_37=KEY_7;// 55 7
ASCII_38=KEY_8;// 55 8
ASCII_39=KEY_9;// 57 9
ASCII_3A=KEY_SEMICOLON + SHIFT_MASK;// 58 :
ASCII_3B=KEY_SEMICOLON;// 59 ;
ASCII_3C=KEY_COMMA + SHIFT_MASK;// 60 <
ASCII_3D=KEY_EQUAL;// 61 =
ASCII_3E=KEY_PERIOD + SHIFT_MASK;// 62 >
ASCII_3F=KEY_SLASH + SHIFT_MASK;// 63 ?
ASCII_40=KEY_2 + SHIFT_MASK;// 64 @
ASCII_41=KEY_A + SHIFT_MASK;// 65 A
ASCII_42=KEY_B + SHIFT_MASK;// 66 B
ASCII_43=KEY_C + SHIFT_MASK;// 67 C
ASCII_44=KEY_D + SHIFT_MASK;// 68 D
ASCII_45=KEY_E + SHIFT_MASK;// 69 E
ASCII_46=KEY_F + SHIFT_MASK;// 70 F
ASCII_47=KEY_G + SHIFT_MASK;// 71 G
ASCII_48=KEY_H + SHIFT_MASK;// 72 H
ASCII_49=KEY_I + SHIFT_MASK;// 73 I
ASCII_4A=KEY_J + SHIFT_MASK;// 74 J
ASCII_4B=KEY_K + SHIFT_MASK;// 75 K
ASCII_4C=KEY_L + SHIFT_MASK;// 76 L
ASCII_4D=KEY_M + SHIFT_MASK;// 77 M
ASCII_4E=KEY_N + SHIFT_MASK;// 78 N
ASCII_4F=KEY_O + SHIFT_MASK;// 79 O
ASCII_50=KEY_P + SHIFT_MASK;// 80 P
ASCII_51=KEY_Q + SHIFT_MASK;// 81 Q
ASCII_52=KEY_R + SHIFT_MASK;// 82 R
ASCII_53=KEY_S + SHIFT_MASK;// 83 S
ASCII_54=KEY_T + SHIFT_MASK;// 84 T
ASCII_55=KEY_U + SHIFT_MASK;// 85 U
ASCII_56=KEY_V + SHIFT_MASK;// 86 V
ASCII_57=KEY_W + SHIFT_MASK;// 87 W
ASCII_58=KEY_X + SHIFT_MASK;// 88 X
ASCII_59=KEY_Y + SHIFT_MASK;// 89 Y
ASCII_5A=KEY_Z + SHIFT_MASK;// 90 Z
ASCII_5B=KEY_LEFT_BRACE;// 91 [
ASCII_5C=KEY_BACKSLASH;// 92
ASCII_5D=KEY_RIGHT_BRACE;// 93 ]
ASCII_5E=CIRCUMFLEX_BITS + KEY_SPACE;// 94 ^
ASCII_5F=KEY_MINUS + SHIFT_MASK;// 95 _
ASCII_60=GRAVE_ACCENT_BITS + KEY_SPACE;// 96 `
ASCII_61=KEY_A;// 97 a
ASCII_62=KEY_B;// 98 b
ASCII_63=KEY_C;// 99 c
ASCII_64=KEY_D;// 100 d
ASCII_65=KEY_E;// 101 e
ASCII_66=KEY_F;// 102 f
ASCII_67=KEY_G;// 103 g
ASCII_68=KEY_H;// 104 h
ASCII_69=KEY_I;// 105 i
ASCII_6A=KEY_J;// 106 j
ASCII_6B=KEY_K;// 107 k
ASCII_6C=KEY_L;// 108 l
ASCII_6D=KEY_M;// 109 m
ASCII_6E=KEY_N;// 110 n
ASCII_6F=KEY_O;// 111 o
ASCII_70=KEY_P;// 112 p
ASCII_71=KEY_Q;// 113 q
ASCII_72=KEY_R;// 114 r
ASCII_73=KEY_S;// 115 s
ASCII_74=KEY_T;// 116 t
ASCII_75=KEY_U;// 117 u
ASCII_76=KEY_V;// 118 v
ASCII_77=KEY_W;// 119 w
ASCII_78=KEY_X;// 120 x
ASCII_79=KEY_Y;// 121 y
ASCII_7A=KEY_Z;// 122 z
ASCII_7B=KEY_LEFT_BRACE + SHIFT_MASK;// 123 {
ASCII_7C=KEY_BACKSLASH + SHIFT_MASK;// 124 |
ASCII_7D=KEY_RIGHT_BRACE + SHIFT_MASK;// 125 }
ASCII_7E=TILDE_BITS + KEY_SPACE;// 126 ~
ASCII_7F=KEY_BACKSPACE;// 127
ISO_8859_1_A0=KEY_SPACE;// 160 Nonbreakng Space
ISO_8859_1_A1=KEY_1 + ALTGR_MASK;// 161 ¡ Inverted Exclamation
ISO_8859_1_A2=KEY_C + ALTGR_MASK + SHIFT_MASK;// 162 ¢ Cent SIGN
ISO_8859_1_A3=KEY_4 + ALTGR_MASK + SHIFT_MASK;// 163 £ Pound Sign
ISO_8859_1_A4=KEY_4 + ALTGR_MASK;// 164 ¤ Currency or Euro Sign
ISO_8859_1_A5=KEY_MINUS + ALTGR_MASK;// 165 ¥ YEN SIGN
ISO_8859_1_A6=KEY_BACKSLASH + ALTGR_MASK + SHIFT_MASK;// 166 ¦ BROKEN BAR;??
ISO_8859_1_A7=KEY_S + ALTGR_MASK + SHIFT_MASK;// 167 § SECTION SIGN
ISO_8859_1_A8=KEY_QUOTE + ALTGR_MASK + SHIFT_MASK;// 168 ¨ DIAERESIS
ISO_8859_1_A9=KEY_C + ALTGR_MASK;// 169 © COPYRIGHT SIGN
ISO_8859_1_AA=0;// 170 ª FEMININE ORDINAL
ISO_8859_1_AB=KEY_LEFT_BRACE + ALTGR_MASK;// 171 « LEFT DOUBLE ANGLE QUOTE
ISO_8859_1_AC=KEY_BACKSLASH + ALTGR_MASK;// 172 ¬ NOT SIGN;??
ISO_8859_1_AD=0;// 173 SOFT HYPHEN
ISO_8859_1_AE=KEY_R + ALTGR_MASK;// 174 ® REGISTERED SIGN
ISO_8859_1_AF=0;// 175 ¯ MACRON
ISO_8859_1_B0=KEY_SEMICOLON + ALTGR_MASK + SHIFT_MASK;// 176 ° DEGREE SIGN
ISO_8859_1_B1=0;// 177 ± PLUS-MINUS SIGN
ISO_8859_1_B2=KEY_2 + ALTGR_MASK;// 178 ² SUPERSCRIPT TWO
ISO_8859_1_B3=KEY_3 + ALTGR_MASK;// 179 ³ SUPERSCRIPT THREE
ISO_8859_1_B4=KEY_QUOTE + ALTGR_MASK;// 180 ´ ACUTE ACCENT
ISO_8859_1_B5=KEY_M + ALTGR_MASK;// 181 µ MICRO SIGN
ISO_8859_1_B6=KEY_SEMICOLON + ALTGR_MASK;// 182 ¶ PILCROW SIGN
ISO_8859_1_B7=0;// 183 · MIDDLE DOT
ISO_8859_1_B8=0;// 184 ¸ CEDILLA
ISO_8859_1_B9=KEY_1 + ALTGR_MASK + SHIFT_MASK;// 185 ¹ SUPERSCRIPT ONE
ISO_8859_1_BA=0;// 186 º MASCULINE ORDINAL
ISO_8859_1_BB=KEY_RIGHT_BRACE + ALTGR_MASK;// 187 » RIGHT DOUBLE ANGLE QUOTE
ISO_8859_1_BC=KEY_6 + ALTGR_MASK;// 188 ¼ FRACTION ONE QUARTER
ISO_8859_1_BD=KEY_7 + ALTGR_MASK;// 189 ½ FRACTION ONE HALF
ISO_8859_1_BE=KEY_8 + ALTGR_MASK;// 190 ¾ FRACTION THREE QUARTERS
ISO_8859_1_BF=KEY_SLASH + ALTGR_MASK;// 191 ¿ INVERTED QUESTION MARK
ISO_8859_1_C0=GRAVE_ACCENT_BITS + KEY_A + SHIFT_MASK;// 192 À A GRAVE
ISO_8859_1_C1=KEY_A + ALTGR_MASK + SHIFT_MASK;// 193 Á A ACUTE
ISO_8859_1_C2=CIRCUMFLEX_BITS=+ KEY_A + SHIFT_MASK;// 194 Â A CIRCUMFLEX
ISO_8859_1_C3=TILDE_BITS + KEY_A + SHIFT_MASK;// 195 Ã A TILDE
ISO_8859_1_C4=KEY_Q + ALTGR_MASK + SHIFT_MASK;// 196 Ä A DIAERESIS
ISO_8859_1_C5=KEY_W + ALTGR_MASK + SHIFT_MASK;// 197 Å A RING ABOVE
ISO_8859_1_C6=KEY_Z + ALTGR_MASK + SHIFT_MASK;// 198 Æ AE
ISO_8859_1_C7=KEY_COMMA + ALTGR_MASK + SHIFT_MASK;// 199 Ç C CEDILLA
ISO_8859_1_C8=GRAVE_ACCENT_BITS + KEY_E + SHIFT_MASK;// 200 È E GRAVE
ISO_8859_1_C9=KEY_E + ALTGR_MASK + SHIFT_MASK;// 201 É E ACUTE
ISO_8859_1_CA=CIRCUMFLEX_BITS + KEY_E + SHIFT_MASK;// 202 Ê E CIRCUMFLEX
ISO_8859_1_CB=DIAERESIS_BITS + KEY_E + SHIFT_MASK;// 203 Ë E DIAERESIS
ISO_8859_1_CC=GRAVE_ACCENT_BITS + KEY_I + SHIFT_MASK;// 204 Ì I GRAVE
ISO_8859_1_CD=KEY_I + ALTGR_MASK + SHIFT_MASK;// 205 Í I ACUTE
ISO_8859_1_CE=CIRCUMFLEX_BITS + KEY_I + SHIFT_MASK;// 206 Î I CIRCUMFLEX
ISO_8859_1_CF=DIAERESIS_BITS + KEY_I + SHIFT_MASK;// 207 Ï I DIAERESIS
ISO_8859_1_D0=KEY_D + ALTGR_MASK + SHIFT_MASK;// 208 Ð ETH
ISO_8859_1_D1=KEY_N + ALTGR_MASK + SHIFT_MASK;// 209 Ñ N TILDE
ISO_8859_1_D2=GRAVE_ACCENT_BITS + KEY_O + SHIFT_MASK;// 210 Ò O GRAVE
ISO_8859_1_D3=KEY_O + ALTGR_MASK + SHIFT_MASK;// 211 Ó O ACUTE
ISO_8859_1_D4=CIRCUMFLEX_BITS + KEY_O + SHIFT_MASK;// 212 Ô O CIRCUMFLEX
ISO_8859_1_D5=TILDE_BITS + KEY_O + SHIFT_MASK;// 213 Õ O TILDE
ISO_8859_1_D6=KEY_P + ALTGR_MASK + SHIFT_MASK;// 214 Ö O DIAERESIS
ISO_8859_1_D7=KEY_EQUAL + ALTGR_MASK;// 215 × MULTIPLICATION
ISO_8859_1_D8=KEY_L + ALTGR_MASK + SHIFT_MASK;// 216 Ø O STROKE
ISO_8859_1_D9=GRAVE_ACCENT_BITS + KEY_U + SHIFT_MASK;// 217 Ù U GRAVE
ISO_8859_1_DA=KEY_U + ALTGR_MASK + SHIFT_MASK;// 218 Ú U ACUTE
ISO_8859_1_DB=CIRCUMFLEX_BITS + KEY_U + SHIFT_MASK;// 219 Û U CIRCUMFLEX
ISO_8859_1_DC=KEY_Y + ALTGR_MASK + SHIFT_MASK;// 220 Ü U DIAERESIS
ISO_8859_1_DD=ACUTE_ACCENT_BITS + KEY_Y + SHIFT_MASK;// 221 Ý Y ACUTE
ISO_8859_1_DE=KEY_T + ALTGR_MASK + SHIFT_MASK;// 222 Þ THORN
ISO_8859_1_DF=KEY_S + ALTGR_MASK;// 223 ß SHARP S
ISO_8859_1_E0=GRAVE_ACCENT_BITS + KEY_A;// 224 à a GRAVE
ISO_8859_1_E1=KEY_A + ALTGR_MASK;// 225 á a ACUTE
ISO_8859_1_E2=CIRCUMFLEX_BITS + KEY_A;// 226 â a CIRCUMFLEX
ISO_8859_1_E3=TILDE_BITS + KEY_A;// 227 ã a TILDE
ISO_8859_1_E4=DIAERESIS_BITS + KEY_A;// 228 ä a DIAERESIS
ISO_8859_1_E5=KEY_W + ALTGR_MASK;// 229 å a RING ABOVE
ISO_8859_1_E6=KEY_Z + ALTGR_MASK;// 230 æ ae
ISO_8859_1_E7=KEY_COMMA + ALTGR_MASK;// 231 ç c CEDILLA
ISO_8859_1_E8=GRAVE_ACCENT_BITS + KEY_E;// 232 è e GRAVE
ISO_8859_1_E9=ACUTE_ACCENT_BITS + KEY_E;// 233 é e ACUTE
ISO_8859_1_EA=CIRCUMFLEX_BITS + KEY_E;// 234 ê e CIRCUMFLEX
ISO_8859_1_EB=DIAERESIS_BITS + KEY_E;// 235 ë e DIAERESIS
ISO_8859_1_EC=GRAVE_ACCENT_BITS + KEY_I;// 236 ì i GRAVE
ISO_8859_1_ED=KEY_I + ALTGR_MASK;// 237 í i ACUTE
ISO_8859_1_EE=CIRCUMFLEX_BITS + KEY_I;// 238 î i CIRCUMFLEX
ISO_8859_1_EF=DIAERESIS_BITS + KEY_I;// 239 ï i DIAERESIS
ISO_8859_1_F0=KEY_D + ALTGR_MASK;// 240 ð ETH
ISO_8859_1_F1=KEY_N + ALTGR_MASK;// 241 ñ n TILDE
ISO_8859_1_F2=GRAVE_ACCENT_BITS + KEY_O;// 242 ò o GRAVE
ISO_8859_1_F3=KEY_O + ALTGR_MASK;// 243 ó o ACUTE
ISO_8859_1_F4=CIRCUMFLEX_BITS + KEY_O;// 244 ô o CIRCUMFLEX
ISO_8859_1_F5=TILDE_BITS + KEY_O ;// 245 õ o TILDE
ISO_8859_1_F6=KEY_P + ALTGR_MASK;// 246 ö o DIAERESIS
ISO_8859_1_F7=KEY_EQUAL + ALTGR_MASK + SHIFT_MASK;// 247 ÷ DIVISION
ISO_8859_1_F8=KEY_L + ALTGR_MASK;// 248 ø o STROKE
ISO_8859_1_F9=GRAVE_ACCENT_BITS + KEY_U;// 249 ù u GRAVE
ISO_8859_1_FA=KEY_U + ALTGR_MASK;// 250 ú u ACUTE
ISO_8859_1_FB=CIRCUMFLEX_BITS + KEY_U;// 251 û u CIRCUMFLEX
ISO_8859_1_FC=KEY_Y + ALTGR_MASK;// 252 ü u DIAERESIS
ISO_8859_1_FD=ACUTE_ACCENT_BITS + KEY_Y;// 253 ý y ACUTE
ISO_8859_1_FE=KEY_T + ALTGR_MASK;// 254 þ THORN
ISO_8859_1_FF=DIAERESIS_BITS + KEY_Y;// 255 ÿ y DIAERESIS
UNICODE_20AC=KEY_5 + ALTGR_MASK;// € Euro Sign
// not yet implemented
UNICODE_EXTRA00=0x20AC;
KEYCODE_EXTRA00=KEY_5 + ALTGR_MASK;// 20AC € Euro Sign
// LAYOUT_US_INTERNATIONAL
}
else if (KeyboardLayout[0] == LAYOUT_GERMAN) {
SHIFT_MASK=0x0040;
ALTGR_MASK=0x0080;
DEADKEYS_MASK=0x0700;
CIRCUMFLEX_BITS=0x0300;
ACUTE_ACCENT_BITS=0x0400;
GRAVE_ACCENT_BITS=0x0500;
KEYCODE_MASK=0x07FF;
DEADKEY_CIRCUMFLEX=KEY_TILDE;
DEADKEY_ACUTE_ACCENT=KEY_EQUAL;
DEADKEY_GRAVE_ACCENT=KEY_EQUAL + SHIFT_MASK;
KEY_NON_US_100=63;
ASCII_20=KEY_SPACE;// 32
ASCII_21=KEY_1 + SHIFT_MASK;// 33 !
ASCII_22=KEY_2 + SHIFT_MASK;// 34 "
ASCII_23=KEY_BACKSLASH;// 35 #=??
ASCII_24=KEY_4 + SHIFT_MASK;// 36 $
ASCII_25=KEY_5 + SHIFT_MASK;// 37 %
ASCII_26=KEY_6 + SHIFT_MASK;// 38 &
ASCII_27=KEY_BACKSLASH + SHIFT_MASK;// 39 '
ASCII_28=KEY_8 + SHIFT_MASK;// 40 (
ASCII_29=KEY_9 + SHIFT_MASK;// 41 )
ASCII_2A=KEY_RIGHT_BRACE + SHIFT_MASK;// 42 *
ASCII_2B=KEY_RIGHT_BRACE;// 43 +
ASCII_2C=KEY_COMMA;// 44 ,
ASCII_2D=KEY_SLASH;// 45 -
ASCII_2E=KEY_PERIOD;// 46 .
ASCII_2F=KEY_7 + SHIFT_MASK;// 47 /
ASCII_30=KEY_0;// 48 0
ASCII_31=KEY_1;// 49 1
ASCII_32=KEY_2;// 50 2
ASCII_33=KEY_3;// 51 3
ASCII_34=KEY_4;// 52 4
ASCII_35=KEY_5;// 53 5
ASCII_36=KEY_6;// 54 6
ASCII_37=KEY_7;// 55 7
ASCII_38=KEY_8;// 55 8
ASCII_39=KEY_9;// 57 9
ASCII_3A=KEY_PERIOD + SHIFT_MASK;// 58 :
ASCII_3B=KEY_COMMA + SHIFT_MASK;// 59 ;
ASCII_3C=KEY_NON_US_100;// 60 <
ASCII_3D=KEY_0 + SHIFT_MASK;// 61 =
ASCII_3E=KEY_NON_US_100 + SHIFT_MASK;// 62 >
ASCII_3F=KEY_MINUS + SHIFT_MASK;// 63 ?
ASCII_40=KEY_Q + ALTGR_MASK;// 64 @
ASCII_41=KEY_A + SHIFT_MASK;// 65 A
ASCII_42=KEY_B + SHIFT_MASK;// 66 B
ASCII_43=KEY_C + SHIFT_MASK;// 67 C
ASCII_44=KEY_D + SHIFT_MASK;// 68 D
ASCII_45=KEY_E + SHIFT_MASK;// 69 E
ASCII_46=KEY_F + SHIFT_MASK;// 70 F
ASCII_47=KEY_G + SHIFT_MASK;// 71 G
ASCII_48=KEY_H + SHIFT_MASK;// 72 H
ASCII_49=KEY_I + SHIFT_MASK;// 73 I
ASCII_4A=KEY_J + SHIFT_MASK;// 74 J
ASCII_4B=KEY_K + SHIFT_MASK;// 75 K
ASCII_4C=KEY_L + SHIFT_MASK;// 76 L
ASCII_4D=KEY_M + SHIFT_MASK;// 77 M
ASCII_4E=KEY_N + SHIFT_MASK;// 78 N
ASCII_4F=KEY_O + SHIFT_MASK;// 79 O
ASCII_50=KEY_P + SHIFT_MASK;// 80 P
ASCII_51=KEY_Q + SHIFT_MASK;// 81 Q
ASCII_52=KEY_R + SHIFT_MASK;// 82 R
ASCII_53=KEY_S + SHIFT_MASK;// 83 S
ASCII_54=KEY_T + SHIFT_MASK;// 84 T
ASCII_55=KEY_U + SHIFT_MASK;// 85 U
ASCII_56=KEY_V + SHIFT_MASK;// 86 V
ASCII_57=KEY_W + SHIFT_MASK;// 87 W
ASCII_58=KEY_X + SHIFT_MASK;// 88 X
ASCII_59=KEY_Z + SHIFT_MASK;// 89 Y
ASCII_5A=KEY_Y + SHIFT_MASK;// 90 Z
ASCII_5B=KEY_8 + ALTGR_MASK;// 91 [
ASCII_5C=KEY_MINUS + ALTGR_MASK;// 92
ASCII_5D=KEY_9 + ALTGR_MASK;// 93 ]
ASCII_5E=CIRCUMFLEX_BITS + KEY_SPACE;// 94 ^
ASCII_5F=KEY_SLASH + SHIFT_MASK;// 95 _
ASCII_60=GRAVE_ACCENT_BITS + KEY_SPACE;// 96 `
ASCII_61=KEY_A;// 97 a
ASCII_62=KEY_B;// 98 b
ASCII_63=KEY_C;// 99 c
ASCII_64=KEY_D;// 100 d
ASCII_65=KEY_E;// 101 e
ASCII_66=KEY_F;// 102 f
ASCII_67=KEY_G;// 103 g
ASCII_68=KEY_H;// 104 h
ASCII_69=KEY_I;// 105 i
ASCII_6A=KEY_J;// 106 j
ASCII_6B=KEY_K;// 107 k
ASCII_6C=KEY_L;// 108 l
ASCII_6D=KEY_M;// 109 m
ASCII_6E=KEY_N;// 110 n