21#define PS2KBD_FSNAME "usbkbd"
22#define PS2KBD_KBDFILE "dev"
23#define PS2KBD_DEVFILE (PS2KBD_FSNAME ":" PS2KBD_KBDFILE)
25#define PS2KBD_LED_NUMLOCK 1
26#define PS2KBD_LED_CAPSLOCK 2
27#define PS2KBD_LED_SCRLOCK 4
28#define PS2KBD_LED_COMPOSE 8
29#define PS2KBD_LED_KANA 16
31#define PS2KBD_LED_MASK 0x1F;
33#define PS2KBD_ESCAPE_KEY 0x1B
35#define PS2KBD_LEFT_CTRL (1 << 0)
36#define PS2KBD_LEFT_SHIFT (1 << 1)
37#define PS2KBD_LEFT_ALT (1 << 2)
38#define PS2KBD_LEFT_GUI (1 << 3)
39#define PS2KBD_RIGHT_CTRL (1 << 4)
40#define PS2KBD_RIGHT_SHIFT (1 << 5)
41#define PS2KBD_RIGHT_ALT (1 << 6)
42#define PS2KBD_RIGHT_GUI (1 << 7)
44#define PS2KBD_CTRL (PS2KBD_LEFT_CTRL | PS2KBD_RIGHT_CTRL)
45#define PS2KBD_SHIFT (PS2KBD_LEFT_SHIFT | PS2KBD_RIGHT_SHIFT)
46#define PS2KBD_ALT (PS2KBD_LEFT_ALT | PS2KBD_RIGHT_ALT)
47#define PS2KBD_GUI (PS2KBD_LEFT_GUI | PS2KBD_RIGHT_GUI)
49#define PS2KBD_RAWKEY_UP 0xF0
50#define PS2KBD_RAWKEY_DOWN 0xF1
58#define PS2KBD_READMODE_NORMAL 1
59#define PS2KBD_READMODE_RAW 2
68#define PS2KBD_BLOCKING 1
69#define PS2KBD_NONBLOCKING 0
71#define PS2KBD_KEYMAP_SIZE 256
75 u8 keymap[PS2KBD_KEYMAP_SIZE];
76 u8 shiftkeymap[PS2KBD_KEYMAP_SIZE];
77 u8 keycap[PS2KBD_KEYMAP_SIZE];
83#define PS2KBD_IOCTL_SETREADMODE 1
85#define PS2KBD_IOCTL_SETLEDS 2
87#define PS2KBD_IOCTL_SETREPEATRATE 3
89#define PS2KBD_IOCTL_SETKEYMAP 4
91#define PS2KBD_IOCTL_SETCTRLMAP 5
93#define PS2KBD_IOCTL_SETALTMAP 6
95#define PS2KBD_IOCTL_SETSPECIALMAP 7
97#define PS2KBD_IOCTL_SETBLOCKMODE 8
99#define PS2KBD_IOCTL_FLUSHBUFFER 9
101#define PS2KBD_IOCTL_RESETKEYMAP 10