12 #include <linux/keyboard.h>
13 #include <linux/ctype.h>
14 #include <linux/module.h>
19 #define KBD_STATUS_REG 0x64
20 #define KBD_DATA_REG 0x60
24 #define KBD_STAT_OBF 0x01
25 #define KBD_STAT_MOUSE_OBF 0x20
27 static int kbd_exists;
28 static int kbd_last_ret;
37 int scancode, scanstatus;
38 static int shift_lock;
43 if (KDB_FLAG(NO_I8042) || KDB_FLAG(NO_VT_CONSOLE) ||
72 if (((scancode&0x7f) == 0x2a) || ((scancode&0x7f) == 0x36)) {
76 if ((scancode & 0x80) == 0)
83 if ((scancode&0x7f) == 0x1d) {
87 if ((scancode & 0x80) == 0)
94 if ((scancode & 0x80) != 0) {
106 if (scancode == 0x3a) {
118 if (scancode == 0x0e) {
145 if (scancode == 0xe0)
153 if (scancode == 0x73)
155 else if (scancode == 0x7d)
158 if (!shift_lock && !shift_key && !ctrl_key) {
160 }
else if ((shift_lock || shift_key) &&
key_maps[1]) {
162 }
else if (ctrl_key &&
key_maps[4]) {
166 kdb_printf(
"Unknown state/scancode (%d)\n", scancode);
171 switch (
KTYP(keychar)) {
185 if (scancode == 0x1c) {
190 return keychar & 0xff;
201 int scancode, scanstatus;
258 if (scancode != 0x9c)