-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathkey-constants.scm
245 lines (240 loc) · 11.5 KB
/
key-constants.scm
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
;;; BEGIN key-constants.scm
;;;
;;; Copyright © 2021 paul at denknerd dot org
;;;
;;; This file is mostly/sort of auto-generated. It contains mappings to and from human-friendly key
;;; symbols such as ANSI_A and the internal keycodes used by macOS. These keycodes refer to
;;; physical buttons, and so the ANSI_ prefix is significant: the keycode represents the button
;;; located where the ANSI-variant would be located on the physical keyboard. I use a standard
;;; keyboard, so if you use something exotic i'm afraid you'll have to try it out and report back.
(define-module (spotiqueue key-constants))
(module-export-all! (current-module))
(define keycode->keysym (make-hash-table 128))
(define keysym->keycode (make-hash-table 128))
(hashq-set! keycode->keysym 0 (quote ANSI_A))
(hashq-set! keycode->keysym 1 (quote ANSI_S))
(hashq-set! keycode->keysym 2 (quote ANSI_D))
(hashq-set! keycode->keysym 3 (quote ANSI_F))
(hashq-set! keycode->keysym 4 (quote ANSI_H))
(hashq-set! keycode->keysym 5 (quote ANSI_G))
(hashq-set! keycode->keysym 6 (quote ANSI_Z))
(hashq-set! keycode->keysym 7 (quote ANSI_X))
(hashq-set! keycode->keysym 8 (quote ANSI_C))
(hashq-set! keycode->keysym 9 (quote ANSI_V))
(hashq-set! keycode->keysym 11 (quote ANSI_B))
(hashq-set! keycode->keysym 12 (quote ANSI_Q))
(hashq-set! keycode->keysym 13 (quote ANSI_W))
(hashq-set! keycode->keysym 14 (quote ANSI_E))
(hashq-set! keycode->keysym 15 (quote ANSI_R))
(hashq-set! keycode->keysym 16 (quote ANSI_Y))
(hashq-set! keycode->keysym 17 (quote ANSI_T))
(hashq-set! keycode->keysym 18 (quote ANSI_1))
(hashq-set! keycode->keysym 19 (quote ANSI_2))
(hashq-set! keycode->keysym 20 (quote ANSI_3))
(hashq-set! keycode->keysym 21 (quote ANSI_4))
(hashq-set! keycode->keysym 22 (quote ANSI_6))
(hashq-set! keycode->keysym 23 (quote ANSI_5))
(hashq-set! keycode->keysym 24 (quote ANSI_Equal))
(hashq-set! keycode->keysym 25 (quote ANSI_9))
(hashq-set! keycode->keysym 26 (quote ANSI_7))
(hashq-set! keycode->keysym 27 (quote ANSI_Minus))
(hashq-set! keycode->keysym 28 (quote ANSI_8))
(hashq-set! keycode->keysym 29 (quote ANSI_0))
(hashq-set! keycode->keysym 30 (quote ANSI_RightBracket))
(hashq-set! keycode->keysym 31 (quote ANSI_O))
(hashq-set! keycode->keysym 32 (quote ANSI_U))
(hashq-set! keycode->keysym 33 (quote ANSI_LeftBracket))
(hashq-set! keycode->keysym 34 (quote ANSI_I))
(hashq-set! keycode->keysym 35 (quote ANSI_P))
(hashq-set! keycode->keysym 37 (quote ANSI_L))
(hashq-set! keycode->keysym 38 (quote ANSI_J))
(hashq-set! keycode->keysym 39 (quote ANSI_Quote))
(hashq-set! keycode->keysym 40 (quote ANSI_K))
(hashq-set! keycode->keysym 41 (quote ANSI_Semicolon))
(hashq-set! keycode->keysym 42 (quote ANSI_Backslash))
(hashq-set! keycode->keysym 43 (quote ANSI_Comma))
(hashq-set! keycode->keysym 44 (quote ANSI_Slash))
(hashq-set! keycode->keysym 45 (quote ANSI_N))
(hashq-set! keycode->keysym 46 (quote ANSI_M))
(hashq-set! keycode->keysym 47 (quote ANSI_Period))
(hashq-set! keycode->keysym 50 (quote ANSI_Grave))
(hashq-set! keycode->keysym 65 (quote ANSI_KeypadDecimal))
(hashq-set! keycode->keysym 67 (quote ANSI_KeypadMultiply))
(hashq-set! keycode->keysym 69 (quote ANSI_KeypadPlus))
(hashq-set! keycode->keysym 71 (quote ANSI_KeypadClear))
(hashq-set! keycode->keysym 75 (quote ANSI_KeypadDivide))
(hashq-set! keycode->keysym 76 (quote ANSI_KeypadEnter))
(hashq-set! keycode->keysym 78 (quote ANSI_KeypadMinus))
(hashq-set! keycode->keysym 81 (quote ANSI_KeypadEquals))
(hashq-set! keycode->keysym 82 (quote ANSI_Keypad0))
(hashq-set! keycode->keysym 83 (quote ANSI_Keypad1))
(hashq-set! keycode->keysym 84 (quote ANSI_Keypad2))
(hashq-set! keycode->keysym 85 (quote ANSI_Keypad3))
(hashq-set! keycode->keysym 86 (quote ANSI_Keypad4))
(hashq-set! keycode->keysym 87 (quote ANSI_Keypad5))
(hashq-set! keycode->keysym 88 (quote ANSI_Keypad6))
(hashq-set! keycode->keysym 89 (quote ANSI_Keypad7))
(hashq-set! keycode->keysym 91 (quote ANSI_Keypad8))
(hashq-set! keycode->keysym 92 (quote ANSI_Keypad9))
(hashq-set! keycode->keysym 36 (quote Return))
(hashq-set! keycode->keysym 48 (quote Tab))
(hashq-set! keycode->keysym 49 (quote Space))
(hashq-set! keycode->keysym 51 (quote Delete))
(hashq-set! keycode->keysym 53 (quote Escape))
(hashq-set! keycode->keysym 55 (quote Command))
(hashq-set! keycode->keysym 56 (quote Shift))
(hashq-set! keycode->keysym 57 (quote CapsLock))
(hashq-set! keycode->keysym 58 (quote Option))
(hashq-set! keycode->keysym 59 (quote Control))
(hashq-set! keycode->keysym 54 (quote RightCommand))
(hashq-set! keycode->keysym 60 (quote RightShift))
(hashq-set! keycode->keysym 61 (quote RightOption))
(hashq-set! keycode->keysym 62 (quote RightControl))
(hashq-set! keycode->keysym 63 (quote Function))
(hashq-set! keycode->keysym 64 (quote F17))
(hashq-set! keycode->keysym 72 (quote VolumeUp))
(hashq-set! keycode->keysym 73 (quote VolumeDown))
(hashq-set! keycode->keysym 74 (quote Mute))
(hashq-set! keycode->keysym 79 (quote F18))
(hashq-set! keycode->keysym 80 (quote F19))
(hashq-set! keycode->keysym 90 (quote F20))
(hashq-set! keycode->keysym 96 (quote F5))
(hashq-set! keycode->keysym 97 (quote F6))
(hashq-set! keycode->keysym 98 (quote F7))
(hashq-set! keycode->keysym 99 (quote F3))
(hashq-set! keycode->keysym 100 (quote F8))
(hashq-set! keycode->keysym 101 (quote F9))
(hashq-set! keycode->keysym 103 (quote F11))
(hashq-set! keycode->keysym 105 (quote F13))
(hashq-set! keycode->keysym 106 (quote F16))
(hashq-set! keycode->keysym 107 (quote F14))
(hashq-set! keycode->keysym 109 (quote F10))
(hashq-set! keycode->keysym 111 (quote F12))
(hashq-set! keycode->keysym 113 (quote F15))
(hashq-set! keycode->keysym 114 (quote Help))
(hashq-set! keycode->keysym 115 (quote Home))
(hashq-set! keycode->keysym 116 (quote PageUp))
(hashq-set! keycode->keysym 117 (quote ForwardDelete))
(hashq-set! keycode->keysym 118 (quote F4))
(hashq-set! keycode->keysym 119 (quote End))
(hashq-set! keycode->keysym 120 (quote F2))
(hashq-set! keycode->keysym 121 (quote PageDown))
(hashq-set! keycode->keysym 122 (quote F1))
(hashq-set! keycode->keysym 123 (quote LeftArrow))
(hashq-set! keycode->keysym 124 (quote RightArrow))
(hashq-set! keycode->keysym 125 (quote DownArrow))
(hashq-set! keycode->keysym 126 (quote UpArrow))
(hashq-set! keysym->keycode (quote ANSI_A) 0)
(hashq-set! keysym->keycode (quote ANSI_S) 1)
(hashq-set! keysym->keycode (quote ANSI_D) 2)
(hashq-set! keysym->keycode (quote ANSI_F) 3)
(hashq-set! keysym->keycode (quote ANSI_H) 4)
(hashq-set! keysym->keycode (quote ANSI_G) 5)
(hashq-set! keysym->keycode (quote ANSI_Z) 6)
(hashq-set! keysym->keycode (quote ANSI_X) 7)
(hashq-set! keysym->keycode (quote ANSI_C) 8)
(hashq-set! keysym->keycode (quote ANSI_V) 9)
(hashq-set! keysym->keycode (quote ANSI_B) 11)
(hashq-set! keysym->keycode (quote ANSI_Q) 12)
(hashq-set! keysym->keycode (quote ANSI_W) 13)
(hashq-set! keysym->keycode (quote ANSI_E) 14)
(hashq-set! keysym->keycode (quote ANSI_R) 15)
(hashq-set! keysym->keycode (quote ANSI_Y) 16)
(hashq-set! keysym->keycode (quote ANSI_T) 17)
(hashq-set! keysym->keycode (quote ANSI_1) 18)
(hashq-set! keysym->keycode (quote ANSI_2) 19)
(hashq-set! keysym->keycode (quote ANSI_3) 20)
(hashq-set! keysym->keycode (quote ANSI_4) 21)
(hashq-set! keysym->keycode (quote ANSI_6) 22)
(hashq-set! keysym->keycode (quote ANSI_5) 23)
(hashq-set! keysym->keycode (quote ANSI_Equal) 24)
(hashq-set! keysym->keycode (quote ANSI_9) 25)
(hashq-set! keysym->keycode (quote ANSI_7) 26)
(hashq-set! keysym->keycode (quote ANSI_Minus) 27)
(hashq-set! keysym->keycode (quote ANSI_8) 28)
(hashq-set! keysym->keycode (quote ANSI_0) 29)
(hashq-set! keysym->keycode (quote ANSI_RightBracket) 30)
(hashq-set! keysym->keycode (quote ANSI_O) 31)
(hashq-set! keysym->keycode (quote ANSI_U) 32)
(hashq-set! keysym->keycode (quote ANSI_LeftBracket) 33)
(hashq-set! keysym->keycode (quote ANSI_I) 34)
(hashq-set! keysym->keycode (quote ANSI_P) 35)
(hashq-set! keysym->keycode (quote ANSI_L) 37)
(hashq-set! keysym->keycode (quote ANSI_J) 38)
(hashq-set! keysym->keycode (quote ANSI_Quote) 39)
(hashq-set! keysym->keycode (quote ANSI_K) 40)
(hashq-set! keysym->keycode (quote ANSI_Semicolon) 41)
(hashq-set! keysym->keycode (quote ANSI_Backslash) 42)
(hashq-set! keysym->keycode (quote ANSI_Comma) 43)
(hashq-set! keysym->keycode (quote ANSI_Slash) 44)
(hashq-set! keysym->keycode (quote ANSI_N) 45)
(hashq-set! keysym->keycode (quote ANSI_M) 46)
(hashq-set! keysym->keycode (quote ANSI_Period) 47)
(hashq-set! keysym->keycode (quote ANSI_Grave) 50)
(hashq-set! keysym->keycode (quote ANSI_KeypadDecimal) 65)
(hashq-set! keysym->keycode (quote ANSI_KeypadMultiply) 67)
(hashq-set! keysym->keycode (quote ANSI_KeypadPlus) 69)
(hashq-set! keysym->keycode (quote ANSI_KeypadClear) 71)
(hashq-set! keysym->keycode (quote ANSI_KeypadDivide) 75)
(hashq-set! keysym->keycode (quote ANSI_KeypadEnter) 76)
(hashq-set! keysym->keycode (quote ANSI_KeypadMinus) 78)
(hashq-set! keysym->keycode (quote ANSI_KeypadEquals) 81)
(hashq-set! keysym->keycode (quote ANSI_Keypad0) 82)
(hashq-set! keysym->keycode (quote ANSI_Keypad1) 83)
(hashq-set! keysym->keycode (quote ANSI_Keypad2) 84)
(hashq-set! keysym->keycode (quote ANSI_Keypad3) 85)
(hashq-set! keysym->keycode (quote ANSI_Keypad4) 86)
(hashq-set! keysym->keycode (quote ANSI_Keypad5) 87)
(hashq-set! keysym->keycode (quote ANSI_Keypad6) 88)
(hashq-set! keysym->keycode (quote ANSI_Keypad7) 89)
(hashq-set! keysym->keycode (quote ANSI_Keypad8) 91)
(hashq-set! keysym->keycode (quote ANSI_Keypad9) 92)
(hashq-set! keysym->keycode (quote Return) 36)
(hashq-set! keysym->keycode (quote Tab) 48)
(hashq-set! keysym->keycode (quote Space) 49)
(hashq-set! keysym->keycode (quote Delete) 51)
(hashq-set! keysym->keycode (quote Escape) 53)
(hashq-set! keysym->keycode (quote Command) 55)
(hashq-set! keysym->keycode (quote Shift) 56)
(hashq-set! keysym->keycode (quote CapsLock) 57)
(hashq-set! keysym->keycode (quote Option) 58)
(hashq-set! keysym->keycode (quote Control) 59)
(hashq-set! keysym->keycode (quote RightCommand) 54)
(hashq-set! keysym->keycode (quote RightShift) 60)
(hashq-set! keysym->keycode (quote RightOption) 61)
(hashq-set! keysym->keycode (quote RightControl) 62)
(hashq-set! keysym->keycode (quote Function) 63)
(hashq-set! keysym->keycode (quote F17) 64)
(hashq-set! keysym->keycode (quote VolumeUp) 72)
(hashq-set! keysym->keycode (quote VolumeDown) 73)
(hashq-set! keysym->keycode (quote Mute) 74)
(hashq-set! keysym->keycode (quote F18) 79)
(hashq-set! keysym->keycode (quote F19) 80)
(hashq-set! keysym->keycode (quote F20) 90)
(hashq-set! keysym->keycode (quote F5) 96)
(hashq-set! keysym->keycode (quote F6) 97)
(hashq-set! keysym->keycode (quote F7) 98)
(hashq-set! keysym->keycode (quote F3) 99)
(hashq-set! keysym->keycode (quote F8) 100)
(hashq-set! keysym->keycode (quote F9) 101)
(hashq-set! keysym->keycode (quote F11) 103)
(hashq-set! keysym->keycode (quote F13) 105)
(hashq-set! keysym->keycode (quote F16) 106)
(hashq-set! keysym->keycode (quote F14) 107)
(hashq-set! keysym->keycode (quote F10) 109)
(hashq-set! keysym->keycode (quote F12) 111)
(hashq-set! keysym->keycode (quote F15) 113)
(hashq-set! keysym->keycode (quote Help) 114)
(hashq-set! keysym->keycode (quote Home) 115)
(hashq-set! keysym->keycode (quote PageUp) 116)
(hashq-set! keysym->keycode (quote ForwardDelete) 117)
(hashq-set! keysym->keycode (quote F4) 118)
(hashq-set! keysym->keycode (quote End) 119)
(hashq-set! keysym->keycode (quote F2) 120)
(hashq-set! keysym->keycode (quote PageDown) 121)
(hashq-set! keysym->keycode (quote F1) 122)
(hashq-set! keysym->keycode (quote LeftArrow) 123)
(hashq-set! keysym->keycode (quote RightArrow) 124)
(hashq-set! keysym->keycode (quote DownArrow) 125)
(hashq-set! keysym->keycode (quote UpArrow) 126)
;;; END key-constants.scm