Nsyskbd.rpl: Difference between revisions
Jump to navigation
Jump to search
Rw-r-r 0644 (talk | contribs) Test programs worked so removed "types may be wrong" label + mior coreections |
Rw-r-r 0644 (talk | contribs) No edit summary |
||
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 | |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 | |||
|- | |- | ||
|} | |} |
Revision as of 16:38, 2 September 2016
nsyskbd.rpl is the system library that allows applications to use USB keyboards plugged in the WiiU USB ports
Functions
Initialisation
Prototype | Description |
---|---|
char KBDSetup((void*)connection_callback,(void*)disconnection_callback,(void*)key_callback)
|
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) |
char KBDTeardown()
|
Deinitializes the USB keyboard library and return 0 if the deinitialization was successfull |
char KBDInit((void*)unknown,(void*)connection_callback,(void*)disconnection_callback,(void*)key_callback);
|
Pass arguments to KBDSetup (probably an old function left for compatibility); should returns 0 if successfull |
char KBDExit();
|
Calls KBDTeardown() (probably an old function left for compatibility); should returns 0 if successfull |
Structures
Prototype | Description |
---|---|
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; |
Used as argument of key_callback |