#include <cafe/kpr.h>

typedef enum _KPRMode
    KPR_MODE_NONE               = 0x00,
    KPR_MODE_ALT_KEYPAD         = 0x01,
    KPR_MODE_DEADKEY            = 0x02,
} KPRMode;


KPR_MODE_NONE No processing is performed. Characters that are input are immediately available for output.
KPR_MODE_ALT_KEYPAD Processes keystrokes that use ALT and number keys on the numeric keypad. When such keys are pressed on the keyboard, the private Unicode values KBK_Keypad_0 - KBK_Keypad_9 (from the KBD library) should be entered into the queue. When the ALT key is released, a Null (0) should be entered into the queue. The entered key strokes will then be converted into a single character based upon the value entered. If the first key of the sequence was KBK_Keypad_0, then a lookup table based on DOS Code Page 1252 is used for codes 128-255. Otherwise, a lookup table based on DOS Code Page 437 will be used. Values beyond 255 wrap around. Values beyond 2^30 become ASCII 32 (space). This mode may be used simultaneously with other modes.
KPR_MODE_DEADKEY Processes any dead-key characters (combining accent characters). When such a character is entered into the queue (UTF-16 characters in the 0x0300 range), the character is held until the next character is entered. The sequence is either combined into a single character, or else the combining accent is converted into a spacing accent and output along with the second character. If the second character was also a combining accent, it is also converted into its spacing version. This mode is mutually exclusive with the modes below.
Converts Roman letters, a-z, into UTF-16 Hiragana or Katakana. Characters will be held in the queue until they either combine or else it is determined that they cannot combine. Inserting non-letters will flush out any non-combined consonants. Input letters should be lower case only. These modes are mutually exclusive with KPR_MODE_DEADKEY.


This type defines the possible processing modes for a queue.

See Also


Revision History

2013/05/08 Automated cleanup pass.