-
Notifications
You must be signed in to change notification settings - Fork 6
/
keymap.go
121 lines (112 loc) · 1.46 KB
/
keymap.go
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
package xkg
var KeyMap map[int]string = map[int]string{
// Modifier keys
50: "<shift>",
62: "<shift>",
37: "<ctrl>",
105: "<ctrl>",
64: "alt",
108: "alt",
133: "133",
// Qwerty keys
// qwerty row
24: "q",
25: "w",
26: "e",
27: "r",
28: "t",
29: "y",
30: "u",
31: "i",
32: "o",
33: "p",
34: "[",
35: "]",
51: "\\",
// asdf row
38: "a",
39: "s",
40: "d",
41: "f",
42: "g",
43: "h",
44: "j",
45: "k",
46: "l",
47: ",",
48: "\"",
36: "<Return>",
// zxcv row
52: "z",
53: "x",
54: "c",
55: "v",
56: "b",
57: "n",
58: "m",
59: ",",
60: ".",
61: "/",
// number row
49: "`",
10: "1",
11: "2",
12: "3",
13: "4",
14: "5",
15: "6",
16: "7",
17: "8",
18: "9",
19: "0",
20: "-",
21: "+",
// space bar
65: " ",
// number pad
90: "<Num-0>",
87: "<Num-1>",
88: "<Num-2>",
89: "<Num-3>",
83: "<Num-4>",
84: "<Num-5>",
85: "<Num-6>",
79: "<Num-7>",
80: "<Num-8>",
81: "<Num-9>",
106: "<Num-/>",
63: "<Num-*>",
82: "<Num-->",
86: "<Num-+>",
// F keys
67: "<F1>",
68: "<F2>",
69: "<F3>",
70: "<F4>",
71: "<F5>",
72: "<F6>",
73: "<F7>",
74: "<F8>",
75: "<F9>",
76: "<F10>",
95: "<F11>",
96: "<F12>",
// Misc
9: "<Esc>",
22: "<Backspace>",
77: "<Num Lock>",
107: "<Print Scr>",
118: "<Insert>",
119: "<Delete>",
110: "<Home>",
112: "<Pg Up>",
117: "<Pg Dn>",
115: "<End>",
111: "<Up>",
116: "<Down>",
113: "<Left>",
114: "<Right>",
135: "<Menu>",
23: "<Tab>",
66: "<Caps Lock>",
}