#include <revolution/kpr.h>
typedef enum _KPRMode
{
KPR_MODE_NONE = 0x00,
KPR_MODE_ALT_KEYPAD = 0x01,
KPR_MODE_DEADKEY = 0x02,
KPR_MODE_JP_ROMAJI_HIRAGANA = 0x04,
KPR_MODE_JP_ROMAJI_KATAKANA = 0x08
} KPRMode;
This type defines the possible processing modes for a queue.
KPR_MODE_NONE - no processing is done. 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 these keys are pressed on the keyboard, dedicated Unicode values KBK_Keypad_0 through 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 will be used for codes 128-255. Otherwise, a lookup table based on DOS Code Page 437 will be used. Values beyond 255 will wrap around. Values beyond 2^30 will 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.
KPR_MODE_JP_ROMAJI_HIRAGANA, KPR_MODE_JP_ROMAJI_KATAKANA - Converts characters from 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.
Key Processing Functions, KPRSetMode, KPRGetMode
2007/07/09 Initial version.
CONFIDENTIAL