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>KBDGetKey</title> 10</head> 11 12<body> 13 14<h1>KBDGetKey</h1> 15 16<h2>Syntax</h2> 17<dl><dd><pre class="construction"> 18#include <revolution/kbd.h> 19 20KBDEc KBDGetKey(KBDChannel ch, KBDKeyEvent *keyEvent); 21</pre></dd></dl> 22 23<h2>Arguments</h2> 24<TABLE class="arguments" border="1" > 25 <tr> 26<TH>ch</TH> 27<TD>Keyboard channel to query.</TD> 28 </tr> 29 <tr> 30<TH>keyEvent</TH> 31<TD>Pointer to the <a href="KBDKeyEvent.html"><code>KBDKeyEvent</code></a> structure. Stores the key event at the head of the KBD library's internal key queue.</TD> 32 </tr> 33</TABLE> 34 35<h2>Return Values</h2> 36<TABLE class="arguments" border="1" > 37 <tr> 38<TH>KBDEc</TH> 39<TD>Keyboard error code.<br><code>KBD_SUCCESS</code> if the call was successful.<br><code>KBD_ERR_NOT_INITIALIZED</code> if the library was not initialized.<br><code>KBD_ERR_BAD_VALUE</code> if <SPAN class="argument">ch</SPAN> was out of range.<br><code>KBD_ERR_BAD_STATUS</code> if the keyboard on channel <SPAN class="argument">ch</SPAN> is disconnected.<br><code>KBD_ERR_BAD_POINTER</code> if <SPAN class="argument">keyEvent</SPAN> is not a valid pointer.</TD> 40 </tr> 41</TABLE> 42 43<h2>Description</h2> 44<p>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 <SPAN class="argument">keyEvent</SPAN>.</p> 45<p>If the key HID value is <code>KBD_HID_NONE</code>, no key was pressed since the previous call to this function. If the HID value is <code>KBD_HID_OVERFLOW</code>, the queue has overflowed.</p> 46 47<p>Each keyboard channel has its own key queue. </p> 48 49<p>For more details about the key event structure, refer to <a href="KBDKeyEvent.html"><code>KBDKeyEvent</code></a>.</p> 50 51<h2>See Also</h2> 52<P class="reference"> 53<a href="list.html">Keyboard Functions</a>, 54<a href="KBDSetKeyCallback.html">KBDSetKeyCallback</a>, 55<a href="KBDKeyEvent.html">KBDKeyEvent</a> 56</p> 57 58<h2>Revision History</h2> 59<P> 602007/03/27 Initial version.<br> 61</p> 62 63<hr><p>CONFIDENTIAL</p></body> 64</HTML>