8 #include <api_drv_common.h>
9 #include <api_drv_keyboard.h>
10 #include <Input/Keyboard/include/keyboard.h>
11 #include "kb_transtab.h"
14 #define KB_BUFFER_SIZE 1024
15 #define USE_KERNEL_MAGIC 1
18 int KB_Install(char **Arguments);
19 void KB_HandleScancode(Uint8 scancode);
20 void KB_UpdateLEDs(void);
21 int KB_IOCtl(tVFS_Node *Node, int Id, void *Data);
26 tKeyboard *gPS2Kb_Info;
30 * \brief Install the keyboard driver
32 int KB_Install(char **Arguments)
34 gPS2Kb_Info = Keyboard_CreateInstance(KEYSYM_RIGHTGUI, "PS2Keyboard");
39 * \brief Called on a keyboard IRQ
40 * \param IRQNum IRQ number (unused)
42 void KB_HandleScancode(Uint8 scancode)
47 if(scancode == 0xFA) return;
50 if(scancode == 0xE0) {
55 if(scancode == 0xE1) {
74 hidcode = gp101_to_HID[giPS2Kb_Layer][scancode];
77 Log_Warning("PS2Kb", "Unknown scancode %i:0x%x", giPS2Kb_Layer, scancode);
83 Keyboard_HandleKey( gPS2Kb_Info, (1 << 31) | hidcode );
85 Keyboard_HandleKey( gPS2Kb_Info, (0 << 31) | hidcode );
93 * \fn void KB_UpdateLEDs(void)
94 * \brief Updates the status of the keyboard LEDs
96 void KB_UpdateLEDs(void)
100 // leds = (gbKB_CapsState ? 4 : 0);
103 Log_Warning("Keyboard", "TODO: Update LEDs");