KPRGetChar

C Specification

#include <revolution/kpr.h>
wchar_t KPRGetChar(KPRQueue *queue);

Arguments

queue Pointer to a queue to retrieve processed character from.

Return Values

wchar_t Character retrieved from head of queue.

Description

This function retrieves a processed character from the head of a keyboard processing queue.

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.

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.

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.

See Also

Key Processing Functions, KPRPutChar

Revision History

2007/07/09 Initial version.