rayzor
diff src/scancode.h @ 1:a826bf0fb169
fixed line endings
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 05 Apr 2014 09:05:26 +0300 |
parents | 2a5340a6eee4 |
children | d94a69933a71 |
line diff
1.1 --- a/src/scancode.h Sat Apr 05 08:46:27 2014 +0300 1.2 +++ b/src/scancode.h Sat Apr 05 09:05:26 2014 +0300 1.3 @@ -1,31 +1,31 @@ 1.4 -#ifndef KEYB_C_ 1.5 -#error "do not include scancode.h anywhere..." 1.6 -#endif 1.7 - 1.8 -/* special keys */ 1.9 -enum { 1.10 - LALT, RALT, 1.11 - LCTRL, RCTRL, 1.12 - LSHIFT, RSHIFT, 1.13 - F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, 1.14 - CAPSLK, NUMLK, SCRLK, SYSRQ, 1.15 - ESC = 27, 1.16 - INSERT, DEL, HOME, END, PGUP, PGDN, LEFT, RIGHT, UP, DOWN, 1.17 - NUM_DOT, NUM_ENTER, NUM_PLUS, NUM_MINUS, NUM_MUL, NUM_DIV, 1.18 - NUM_0, NUM_1, NUM_2, NUM_3, NUM_4, NUM_5, NUM_6, NUM_7, NUM_8, NUM_9, 1.19 - BACKSP = 127 1.20 -}; 1.21 - 1.22 -/* table with rough translations from set 1 scancodes to ASCII-ish */ 1.23 -static int scantbl[] = { 1.24 - 0, ESC, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=', '\b', /* 0 - e */ 1.25 - '\t', 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', '\n', /* f - 1c */ 1.26 - LCTRL, 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', '\'', '`', /* 1d - 29 */ 1.27 - LSHIFT, '\\', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/', RSHIFT, /* 2a - 36 */ 1.28 - NUM_MUL, LALT, ' ', CAPSLK, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, /* 37 - 44 */ 1.29 - NUMLK, SCRLK, NUM_7, NUM_8, NUM_9, NUM_MINUS, NUM_4, NUM_5, NUM_6, NUM_PLUS, /* 45 - 4e */ 1.30 - NUM_1, NUM_2, NUM_3, NUM_0, NUM_DOT, SYSRQ, 0, 0, F11, F12, /* 4d - 58 */ 1.31 - 0, 0, 0, 0, 0, 0, 0, /* 59 - 5f */ 1.32 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 60 - 6f */ 1.33 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* 70 - 7f */ 1.34 -}; 1.35 +#ifndef KEYB_C_ 1.36 +#error "do not include scancode.h anywhere..." 1.37 +#endif 1.38 + 1.39 +/* special keys */ 1.40 +enum { 1.41 + LALT, RALT, 1.42 + LCTRL, RCTRL, 1.43 + LSHIFT, RSHIFT, 1.44 + F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, 1.45 + CAPSLK, NUMLK, SCRLK, SYSRQ, 1.46 + ESC = 27, 1.47 + INSERT, DEL, HOME, END, PGUP, PGDN, LEFT, RIGHT, UP, DOWN, 1.48 + NUM_DOT, NUM_ENTER, NUM_PLUS, NUM_MINUS, NUM_MUL, NUM_DIV, 1.49 + NUM_0, NUM_1, NUM_2, NUM_3, NUM_4, NUM_5, NUM_6, NUM_7, NUM_8, NUM_9, 1.50 + BACKSP = 127 1.51 +}; 1.52 + 1.53 +/* table with rough translations from set 1 scancodes to ASCII-ish */ 1.54 +static int scantbl[] = { 1.55 + 0, ESC, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=', '\b', /* 0 - e */ 1.56 + '\t', 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', '\n', /* f - 1c */ 1.57 + LCTRL, 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', '\'', '`', /* 1d - 29 */ 1.58 + LSHIFT, '\\', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/', RSHIFT, /* 2a - 36 */ 1.59 + NUM_MUL, LALT, ' ', CAPSLK, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, /* 37 - 44 */ 1.60 + NUMLK, SCRLK, NUM_7, NUM_8, NUM_9, NUM_MINUS, NUM_4, NUM_5, NUM_6, NUM_PLUS, /* 45 - 4e */ 1.61 + NUM_1, NUM_2, NUM_3, NUM_0, NUM_DOT, SYSRQ, 0, 0, F11, F12, /* 4d - 58 */ 1.62 + 0, 0, 0, 0, 0, 0, 0, /* 59 - 5f */ 1.63 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 60 - 6f */ 1.64 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* 70 - 7f */ 1.65 +};