Synchronize with trunk's revision r57629.
[reactos.git] / boot / armllb / hw / matrix.c
1 /*
2 * PROJECT: ReactOS Boot Loader
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: boot/armllb/hw/matrix.c
5 * PURPOSE: LLB Matrix Keypad Routines
6 * PROGRAMMERS: ReactOS Portable Systems Group
7 */
8
9 #include "precomp.h"
10
11 /* SYNPATICS KEYPAD MATRIX ****************************************************/
12
13 UCHAR KeyMatrix[8][8] =
14 {
15 {'e', 'r', 't', KEY_HOME, 0, 0, 'i', KEY_LEFTSHIFT},
16 {'d', 'f', 'g', KEY_SEND, 0, 0, 'k', KEY_ENTER},
17 {'x', 'c', 'v', KEY_END, 0, 0, '.', KEY_CAPS_LOCK},
18 {'z', '+', 'b', KEY_F1, 0, 0, 'o', KEY_SPACE},
19 {'w', 'y', 'u', KEY_F2, 0, 0, 'l', KEY_LEFT},
20 {'s', 'h', 'j', KEY_F3, 0, 0, 'm', KEY_RIGHT},
21 {'q', 'a', 'n', KEY_BACKSPACE, 0, 0, 'p', KEY_UP},
22 {0, 0, 0, 0, 0, 0, KEY_ENTER, KEY_DOWN}
23 };
24
25 /* FUNCTIONS ******************************************************************/
26
27 CHAR
28 NTAPI
29 LlbKeypadGetChar(VOID)
30 {
31 UCHAR ScanCode;
32 UCHAR Col, Row;
33
34 ScanCode = LlbHwKbdRead();
35 Col = ScanCode >> 4;
36 Row = ScanCode & 0xF;
37
38 /* Return the ASCII character */
39 return KeyMatrix[Col][Row];
40 }
41
42 /* EOF */