Skip to content

Commit 07e82b5

Browse files
committed
comments only
1 parent f0a4148 commit 07e82b5

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

digistump-avr/libraries/DigisparkKeyboard/scancode-ascii-table-be.h

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
#include <avr/pgmspace.h>
22
// Lookup table to convert ascii characters in to keyboard scan codes
33
// Format: most signifficant bit indicates if scan code should be sent with shift modifier
4-
// remaining 7 bits are to be used as scan code number.
4+
// next most significant bit is used for AltGr modifier
5+
// remaining 6 bits are to be used as scan code number.
6+
// scan codes correspond to the key position as if it were an US 104 keyboard
7+
58
#define Shift 0x80
69
#define AltGr 0x40
10+
711
const unsigned char ascii_to_scan_code_table[] PROGMEM = {
812
// ASCII Code HID Usage Key pos on a US Keyboard
913
// /* ASCII: 0 */ 0,
@@ -14,9 +18,9 @@ const unsigned char ascii_to_scan_code_table[] PROGMEM = {
1418
// /* ASCII: 5 */ 0,
1519
// /* ASCII: 6 */ 0,
1620
// /* ASCII: 7 */ 0,
17-
/* ASCII: 8 BS */ 0x2a, // BS 42, // backspace
18-
/* ASCII: 9 TAB */ 0x2b, // HT 43, // HT '\t' (horizontal tab)
19-
/* ASCII: 10 LF */ 0x28, // LF 0,
21+
/* ASCII: 8 BS */ 0x2a, // BS
22+
/* ASCII: 9 TAB */ 0x2b, // HT
23+
/* ASCII: 10 LF */ 0x28, // LF
2024
/* ASCII: 11 */ 0,
2125
/* ASCII: 12 */ 0,
2226
/* ASCII: 13 */ 0,
@@ -33,7 +37,7 @@ const unsigned char ascii_to_scan_code_table[] PROGMEM = {
3337
/* ASCII: 24 */ 0,
3438
/* ASCII: 25 */ 0,
3539
/* ASCII: 26 */ 0,
36-
/* ASCII: 27 ESC */ 0x29, // ESC 41,
40+
/* ASCII: 27 ESC */ 0x29, // ESC
3741
/* ASCII: 28 */ 0,
3842
/* ASCII: 29 */ 0,
3943
/* ASCII: 30 */ 0,

0 commit comments

Comments
 (0)