KPRGetChar

Syntax

#include <cafe/kpr.h>

wchar_t KPRGetChar(KPRQueue *queue);

Parameters

queue Pointer to the queue from which to retrieve a processed character.

Return Values

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 remove characters using loop processing, because in some cases a single 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 immediately. Overflowing the queue will result in a fatal error.

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 0-9 keys on the keypad are entered. To generate output when the ALT key is released, the value 0 is placed into the queue.

Do Not Call From

Background Do not call this function from the background.
Callbacks Do not call this function from any callback function.
Interrupt handler Do not call this function from any interrupt handler.
Exception handler Do not call this function from any exception handler.

See Also

KPRPutChar

Revision History

2013/05/08 Automated cleanup pass.


CONFIDENTIAL