KBD Constants, Enumerations, and Types

Description

Constants

Constant NameDescription
KBD_HID_NONEKBDHIDCode returned by KBDGetKey when the key queue is empty.
KBD_HID_OVERFLOWKBDHIDCode returned by KBDGetKey when the key queue has overflowed.
KBD_MAX_CHANNELSThe maximum number of keyboards that may be connected simultaneously (4).
KBD_NUM_COUNTRY_CODESThe number of different country maps supported.

Enumerations

Enumerator NameDescription
KBDChanStatus Bit-vector indicating 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 indicating type of key press in a KBDKeyEvent.
KBDModState Bit vector indicating modifier key status.
Values may be or-ed together to combine states.
Used by KBDTranslateHidCode, KBDGetModState, and KBDSetModState.

Enumerator NameValuesDescription
KBDChanStatus KBD_CS_OK
KBD_CS_DISCONNECTED
KBD_CS_ROLL_OVER
KBD_CS_ERROR
The keyboard is connected and operating normally.
The keyboard is not connected.
Keyboard 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_SUCCESS
KBD_ERR_OTHER
KBD_ERR_NOT_INITIALIZED
KBD_ERR_ALREADY_INITIALIZED
KBD_ERR_BAD_VALUE
KBD_ERR_BAD_STATUS
KBD_ERR_BAD_POINTER
KBD_ERR_BUSY
Successful call.
Undefined failure.
KBD library was not initialized.
KBD library was already initialized.
Input value was out of range.
Keyboard was disconnected or other error condition.
The given pointer is invalid.
The LED command cannot be sent due to BUSY.
KBDKeyMode KBD_KM_NULL
KBD_KM_DOWN
KBD_KM_REPEAT
No flags set.
On = key down event; off = key up event.
On = repeated key; off = initial key press.
KBDModState KBD_MS_NULL
KBD_MS_SHIFT
KBD_MS_CAPS_LOCK
KBD_MS_NUM_LOCK
KBD_MS_CTRL
KBD_MS_ALTGR
KBD_MS_LANG1
KBD_MS_LANG2
KBD_MS_ALT
KBD_MS_GUI
KBD_MS_EXTRA
KBD_MS_SCROLL_LOCK
KBD_MS_SHIFTED_KEY
KBD_MS_SET_ALL
Indicates that all modifiers are off.
Set by KBK_Shift.
Set by KBK_Caps_Lock.
Set by KBK_Num_Lock.
Set by KBK_Ctrl.
Set by KBK_AltGr.
Set by KBK_Lang_Toggle, if appropriate.
Set by KBK_Lang_Toggle, if appropriate.
Set by KBK_Alt.
Set by KBK_GUI.
Set by KBK_Extra.
Set by KBK_Scroll_Lock.
Application-set state. Affects operation of KBDTranslateHidCode.
Application-set state. Affects operation of the KBDSetModState function.

Types

Type NameDescription
KBDChannelUsed to indicate desired keyboard channel. Valid range is 0 ... KBD_MAX_CHANNELS-1.
KBDDevCallbackFDescribes the prototype for the device event callback function. Used by KBDSetAttachCallback and KBDSetDetachCallback.
KBDKeyCallbackFDescribes the prototype for the key callback function. Used by KBDSetKeyCallback.
KBDHIDCode8-bit value indicating the USB HID code for a key. Refer to kbd_hid_codes.h for possible values.
KBDUnicode16-bit value indicating the Unicode value for a key. This may be a private code. For further details, see Introduction.

See Also

Keyboard API Function List

Revision History

2007/03/20 Initial version.