Rev 1626 | Rev 1634 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1626 | Rev 1629 | ||
---|---|---|---|
Line 38... | Line 38... | ||
38 | 1, |
38 | 1, |
39 | cuda_cmds |
39 | cuda_cmds |
40 | }; |
40 | }; |
41 | 41 | ||
42 | 42 | ||
- | 43 | static char lchars[0x80] = { |
|
- | 44 | 'a', 's', 'd', 'f', 'h', 'g', 'z', 'x', 'c', 'v', 0, 'b', 'q', 'w', 'e', 'r', |
|
- | 45 | 'y', 't', '1', '2', '3', '4', '6', '5', '=', '9', '7', '-', '8', '0', ']', 'o', |
|
- | 46 | 'u', '[', 'i', 'p', 13, 'l', 'j', '\'', 'k', ';', '\\', ',', '/', 'n', 'm', '.', |
|
- | 47 | 9, 32, '`', 8, 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
- | 48 | 0, '.', 0, '*', 0, '+', 0, 0, 0, 0, 0, '/', 13, 0, '-', 0, |
|
- | 49 | 0, 0, '0', '1', '2', '3', '4', '5', '6', '7', 0, '8', '9', 0, 0, 0, |
|
- | 50 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
- | 51 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
|
- | 52 | }; |
|
- | 53 | ||
- | 54 | ||
43 | int kbd_arch_init(void) |
55 | int kbd_arch_init(void) |
44 | { |
56 | { |
45 | return (!ipc_register_irq(sysinfo_value("cuda.irq"), &cuda_kbd)); |
57 | return (!ipc_register_irq(sysinfo_value("cuda.irq"), &cuda_kbd)); |
46 | } |
58 | } |
47 | 59 | ||
48 | 60 | ||
49 | int kbd_arch_process(keybuffer_t *keybuffer, int scan_code) |
61 | int kbd_arch_process(keybuffer_t *keybuffer, int scan_code) |
50 | { |
62 | { |
- | 63 | uint8_t scancode = (uint8_t) scan_code; |
|
- | 64 | ||
- | 65 | if ((scancode != 0) && ((scancode & 0x80) != 0x80)) |
|
51 | keybuffer_push(keybuffer, scan_code); |
66 | keybuffer_push(keybuffer, lchars[scancode & 0x7f]); |
- | 67 | ||
52 | return 1; |
68 | return 1; |
53 | } |
69 | } |