Difference between revisions of "Libwiikeyboard"
Jump to navigation
Jump to search
(→Todo) |
(→Todo) |
||
Line 85: | Line 85: | ||
-Use the interrupt pipe in stead of control pipe<br> | -Use the interrupt pipe in stead of control pipe<br> | ||
-Make the localization for other keyboard like AZERTY<br> | -Make the localization for other keyboard like AZERTY<br> | ||
− | -Implement a a function to use key reapeat | + | -Implement a a function to use key reapeat<br> |
-See how to feet with the SDL ? | -See how to feet with the SDL ? |
Revision as of 13:53, 31 July 2008
libwiikeyboard | |
General | |
---|---|
Author(s) | davyg |
Type | Library |
Links | |
Download | |
Peripherals | |
![]() |
Libwiikeyboard
Presentation
A library who permit to use one or more usbkeyboard on the wii using libogc and devkitpro.
It use directly the USB function and not the /dev/usb/kbd therefore It's a bit complicated to use for a
more simple library but less powerful you can use libusbkbd
Download
Include and .a : File:Libwiikeyboard.tar.bz2
Source : File:Libwiikeyboard-src.tar.bz2
Compilation
make
Installation
make install
or
copy lib/libwiikeyboard in libogc/lib/wii and include/* in libogc/include/wiikeyboard
Usage
To initialize :
KEYBOARD_Init();
In your main loop :
KEYBOARD_ScanKeyboards();
To get an event :
KEYBOARD_getEvent(keyboardEvent *event)
At the end :
KEYBOARD_Deinit();
Useful enum or struct :
typedef enum
{
KEYBOARD_PRESSED = 0,
KEYBOARD_RELEASED,
KEYBOARD_DISCONNECTED,
KEYBOARD_CONNECTED
}keyboard_eventType;
typedef struct _keyboard_keysym
{
u8 scancode;
KEYBOARD_KEY sym;
char ch;
KEYBOARD_MOD mod;
}keyboard_keysym;
typedef struct _KeyboardEvent{
keyboard_eventType type;
keyboard_keysym keysym;
device dev;
}keyboardEvent;
Todo
-Use the interrupt pipe in stead of control pipe
-Make the localization for other keyboard like AZERTY
-Implement a a function to use key reapeat
-See how to feet with the SDL ?