9 #include <api_drv_keyboard.h>
13 int NativeKeyboard_Install(char **Arguments);
14 int NativeKeyboard_IOCtl(tVFS_Node *Node, int Id, void *Data);
17 MODULE_DEFINE(0, 0x0100, NativeKeyboard, NativeKeyboard_Install, NULL, NULL);
18 tDevFS_Driver gKB_DevInfo = {
19 NULL, "NativeKeyboard",
23 .IOCtl = NativeKeyboard_IOCtl
29 * \brief Install the keyboard driver
31 int NativeKeyboard_Install(char **Arguments)
33 DevFS_AddDevice( &gKB_DevInfo );
37 static const char * csaIOCTL_NAMES[] = {
39 DRV_KEYBAORD_IOCTLNAMES,
44 * \fn int KB_IOCtl(tVFS_Node *Node, int Id, void *Data)
45 * \brief Calls an IOCtl Command
47 int NativeKeyboard_IOCtl(tVFS_Node *Node, int Id, void *Data)
51 BASE_IOCTLS(DRV_TYPE_KEYBOARD, "NativeKeyboard", 0x10000, csaIOCTL_NAMES);
53 // Sets the Keyboard Callback
54 case KB_IOCTL_SETCALLBACK:
56 if(Threads_GetUID() != 0)
58 // Can only be set once
59 if(gUI_KeyboardCallback != NULL) return 0;
61 gUI_KeyboardCallback = Data;