Debian Codegraph @

vt/key.go

raw symbols SCIP
1 // Copyright 2026 The TCell Authors
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 package vt
16
17 // BaseKey is the Kitty protocol base key. These are kitty's representation of a scan code.
18 // As the Kitty protocol is likely the extended keyboard protocol we care most about, we use
19 // this as the primary reporting mechanism. (It also helps that this may provide an easier
20 // fallback for implementations that don't have raw scan codes and are willing to assume an
21 // ANSI layout.)
22 type BaseKey rune
23
24 var shiftedBaseKeys map[BaseKey]rune
25
26 func (bk BaseKey) Shifted() rune {
27
28 if s, ok := shiftedBaseKeys[bk]; ok {
29 return s
30 }
31 if bk >= 'a' && bk <= 'z' {
32 return rune(bk - 32)
33 }
34 return rune(bk)
35 }
36
37 // ScanCode is the scan code used by Windows for a key. These are physical key locations,
38 // and every physical should have a exactly one mapping here.
39 type ScanCode uint16
40
41 // Key represents the key code for a key. These are largely taken from the HID specification page 0x07,
42 // although there are gaps and some inconsistencies. We chose this specification because it covers all
43 // keyboards we are likely to see in practice. Note that the zero value is reserved and will never be
44 // assigned a valid key. A number of keys are from UNIX keyboards (e.g. Sun type 6 keyboards), and we do not
45 // explicitly support these because none of the common reporting protocols have a way to report them.
46 // Instead these should probably be mapped higher functions (F13 and up), if you're facing this.
47 // These are key locations on a US keyboard. For example on AZERTY layout KeyQ corresponds to a key
48 // that has a printed "A", but is in the upper left position (below the digits.)
49 type Key uint16
50
51 const (
52 KeyUTF = Key(0x01) // virtual UTF-8 content
53 KeyA = Key(0x04)
54 KeyB = Key(0x05)
55 KeyC = Key(0x06)
56 KeyD = Key(0x07)
57 KeyE = Key(0x08)
58 KeyF = Key(0x09)
59 KeyG = Key(0x0A)
60 KeyH = Key(0x0B)
61 KeyI = Key(0x0C)
62 KeyJ = Key(0x0D)
63 KeyK = Key(0x0E)
64 KeyL = Key(0x0F)
65 KeyM = Key(0x10)
66 KeyN = Key(0x11)
67 KeyO = Key(0x12)
68 KeyP = Key(0x13)
69 KeyQ = Key(0x14)
70 KeyR = Key(0x15)
71 KeyS = Key(0x16)
72 KeyT = Key(0x17)
73 KeyU = Key(0x18)
74 KeyV = Key(0x19)
75 KeyW = Key(0x1A)
76 KeyX = Key(0x1B)
77 KeyY = Key(0x1C)
78 KeyZ = Key(0x1D)
79 Key1 = Key(0x1E)
80 Key2 = Key(0x1F)
81 Key3 = Key(0x20)
82 Key4 = Key(0x21)
83 Key5 = Key(0x22)
84 Key6 = Key(0x23)
85 Key7 = Key(0x24)
86 Key8 = Key(0x25)
87 Key9 = Key(0x26)
88 Key0 = Key(0x27)
89 KeyEnter = Key(0x28)
90 KeyEsc = Key(0x29)
91 KeyBackspace = Key(0x2a) // sometimes called delete
92 KeyTab = Key(0x2b)
93 KeySpace = Key(0x2c)
94 KeyMinus = Key(0x2d) // - and _
95 KeyEqual = Key(0x2e) // = and +
96 KeyLBrace = Key(0x2f) // [ and {
97 KeyRBrace = Key(0x30) // ] and }
98 KeyBackslash = Key(0x31) // \
99 KeyIsoHash = Key(0x32) // international only
100 KeySemi = Key(0x33) // ;
101 KeyQuote = Key(0x34) // ' and " aka apostrophe
102 KeyGrave = Key(0x35) // ` and ~
103 KeyComma = Key(0x36) // , and <
104 KeyPeriod = Key(0x37) // . and >
105 KeySlash = Key(0x38) // / and ?
106 KeyCapsLock = Key(0x39)
107 KeyF1 = Key(0x3a)
108 KeyF2 = Key(0x3b)
109 KeyF3 = Key(0x3c)
110 KeyF4 = Key(0x3d)
111 KeyF5 = Key(0x3e)
112 KeyF6 = Key(0x3f)
113 KeyF7 = Key(0x40)
114 KeyF8 = Key(0x41)
115 KeyF9 = Key(0x42)
116 KeyF10 = Key(0x43)
117 KeyF11 = Key(0x44)
118 KeyF12 = Key(0x45)
119 KeyPrtScr = Key(0x46)
120 KeyScrLock = Key(0x47)
121 KeyPause = Key(0x48)
122 KeyInsert = Key(0x49)
123 KeyHome = Key(0x4a)
124 KeyPgUp = Key(0x4b)
125 KeyDelete = Key(0x4c) // forward delete (DEL)
126 KeyEnd = Key(0x4d)
127 KeyPgDn = Key(0x4e)
128 KeyRight = Key(0x4f)
129 KeyLeft = Key(0x50)
130 KeyDown = Key(0x51)
131 KeyUp = Key(0x52)
132 KeyNumLock = Key(0x53) // also clear
133 KeyPadDiv = Key(0x54)
134 KeyPadMul = Key(0x55)
135 KeyPadSub = Key(0x56)
136 KeyPadAdd = Key(0x57)
137 KeyPadEnter = Key(0x58)
138 KeyPad1 = Key(0x59) // also pad end
139 KeyPad2 = Key(0x5a) // also pad down
140 KeyPad3 = Key(0x5b) // also pad page down
141 KeyPad4 = Key(0x5c) // also pad left
142 KeyPad5 = Key(0x5d)
143 KeyPad6 = Key(0x5e) // also pad right
144 KeyPad7 = Key(0x5f) // also pad home
145 KeyPad8 = Key(0x60) // also pad up
146 KeyPad9 = Key(0x61) // also pad page up
147 KeyPad0 = Key(0x62) // also pad insert
148 KeyPadDec = Key(0x63) // also pad delete
149 KeyIsoBackSlash = Key(0x64) // international keyboards only
150 KeyPadEqual = Key(0x67)
151 KeyF13 = Key(0x68)
152 KeyF14 = Key(0x69)
153 KeyF15 = Key(0x6a)
154 KeyF16 = Key(0x6b)
155 KeyF17 = Key(0x6c)
156 KeyF18 = Key(0x6d)
157 KeyF19 = Key(0x6e)
158 KeyF20 = Key(0x6f)
159 KeyF21 = Key(0x70)
160 KeyF22 = Key(0x71)
161 KeyF23 = Key(0x72)
162 KeyF24 = Key(0x73)
163 KeyMenu = Key(0x76) // might also be 0x65, KeyApplication
164 KeyPadComma = Key(0x85)
165 KeyPadEqSign = Key(0x86)
166 KeyIsoSlash = Key(0x87) // also International 1
167 KeyHiragana = Key(0x88) // also International 2
168 KeyYen = Key(0x89) // found on JIS keyboards
169 KeyConvert = Key(0x8a)
170 KeyNonConvert = Key(0x8b)
171 KeyAltErase = Key(0x99) // e.g split space-erase bar
172 KeySysReq = Key(0x9a)
173 KeyCancel = Key(0x9b)
174 KeyLCtrl = Key(0xe0)
175 KeyLShift = Key(0xe1)
176 KeyLAlt = Key(0xe2)
177 KeyLMeta = Key(0xe3)
178 KeyRCtrl = Key(0xe4)
179 KeyRShift = Key(0xe5)
180 KeyRAlt = Key(0xe6)
181 KeyRMeta = Key(0xe7)
182 KeyLHyper = Key(0xff01) // software only, in reserved space
183 KeyRHyper = Key(0xff02) // software only, in reserved space
184 )
185
186 // scanCodes is a list of Windows scan codes for physical keys.
187 var scanCodes map[Key]ScanCode
188
189 // ScanCode returns the corresponding Windows Scan Code (not a VK!)
190 // for the given key. (Virtual keys should be determined by the
191 // host OS using the current keyboard layout.)
192 func (k Key) ScanCode() ScanCode {
193
194 if w, ok := scanCodes[k]; ok {
195 return w
196 }
197 return 0
198 }
199
200 // WinVK represents a windows virtual key code.
201 // These are similar to base keys, but multiple scanned key codes
202 // may result in the same virtual key. This can also be sensitive to
203 // the keyboard layout.
204 type WinVK rune
205
206 const (
207 VkBack = WinVK(0x08) // backspace
208 VkTab = WinVK(0x09)
209 VkClear = WinVK(0x0c)
210 VkReturn = WinVK(0x0d)
211 VkShift = WinVK(0x10)
212 VkControl = WinVK(0x11)
213 VkMenu = WinVK(0x12)
214 VkPause = WinVK(0x13)
215 VkCapital = WinVK(0x14) // caps lock
216 VkKana = WinVK(0x15)
217 VkHangul = WinVK(0x15)
218 VkImeOn = WinVK(0x16)
219 VkJunja = WinVK(0x17)
220 VkFinal = WinVK(0x18)
221 VkKanji = WinVK(0x19)
222 VkImeOff = WinVK(0x1a)
223 VkEscape = WinVK(0x1b)
224 VkConvert = WinVK(0x1c)
225 VkNonConvert = WinVK(0x1d)
226 VkAccept = WinVK(0x1e)
227 VkModeChange = WinVK(0x1f)
228 VkSpace = WinVK(0x20)
229 VkPrior = WinVK(0x21) // page up
230 VkNext = WinVK(0x22) // page down
231 VkEnd = WinVK(0x23)
232 VkHome = WinVK(0x24)
233 VkLeft = WinVK(0x25)
234 VkUp = WinVK(0x26)
235 VkRight = WinVK(0x27)
236 VkDown = WinVK(0x28)
237 VkSelect = WinVK(0x29)
238 VkPrint = WinVK(0x2a)
239 VkExecute = WinVK(0x2b)
240 VkSnapshot = WinVK(0x2c) // print screen
241 VkInsert = WinVK(0x2D)
242 VkDelete = WinVK(0x2E)
243 VkHelp = WinVK(0x2F)
244 Vk0 = WinVK(0x30)
245 Vk1 = WinVK(0x31)
246 Vk2 = WinVK(0x32)
247 Vk3 = WinVK(0x33)
248 Vk4 = WinVK(0x34)
249 Vk5 = WinVK(0x35)
250 Vk6 = WinVK(0x36)
251 Vk7 = WinVK(0x37)
252 Vk8 = WinVK(0x38)
253 Vk9 = WinVK(0x39)
254 VkA = WinVK(0x41)
255 VkB = WinVK(0x42)
256 VkC = WinVK(0x43)
257 VkD = WinVK(0x44)
258 VkE = WinVK(0x45)
259 VkF = WinVK(0x46)
260 VkG = WinVK(0x47)
261 VkH = WinVK(0x48)
262 VkI = WinVK(0x49)
263 VkJ = WinVK(0x4a)
264 VkK = WinVK(0x4b)
265 VkL = WinVK(0x4c)
266 VkM = WinVK(0x4d)
267 VkN = WinVK(0x4e)
268 VkO = WinVK(0x4f)
269 VkP = WinVK(0x50)
270 VkQ = WinVK(0x51)
271 VkR = WinVK(0x52)
272 VkS = WinVK(0x53)
273 VkT = WinVK(0x54)
274 VkU = WinVK(0x55)
275 VkV = WinVK(0x56)
276 VkW = WinVK(0x57)
277 VkX = WinVK(0x58)
278 VkY = WinVK(0x59)
279 VkZ = WinVK(0x5a)
280 VkLWin = WinVK(0x5b) // left meta
281 VkRWin = WinVK(0x5c) // right meta
282 VkApps = WinVK(0x5d) // menu key
283 VkNumPad0 = WinVK(0x60)
284 VkNumPad1 = WinVK(0x61)
285 VkNumPad2 = WinVK(0x62)
286 VkNumPad3 = WinVK(0x63)
287 VkNumPad4 = WinVK(0x64)
288 VkNumPad5 = WinVK(0x65)
289 VkNumPad6 = WinVK(0x66)
290 VkNumPad7 = WinVK(0x67)
291 VkNumPad8 = WinVK(0x68)
292 VkNumPad9 = WinVK(0x69)
293 VkMultiply = WinVK(0x6a) // pad multiply
294 VkAdd = WinVK(0x6b) // pad add
295 VkSeparator = WinVK(0x6c) // separator
296 VkSubtract = WinVK(0x6d) // pad subtract
297 VkDecimal = WinVK(0x6e) // pad decimal point
298 VkDivide = WinVK(0x6f) // pad divide
299 VkF1 = WinVK(0x70)
300 VkF2 = WinVK(0x71)
301 VkF3 = WinVK(0x72)
302 VkF4 = WinVK(0x73)
303 VkF5 = WinVK(0x74)
304 VkF6 = WinVK(0x75)
305 VkF7 = WinVK(0x76)
306 VkF8 = WinVK(0x77)
307 VkF9 = WinVK(0x78)
308 VkF10 = WinVK(0x79)
309 VkF11 = WinVK(0x7a)
310 VkF12 = WinVK(0x7b)
311 VkF13 = WinVK(0x7c)
312 VkF14 = WinVK(0x7d)
313 VkF15 = WinVK(0x7e)
314 VkF16 = WinVK(0x7f)
315 VkF17 = WinVK(0x80)
316 VkF18 = WinVK(0x81)
317 VkF19 = WinVK(0x82)
318 VkF20 = WinVK(0x83)
319 VkF21 = WinVK(0x84)
320 VkF22 = WinVK(0x85)
321 VkF23 = WinVK(0x86)
322 VkF24 = WinVK(0x87)
323 VkNumLock = WinVK(0x90)
324 VkScroll = WinVK(0x91) // scroll lock
325 VkLShift = WinVK(0xa0)
326 VkRShift = WinVK(0xa1)
327 VkLControl = WinVK(0xa2)
328 VkRControl = WinVK(0xa3)
329 VkLMenu = WinVK(0xa4) // left alt
330 VkRMenu = WinVK(0xa5) // right alt
331 VkOem1 = WinVK(0xba) // ; and :
332 VkOemPlus = WinVK(0xbb) // = and +
333 VkOemComma = WinVK(0xbc) // , and <
334 VkOemMinus = WinVK(0xbd) // - and _
335 VkOemPeriod = WinVK(0xbe) // . and >
336 VkOem2 = WinVK(0xbf) // / and ?
337 VkOem3 = WinVK(0xc0) // ` and ~
338 VkOem4 = WinVK(0xdb) // [ and {
339 VkOem5 = WinVK(0xdc) // \ and |
340 VkOem6 = WinVK(0xdd) // ] and }
341 VkOem7 = WinVK(0xde) // ' and "
342 VkOem8 = WinVK(0xdf) // right control for Canadian CSA
343 VkOem102 = WinVK(0xe2) // ISO backslash
344 VkPacket = WinVK(0xe7)
345 )
346
347 var baseKeys map[Key]BaseKey
348
349 // KittyBase returns the corresponding Kitty "base" key for the given USB code.
350 // If no corresponding value can be found, then zero is returned. Note that
351 // some keys (such as F1) are valid, and recognized by Kitty, but do not use the
352 // base key encoding because they use another reporting format.
353 func (k Key) KittyBase() BaseKey {
354 if w, ok := baseKeys[k]; ok {
355 return w
356 }
357 return 0
358 }
359
360 func init() {
361 // we place them in init to avoid incorrect processing in coverage checks.
362
363 baseKeys = map[Key]BaseKey{
364 KeyA: 'a',
365 KeyB: 'b',
366 KeyC: 'c',
367 KeyD: 'd',
368 KeyE: 'e',
369 KeyF: 'f',
370 KeyG: 'g',
371 KeyH: 'h',
372 KeyI: 'i',
373 KeyJ: 'j',
374 KeyK: 'k',
375 KeyL: 'l',
376 KeyM: 'm',
377 KeyN: 'n',
378 KeyO: 'o',
379 KeyP: 'p',
380 KeyQ: 'q',
381 KeyR: 'r',
382 KeyS: 's',
383 KeyT: 't',
384 KeyU: 'u',
385 KeyV: 'v',
386 KeyW: 'w',
387 KeyX: 'x',
388 KeyY: 'y',
389 KeyZ: 'z',
390 Key1: '1',
391 Key2: '2',
392 Key3: '3',
393 Key4: '4',
394 Key5: '5',
395 Key6: '6',
396 Key7: '7',
397 Key8: '8',
398 Key9: '9',
399 Key0: '0',
400 KeyEnter: '\r',
401 KeyEsc: '\x1b',
402 KeyBackspace: '\x7f',
403 KeyTab: '\t',
404 KeySpace: ' ',
405 KeyMinus: '-',
406 KeyEqual: '=',
407 KeyLBrace: '[',
408 KeyRBrace: ']',
409 KeyBackslash: '\\',
410 KeyIsoHash: '#',
411 KeySemi: ';',
412 KeyQuote: '\'',
413 KeyGrave: '`',
414 KeyComma: ',',
415 KeyPeriod: '.',
416 KeySlash: '/',
417 KeyCapsLock: 57357,
418 KeyPrtScr: 57361,
419 KeyScrLock: 57359,
420 KeyPause: 57362,
421 KeyNumLock: 57360,
422 KeyPadDiv: 57410,
423 KeyPadMul: 57411,
424 KeyPadSub: 57412,
425 KeyPadAdd: 57413,
426 KeyPadEnter: 57414,
427 KeyPad1: 57400,
428 KeyPad2: 57401,
429 KeyPad3: 57402,
430 KeyPad4: 57403,
431 KeyPad5: 57404,
432 KeyPad6: 57405,
433 KeyPad7: 57406,
434 KeyPad8: 57407,
435 KeyPad9: 57408,
436 KeyPad0: 57399,
437 KeyPadDec: 57409,
438 KeyIsoBackSlash: '\\', // TODO: does kitty have another mapping for this?
439 KeyMenu: 57363,
440 KeyPadEqual: 57415,
441 KeyF13: 57376,
442 KeyF14: 57377,
443 KeyF15: 57378,
444 KeyF16: 57379,
445 KeyF17: 57380,
446 KeyF18: 57381,
447 KeyF19: 57382,
448 KeyF20: 57383,
449 KeyF21: 57384,
450 KeyF22: 57385,
451 KeyF23: 57386,
452 KeyF24: 57387, // NB: F25 up through 35 are notionally supported by Kitty, but not by us
453 KeyPadComma: 57416,
454 KeyIsoSlash: '/', // Kitty cannot discriminate?
455 KeyYen: '¥',
456 KeyLCtrl: 57442,
457 KeyLShift: 57441,
458 KeyLAlt: 57443,
459 KeyLMeta: 57444,
460 KeyRCtrl: 57448,
461 KeyRShift: 57447,
462 KeyRAlt: 57449,
463 KeyRMeta: 57450,
464
465 // KeyHiragana: 0, // Later
466 // KeyConvert: 0, // Later
467 // KeyNonConvert: 0, // Later
468
469 // Windows uses a bunch of HID usages from
470 // the consumer page (0x0c) for media playback, and
471 // other applications. We just ignore them.
472 }
473
474 // Scan codes used by Windows.
475 scanCodes = map[Key]ScanCode{
476 KeyA: 0x1e,
477 KeyB: 0x30,
478 KeyC: 0x2e,
479 KeyD: 0x20,
480 KeyE: 0x12,
481 KeyF: 0x21,
482 KeyG: 0x22,
483 KeyH: 0x23,
484 KeyI: 0x17,
485 KeyJ: 0x24,
486 KeyK: 0x25,
487 KeyL: 0x26,
488 KeyM: 0x32,
489 KeyN: 0x31,
490 KeyO: 0x18,
491 KeyP: 0x19,
492 KeyQ: 0x10,
493 KeyR: 0x13,
494 KeyS: 0x1f,
495 KeyT: 0x14,
496 KeyU: 0x16,
497 KeyV: 0x2f,
498 KeyW: 0x11,
499 KeyX: 0x2d,
500 KeyY: 0x15,
501 KeyZ: 0x2c,
502 Key1: 0x02,
503 Key2: 0x03,
504 Key3: 0x04,
505 Key4: 0x05,
506 Key5: 0x06,
507 Key6: 0x07,
508 Key7: 0x08,
509 Key8: 0x09,
510 Key9: 0x0a,
511 Key0: 0x0b,
512 KeyEnter: 0x1c,
513 KeyEsc: 0x01,
514 KeyBackspace: 0x0e,
515 KeyTab: 0x0f,
516 KeySpace: 0x39,
517 KeyMinus: 0x0c,
518 KeyEqual: 0x0d,
519 KeyLBrace: 0x1a,
520 KeyRBrace: 0x1b,
521 KeyBackslash: 0x2b,
522 KeySemi: 0x27,
523 KeyQuote: 0x28,
524 KeyGrave: 0x29,
525 KeyComma: 0x33,
526 KeyPeriod: 0x34,
527 KeySlash: 0x35,
528 KeyCapsLock: 0x3a,
529 KeyF1: 0x3b,
530 KeyF2: 0x3c,
531 KeyF3: 0x3d,
532 KeyF4: 0x3e,
533 KeyF5: 0x3f,
534 KeyF6: 0x40,
535 KeyF7: 0x41,
536 KeyF8: 0x42,
537 KeyF9: 0x43,
538 KeyF10: 0x44,
539 KeyF11: 0x57,
540 KeyF12: 0x58,
541 KeyPrtScr: 0x54,
542 KeyScrLock: 0x46,
543 KeyPause: 0xe046,
544 KeyInsert: 0xe052,
545 KeyHome: 0xe047,
546 KeyPgUp: 0xe049,
547 KeyDelete: 0xe053,
548 KeyEnd: 0xe04f,
549 KeyPgDn: 0xe051,
550 KeyRight: 0xe04d,
551 KeyLeft: 0xe04b,
552 KeyDown: 0xe050,
553 KeyUp: 0xe048,
554 KeyNumLock: 0x45,
555 KeyPadDiv: 0xe035,
556 KeyPadMul: 0x37,
557 KeyPadSub: 0x4a,
558 KeyPadAdd: 0x4e,
559 KeyPadEnter: 0xe01c,
560 KeyPad1: 0x4f,
561 KeyPad2: 0x50,
562 KeyPad3: 0x51,
563 KeyPad4: 0x4b,
564 KeyPad5: 0x4c,
565 KeyPad6: 0x4d,
566 KeyPad7: 0x47,
567 KeyPad8: 0x48,
568 KeyPad9: 0x49,
569 KeyPad0: 0x52,
570 KeyPadDec: 0x53,
571 KeyIsoBackSlash: 0x56,
572 KeyPadEqual: 0x59,
573 KeyF13: 0x64,
574 KeyF14: 0x65,
575 KeyF15: 0x66,
576 KeyF16: 0x67,
577 KeyF17: 0x68,
578 KeyF18: 0x69,
579 KeyF19: 0x6a,
580 KeyF20: 0x6b,
581 KeyF21: 0x6c,
582 KeyF22: 0x6d,
583 KeyF23: 0x6e,
584 KeyF24: 0x76,
585 KeyPadComma: 0x7e,
586 KeyIsoSlash: 0x73,
587 KeyHiragana: 0x70,
588 KeyYen: 0x7d,
589 KeyConvert: 0x79,
590 KeyNonConvert: 0x7b,
591 KeyLCtrl: 0x1d,
592 KeyLShift: 0x2a,
593 KeyLAlt: 0x38,
594 KeyLMeta: 0xe05b,
595 KeyRCtrl: 0xe01d,
596 KeyRShift: 0x36,
597 KeyRAlt: 0xe038,
598 KeyRMeta: 0xe05c,
599 KeyMenu: 0xe05d,
600
601 // Windows uses a bunch of HID usages from
602 // the consumer page (0x0c) for media playback, and
603 // other applications. We just ignore them.
604 }
605
606 shiftedBaseKeys = map[BaseKey]rune{
607 '`': '~',
608 '1': '!',
609 '2': '@',
610 '3': '#',
611 '4': '$',
612 '5': '%',
613 '6': '^',
614 '7': '&',
615 '8': '*',
616 '9': '(',
617 '0': ')',
618 '-': '_',
619 '=': '+',
620 '¥': '|',
621 '[': '{',
622 ']': '}',
623 '\\': '|',
624 ';': ':',
625 '\'': '"',
626 ',': '<',
627 '.': '>',
628 '/': '?',
629 }
630 }