root / proj / project / src / makecode_map.c @ 356
History | View | Annotate | Download (893 Bytes)
1 | 351 | up20180642 | #include <lcom/lcf.h> |
---|---|---|---|
2 | |||
3 | 271 | up20180655 | #include "makecode_map.h" |
4 | |||
5 | 345 | up20180642 | static const char makecode_map[] = {ERROR_CODE, ERROR_CODE, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '\'', ERROR_CODE /*«*/, ERROR_CODE /*escape*/, |
6 | 324 | up20180642 | ERROR_CODE /*tab*/, 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', '+', ERROR_CODE /* ´ */, ERROR_CODE /*enter*/, |
7 | ERROR_CODE /*ctrl*/, 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', ERROR_CODE /* Ç */, ERROR_CODE /* º */, '\\', ERROR_CODE /*lshift*/, '~', |
||
8 | 'Z', 'X', 'C', 'V', 'B', 'N', 'M', ',', '.', '-', ERROR_CODE /*rshift*/, ERROR_CODE /*unkown*/, ERROR_CODE /*alt*/, ' ' /*space*/}; |
||
9 | 271 | up20180655 | |
10 | 324 | up20180642 | static const int size = sizeof(makecode_map); |
11 | 271 | up20180655 | |
12 | char (map_makecode)(uint8_t code) {
|
||
13 | 345 | up20180642 | if (code < 0 || code >= size) return ERROR_CODE; |
14 | return makecode_map[code];
|
||
15 | 271 | up20180655 | } |