Changes

1,074 bytes added ,  09:46, 28 July 2008
New page: Provides a simple way to add usb keybard support to any app. Currently in alpha testing stages. == Readme == == Documentation == === Functions === <source lang="c"> char* kbdhandle(in...
Provides a simple way to add usb keybard support to any app.

Currently in alpha testing stages.

== Readme ==

== Documentation ==

=== Functions ===

<source lang="c">
char* kbdhandle(int fd, char message[15], bool output);
int kbdinit();
void kbddeinit(int kbdfd);
char* kbdscan(int kbdfd);
int kbdver();
</source>

kbdver(); = returns the lib version<br>
kbdinit(); = inits the lib and returns the keyboard fd handle<br>
kbdscan(); = similar to WPAD_Scan(); but returns the raw message from the kbd, must be passed what kbd returned<br>
kbdhandle(); = returns the charachter or code of what was pressed, fd is what kbdinit returned, message is what kbdscan returns, output is whether you want the full breakdown of the message<br>
kbddeinit(); = closes the library, must be done before exit(0); or similar, must be passed what kbdinit returned<br><br>

Examples :
<source lang="c">
int kbdfd = kbdinit();
char receivedmessage[15] = kbdscan(kbdfd);
char* pressed = kbdhandle(kbdfd, receivedmessage, false);
printf("%s was pressed\n", pressed);
kbddeinit(kbdfd);
</source>
569

edits