1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 9<title>KBD Constants, Enumerations, and Types</title> 10</head> 11 12<body> 13 14<h1>KBD Constants, Enumerations, and Types</h1> 15 16<H2>Description</H2> 17 18<h3>Constants</h3> 19<TABLE class="arguments" border="1" > 20<tr bgcolor="#c0c0c0"><td>Constant Name</td><td>Description</td></tr> 21<TR><th>KBD_HID_NONE</th> 22<td>When the key queue is empty, <code>KBDHIDCode</code> is returned by <a href="KBDGetKey.html"><code>KBDGetKey</code></a>.</td></tr> 23<tr><th>KBD_HID_OVERFLOW</th> 24<td>When the key queue has overflowed, <code>KBDHIDCode</code> is returned by <a href="KBDGetKey.html"><code>KBDGetKey</code></a>.</td></tr> 25<tr><th>KBD_MAX_CHANNELS</th> 26<td>The maximum number of keyboards that may be connected simultaneously (4).</td></tr> 27<tr><th>KBD_NUM_COUNTRY_CODES</th> 28<td>The number of different country maps supported.</td></tr> 29</TABLE> 30 31<h4>Enumerations</h3> 32<TABLE class="arguments" border="1" > 33<tr bgcolor="#c0c0c0"><td>Enumerator Name</td><td>Description</td></tr> 34<tr><th>KBDChanStatus</th> 35<td>Bit vector that indicates channel status (returned by <a href="KBDGetChannelStatus.html"><code>KBDGetChannelStatus</code></a>). 36</td></tr> 37<tr><th>KBDCountryCode</th> 38<td>Country code values used by <a href="KBDGetCountry.html"><code>KBDGetCountry</code></a> and <a href="KBDSetCountry.html"><code>KBDSetCountry<code></a>.</td></tr> 39<tr><th>KBDEc</th> 40<td>Error code returned by most KBD APIs.</td></tr> 41<tr><th>KBDKeyMode</th> 42<td>Bit vector that indicates the type of a key press in a <a href="KBDKeyEvent.html"><code>KBDKeyEvent</code></a>.</td></tr> 43<tr><th>KBDModState</th> 44<td>Bit vector indicating modifier key status.<br>To combine states, values may be OR'ed together.<br>Used by <a href="KBDTranslateHidCode.html"><code>KBDTranslateHidCode</code></a>, <a href="KBDGetModState.html"><code>KBDGetModState</code></a>, and <a href="KBDSetModState.html"><code>KBDSetModState</code></a>.</td></tr> 45</table> 46 47<br> 48 49<TABLE class="arguments" border="1" > 50<tr bgcolor="#c0c0c0"><td>Enumerator Name</td><td>Values</td><td>Description</td></tr> 51 52<tr><th rowspan="4">KBDChanStatus</th> 53<td><code>KBD_CS_OK</code></td><td>Keyboard is connected and working fine.</td></tr> 54<tr><td><code>KBD_CS_DISCONNECTED</code></td><td>Keyboard is not connected.</td></tr> 55<tr><td><code>KBD_CS_ROLL_OVER</code></td><td>Keyboard has too many keys pressed down.</td></tr> 56<tr><td><code>KBD_CS_ERROR</code></td><td><br> Keyboard has failed power-on self-test or other undefined failure.</td></tr> 57 58<tr><th>KBDCountryCode</th> 59<td>( Refer to <code>kbd.h</code>.)</td><td>Country code values used by <a href="KBDGetCountry.html"><code>KBDGetCountry</code></a> and <a href="KBDSetCountry.html"><code>KBDSetCountry<code></a>.</td></tr> 60 61<tr><th rowspan="8">KBDEc</th> 62<td><code>KBD_SUCCESS</code></td><td>Successful call.</td></tr> 63<tr><td><code>KBD_ERR_OTHER</code></td><td>Undefined error.</td></tr> 64<tr><td><code>KBD_ERR_NOT_INITIALIZED</code></td><td>KBD library was not initialized.</td></tr> 65<tr><td><code>KBD_ERR_ALREADY_INITIALIZED</code></td><td>KBD library was already initialized.</td></tr> 66<tr><td><code>KBD_ERR_BAD_VALUE</code></td><td>Input value was out of range.</td></tr> 67<tr><td><code>KBD_ERR_BAD_STATUS</code></td><td>Keyboard was disconnected, or other error condition.</td></tr> 68<tr><td><code>KBD_ERR_BAD_POINTER</code></td><td>Given pointer was invalid.</td></tr> 69<tr><td><code>KBD_ERR_BUSY</code></td><td>LED command is BUSY and could not be sent.</td></tr> 70 71<tr><th rowspan="3">KBDKeyMode</th> 72<td><code>KBD_KM_NULL</code></td><td>No flags set.</td></tr> 73<tr><td><code>KBD_KM_DOWN</code></td><td>On = key down event; off = key up event.</td></tr> 74<tr><td><code>KBD_KM_REPEAT</code></td><td>On = repeated key; off = initial key press.</td></tr> 75 76<tr><th rowspan="14">KBDModState</th> 77<td><code>KBD_MS_NULL</code></td><td>Indicates that all modifiers are off.</td></tr> 78<tr><td><code>KBD_MS_SHIFT</code></td><td>Set by the <code>KBK_Shift</code> function.</td></tr> 79<tr><td><code>KBD_MS_CAPS_LOCK</code></td><td>Set by the <code>KBK_Caps_Lock</code> function.</td></tr> 80<tr><td><code>KBD_MS_NUM_LOCK</code></td><td>Set by the <code>KBK_Num_Lock</code> function.</td></tr> 81<tr><td><code>KBD_MS_CTRL</code></td><td>Set by the <code>KBK_Ctrl</code> function.</td></tr> 82<tr><td><code>KBD_MS_ALTGR</code></td><td>Set by the <code>KBK_AltGr</code> function.</td></tr> 83<tr><td><code>KBD_MS_LANG1</code></td><td>Set by the <code>KBK_Lang_Toggle</code> function, as appropriate.</td></tr> 84<tr><td><code>KBD_MS_LANG2</code></td><td>Set by the <code>KBK_Lang_Toggle</code> function, as appropriate.</td></tr> 85<tr><td><code>KBD_MS_ALT</code></td><td>Set by the <code>KBK_Alt</code> function.</td></tr> 86<tr><td><code>KBD_MS_GUI</code></td><td>Set by the <code>KBK_GUI</code> function.</td></tr> 87<tr><td><code>KBD_MS_EXTRA</code></td><td>Set by the <code>KBK_Extra</code> function.</td></tr> 88<tr><td><code>KBD_MS_SCROLL_LOCK</code></td><td>Set by the <code>KBK_Scroll_Lock</code> function.</td></tr> 89<tr><td><code>KBD_MS_SHIFTED_KEY</code></td><td>Application-set state. Affects the operation of the <a href="KBDTranslateHidCode.html"><code>KBDTranslateHidCode</code></a> function.</td></tr> 90<tr><td><code>KBD_MS_SET_ALL</code></td><td>Application-set state. Affects operation of the <code><a href="KBDSetModState.html">KBDSetModState</code></a> function.</td></tr> 91 92</table> 93 94<h3>Types</h3> 95<TABLE class="arguments" border="1" > 96<tr bgcolor="#c0c0c0"><td>Type Name</td><td>Description</td></tr> 97<tr><th>KBDChannel</th> 98<td>Used to indicate desired keyboard channel. The valid range is from 0 to <code>KBD_MAX_CHANNELS-1</code>.</td></tr> 99<tr><th>KBDDevCallbackF</th> 100<td>Describes the prototype for the device event callback function. Used by the <a href="KBDSetAttachCallback.html"><CODE>KBDSetAttachCallback</CODE></a> and <a href="KBDSetDetachCallback.html"><CODE>KBDSetDetachCallback</CODE></a> functions.</td></tr> 101<tr><th>KBDKeyCallbackF</th> 102<td>Describes the prototype for the key callback function. Used by the <a href="KBDSetKeyCallback.html"><CODE>KBDSetKeyCallback</CODE></a> function.</td></tr> 103<tr><th>KBDHIDCode</th> 104<td>8-bit value that indicates the USB HID code for a key. For possible values, refer to <code>kbd_hid_codes.h</code>.</td></tr> 105<tr><th>KBDUnicode</th> 106<td>16-bit value that indicates the Unicode value for a key. This may be a private code. For details, see <a href="intro.html#KBDUnicode">Introduction</a>.</td></tr> 107</table> 108 109<h2>See Also</h2> 110<P class="reference"> 111<a href="list.html">Keyboard API Function List</a> 112</p> 113 114<H2>Revision History</H2> 115<p> 1162007/03/20 Initial version.<br> 117</p> 118 119<hr><p>CONFIDENTIAL</p></body> 120</HTML>