Line 8:
Line 8:
|-
|-
|<code>char KBDSetup((void*)connection_callback,(void*)disconnection_callback,(void*)key_callback)</code>
|<code>char KBDSetup((void*)connection_callback,(void*)disconnection_callback,(void*)key_callback)</code>
−
|Initializes the USB keyboard library and return 0 if successfull; connection and disconnection callback are called repectively at the connection or disconnection of an usb keyboard; key callback is called when some key event occurs (2 times: press and release)
+
|Initializes the USB keyboard library and return 0 if successfull. connection and disconnection callback are called repectively at the connection or disconnection of an usb keyboard; key callback is called when some key event occurs (2 times: press and release)
|-
|-
|<code>char KBDTeardown()</code>
|<code>char KBDTeardown()</code>
Line 18:
Line 18:
|<code>char KBDExit();</code>
|<code>char KBDExit();</code>
|Calls KBDTeardown() (probably an old function left for compatibility); should returns 0 if successfull
|Calls KBDTeardown() (probably an old function left for compatibility); should returns 0 if successfull
+
|-
+
|}
+
+
== Structures ==
+
{| class="wikitable"
+
!Prototype
+
!Description
+
|-
+
|<syntaxhighlight lang="C">
+
typedef struct {
+
unsigned char ch;
+
unsigned char scancode;
+
unsigned int state; //1=press; 0=release; 3=keep pressing
+
char unknown[4]; //?
+
unsigned short UTF16;
+
} key_state;
+
</syntaxhighlight>
+
|Used as argument of key_callback
|-
|-
|}
|}