KBD Constants, Enumerators, and Types


Constant NameDescription
KBD_HID_NONE When the key queue is empty, KBDHIDCode is returned by KBDGetKey.
KBD_HID_OVERFLOW When the key queue has overflowed, KBDHIDCode is returned by KBDGetKey.
KBD_MAX_CHANNELS The maximum number of keyboards that may be connected simultaneously (4).
KBD_NUM_COUNTRY_CODES The number of different country maps supported.


Enumerator NameDescription
KBDChanStatus Bit vector that indicates channel status (returned by KBDGetChannelStatus).
KBDCountryCode Country code values used by KBDGetCountry and KBDSetCountry.
KBDEc Error code returned by most KBD APIs.
KBDKeyMode Bit vector that indicates the type of a key press in a KBDKeyEvent.
KBDModState Bit vector indicating modifier key status.
To combine states, values may be OR'ed together.
Used by KBDTranslateHidCode, KBDGetModState, and KBDSetModState.

Enumerator NameValuesDescription
KBDChanStatus KBD_CS_OKKeyboard is connected and working fine.
KBD_CS_DISCONNECTEDKeyboard is not connected.
KBD_CS_ROLL_OVERKeyboard has too many keys pressed down.
Keyboard has failed power-on self-test or other undefined failure.
KBDCountryCode ( Refer to kbd.h.)Country code values used by KBDGetCountry and KBDSetCountry.
KBDEc KBD_SUCCESSSuccessful call.
KBD_ERR_OTHER Undefined error.
KBD_ERR_NOT_INITIALIZED KBD library was not initialized.
KBD_ERR_ALREADY_INITIALIZED KBD library was already initialized.
KBD_ERR_BAD_VALUE Input value was out of range.
KBD_ERR_BAD_STATUS Keyboard was disconnected, or other error condition.
KBD_ERR_BUSY LED command is BUSY and could not be sent.
KBDKeyMode KBD_KM_NULL No flags set.
KBD_KM_DOWNOn = key down event; off = key up event.
KBD_KM_REPEATOn = repeated key; off = initial key press.
KBDModState KBD_MS_NULLIndicates that all modifiers are off.
KBD_MS_SHIFTSet by the KBK_Shift function.
KBD_MS_CAPS_LOCKSet by the KBK_Caps_Lock function.
KBD_MS_NUM_LOCKSet by the KBK_Num_Lock function.
KBD_MS_CTRLSet by the KBK_Ctrl function.
KBD_MS_ALTGRSet by the KBK_AltGr function.
KBD_MS_LANG1Set by the KBK_Lang_Toggle function, as appropriate.
KBD_MS_LANG2Set by the KBK_Lang_Toggle function, as appropriate.
KBD_MS_ALTSet by the KBK_Alt function.
KBD_MS_GUISet by the KBK_GUI function.
KBD_MS_EXTRASet by the KBK_Extra function.
KBD_MS_SCROLL_LOCKSet by the KBK_Scroll_Lock function.
KBD_MS_SHIFTED_KEYApplication-set state. Affects the operation of the KBDTranslateHidCode function.
KBD_MS_SET_ALLApplication-set state. Affects operation of the KBDSetModState function.


Type NameDescription
KBDChannel Used to indicate desired keyboard channel. The valid range is from 0 to KBD_MAX_CHANNELS-1.
KBDDevCallbackF Describes the prototype for the device event callback function. Used by the KBDSetAttachCallback and KBDSetDetachCallback functions.
KBDKeyCallbackF Describes the prototype for the key callback function. Used by the KBDSetKeyCallback function.
KBDLedCallbackF Describes the prototype for the LED callback function. Used by the KBDSetLedsAsync function.
KBDHIDCode 8-bit value that indicates the USB HID code for a key. For possible values, refer to kbd_hid_codes.h.
KBDUnicode 16-bit value that indicates the Unicode value for a key. This may be a private code. For more information, see KBD Library Overview : KBDUnicode Values.

See Also

Keyboard API Function List

Revision History

2013/05/08 Automated cleanup pass.
2013/01/13 Removed KBD_ERR_BAD_POINTER.
2011/12/21 Moved to Cafe.
2007/03/20 Initial version.