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>KPRGetChar</title> 10</head> 11 12<body> 13 14<h1>KPRGetChar</h1> 15 16<h2>C Specification</h2> 17 18<dl> 19<dd><pre><code>#include <revolution/kpr.h></code></pre> 20 </dd> 21<dd><pre>wchar_t KPRGetChar(KPRQueue *queue);</pre> 22 </dd> 23</dl> 24 25<h2>Arguments</h2> 26 27<TABLE border="1" cellpadding="3" cellspacing="0.1"> 28<tr> 29<TD width="120" bgcolor="#ffffe8"><code><em><strong><STRONG><EM><CODE>queue</CODE></EM></STRONG></strong></em></code></TD> 30<TD width="520">Pointer to a queue to retrieve processed character from.</TD> 31</tr> 32</TABLE> 33 34<h2>Return Values</h2> 35 36<TABLE border="1" cellpadding="3" cellspacing="0.1"> 37<tr> 38<TD width="120" bgcolor="#ffffe8"><code><em><strong>wchar_t</strong></em></code></TD> 39<TD width="520">Character retrieved from head of queue. 40</TD> 41</tr> 42</TABLE> 43 44<h2>Description</h2> 45 46<p>This function retrieves a processed character from the head of a keyboard processing queue.</p> 47<p>Characters should be entered into the appropriate queue as they are generated by the keyboard. Immediately after entering the character in the queue, the application should try to get the processed characters from the queue. The application should try to remove characters in a loop, since one input may generate multiple outputs. An output of 0 indicates that the queue is empty.</p> 48<p>It is an application error to add characters to a queue and not try to remove them immediately afterwards. The queue is not designed to hold more characters than can be processed at once. Overflowing the queue will result in a fatal error.</p> 49<p>In order to support Alt+keypad keys, the private Unicode values KBK_Keypad_0 through KBK_Keypad_9 are placed in a queue whenever the Alt key is pressed while Num Lock is active and the keys 0-9 on the keypad are entered. In order to generate output when the Alt key is released, the value 0 should be entered into the queue.</p> 50 51<h2>See Also</h2> 52 53<p><a href="list.html">Key Processing Functions</a>, <a href="KPRPutChar.html"><code>KPRPutChar</code></a> 54</p> 55 56<H2>Revision History</H2> 57<P>2007/07/09 Initial version.</P> 58 59</BODY> 60</HTML>