-
Notifications
You must be signed in to change notification settings - Fork 1
/
Mapping.ino
98 lines (81 loc) · 1.27 KB
/
Mapping.ino
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
byte remap(byte kbd_data) {
switch (kbd_data) {
// Return
case 0xD5:
return 0xC9;
case 0x55:
return 0x49;
// backslash
case 0xC9:
return 0xD5;
case 0x49:
return 0x55;
// space
case 0xE9:
return 0xE3;
case 0x69:
return 0x63;
// Enter
case 0xE3:
return 0xE9;
case 0x63:
return 0x69;
// z
case 0xA1:
return 0x8D;
case 0x21:
return 0x0D;
// y
case 0x8F:
return 0xA1;
case 0x0F:
return 0x21;
// x
case 0x91:
return 0x8F;
case 0x11:
return 0x0F;
// c
case 0x93:
return 0x91;
case 0x13:
return 0x11;
// v
case 0x97:
return 0x93;
case 0x17:
return 0x13;
// b
case 0xDB:
return 0x97;
case 0x5B:
return 0x17;
// n
case 0xDD:
return 0xDB;
case 0x5D:
return 0x5B;
// m
case 0xD7:
return 0xDD;
case 0x57:
return 0x5D;
// .
case 0xD9:
return 0xDF;
case 0x59:
return 0x5F;
// /
case 0x95:
return 0xD9;
case 0x15:
return 0x59;
// ,
case 0xDF:
return 0xD7;
case 0x5F:
return 0x57;
default:
return kbd_data;
}
}