#include <cafe/kbd.h> KBDEc KBDGetKey(KBDChannel ch, KBDKeyEvent *keyEvent);
|ch||Keyboard channel to query.|
|keyEvent||Pointer to the
|KBDEc||Keyboard error code.
Synchronous API to get key events. Returns key event data from an internal key queue maintained within the KBD library. The 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 information about the key event structure, refer to
|Background||Do not call this function from the background.|
|Multiple threads||This function, while thread-safe, is designed to be called from only a single thread.|
2013-05-08 Automated cleanup pass.
2013-01-13 Removed KBD_ERR_BAD_POINTER.
2011-12-21 Moved to Cafe.
2007-03-27 Initial version.