#include <revolution/kbd.h>
KBDEc KBDGetKey(KBDChannel ch, KBDKeyEvent *keyEvent);
ch |
Keyboard channel to query. |
keyEvent |
Pointer to the KBDKeyEvent structure. The key event is stored at the front of a key queue in the KBD library. |
KBDEc |
Keyboard error code.KBD_SUCCESS if the call was successful.KBD_ERR_NOT_INITIALIZED is returned if the library is not initialized. KBD_ERR_BAD_VALUE is returned if ch is out-of-range. KBD_ERR_BAD_STATUS is returned if the channel ch keyboard has been disconnected. KBD_ERR_BAD_POINTER is returned if keyEvent is not a valid pointer. |
Synchronous API to get key events. Returns key event data from an internal key queue maintained within the KBD library. Key event data are written to the structure pointed to by keyEvent.
If the key HID value is KBD_HID_NONE, no key was pressed since the previous call to this function. If the HID value is KBD_HID_OVERFLOW, the queue has overflowed.
Each keyboard channel has its own key queue.
For more details about the key event structure, refer to KBDKeyEvent.
Keyboard Functions, KBDSetKeyCallback, KBDKeyEvent
2007/03/27 Initial version.