#
# InputMode
#

SET_CONFIG	preedit_method	ROMAN
SET_CONFIG	session_keymap	MSIME
SEND_KEY	ON

# From HIRAGANA

# InputModeHiragana
RESET_CONTEXT
SWITCH_INPUT_MODE	HIRAGANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	HIRAGANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	ENTER
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ

# InputModeFullKatakana
RESET_CONTEXT
SWITCH_INPUT_MODE	HIRAGANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	KATAKANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ
SEND_KEY	ENTER
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ

# InputModeSwitchKanaType
# Hiragana -> Full Katakana -> Half Katakana -> Hiragana
RESET_CONTEXT
SWITCH_INPUT_MODE	HIRAGANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	MUHENKAN
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	MUHENKAN
SEND_KEYS	hoge
EXPECT_PREEDIT	ﾎｹﾞ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	MUHENKAN
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	ENTER
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ

RESET_CONTEXT
SWITCH_INPUT_MODE	HIRAGANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	MUHENKAN
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	MUHENKAN
SEND_KEYS	hoge
EXPECT_PREEDIT	ﾎｹﾞ
SEND_KEY	ENTER
SEND_KEYS	hoge
EXPECT_PREEDIT	ﾎｹﾞ

# ToggleAlphanumericMode
RESET_CONTEXT
SWITCH_INPUT_MODE	HIRAGANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	EISU
SEND_KEYS	hoge
EXPECT_PREEDIT	hoge
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	EISU
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	ENTER
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ

RESET_CONTEXT
SWITCH_INPUT_MODE	HIRAGANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	SHIFT MUHENKAN
SEND_KEYS	hoge
EXPECT_PREEDIT	hoge
SEND_KEY	ENTER
SEND_KEYS	hoge
EXPECT_PREEDIT	hoge

# SWITCH_KANA_TYPE
# Full Katakana -> Half Katakana -> Hiragana
RESET_CONTEXT
SWITCH_INPUT_MODE	HIRAGANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	MUHENKAN
EXPECT_PREEDIT	ホゲ
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ

RESET_CONTEXT
SWITCH_INPUT_MODE	HIRAGANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
EXPECT_PREEDIT	ﾎｹﾞ
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ

RESET_CONTEXT
SWITCH_INPUT_MODE	HIRAGANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
EXPECT_PREEDIT	ほげ
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ

RESET_CONTEXT
SWITCH_INPUT_MODE	HIRAGANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
EXPECT_PREEDIT	ホゲ
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ


# From FULL_ASCII

# InputModeHiragana
RESET_CONTEXT
SWITCH_INPUT_MODE	FULL_ASCII
SEND_KEYS	hoge
EXPECT_PREEDIT	ｈｏｇｅ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	HIRAGANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	ENTER
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ

# InputModeFullKatakana
RESET_CONTEXT
SWITCH_INPUT_MODE	FULL_ASCII
SEND_KEYS	hoge
EXPECT_PREEDIT	ｈｏｇｅ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	KATAKANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ
SEND_KEY	ENTER
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ

# InputModeSwitchKanaType
# Full Ascii -> Full Ascii (No change)
RESET_CONTEXT
SWITCH_INPUT_MODE	FULL_ASCII
SEND_KEYS	hoge
EXPECT_PREEDIT	ｈｏｇｅ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	MUHENKAN
SEND_KEYS	hoge
EXPECT_PREEDIT	ｈｏｇｅ
SEND_KEY	ENTER
SEND_KEYS	hoge
EXPECT_PREEDIT	ｈｏｇｅ

# ToggleAlphanumericMode
# Full Ascii -> Hiragana -> Half Ascii -> Hiragana -> ...
RESET_CONTEXT
SWITCH_INPUT_MODE	FULL_ASCII
SEND_KEYS	hoge
EXPECT_PREEDIT	ｈｏｇｅ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	EISU
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	EISU
SEND_KEYS	hoge
EXPECT_PREEDIT	hoge
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	EISU
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	ENTER
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ

# SWITCH_KANA_TYPE
# Full Katakana -> Half Katakana -> Hiragana
RESET_CONTEXT
SWITCH_INPUT_MODE	FULL_ASCII
SEND_KEYS	hoge
EXPECT_PREEDIT	ｈｏｇｅ
SEND_KEY	MUHENKAN
EXPECT_PREEDIT	ホゲ
SEND_KEYS	hoge
EXPECT_PREEDIT	ｈｏｇｅ

RESET_CONTEXT
SWITCH_INPUT_MODE	FULL_ASCII
SEND_KEYS	hoge
EXPECT_PREEDIT	ｈｏｇｅ
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
EXPECT_PREEDIT	ﾎｹﾞ
SEND_KEYS	hoge
EXPECT_PREEDIT	ｈｏｇｅ

RESET_CONTEXT
SWITCH_INPUT_MODE	FULL_ASCII
SEND_KEYS	hoge
EXPECT_PREEDIT	ｈｏｇｅ
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
EXPECT_PREEDIT	ほげ
SEND_KEYS	hoge
EXPECT_PREEDIT	ｈｏｇｅ

RESET_CONTEXT
SWITCH_INPUT_MODE	FULL_ASCII
SEND_KEYS	hoge
EXPECT_PREEDIT	ｈｏｇｅ
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
EXPECT_PREEDIT	ホゲ
SEND_KEYS	hoge
EXPECT_PREEDIT	ｈｏｇｅ


# From FULL_KATAKANA

# InputModeHiragana
RESET_CONTEXT
SWITCH_INPUT_MODE	FULL_KATAKANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	HIRAGANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	ENTER
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ

# InputModeFullKatakana
RESET_CONTEXT
SWITCH_INPUT_MODE	FULL_KATAKANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	KATAKANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ
SEND_KEY	ENTER
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ

# InputModeSwitchKanaType
# Full Katakana -> Half Katakana -> Hiragana
RESET_CONTEXT
SWITCH_INPUT_MODE	FULL_KATAKANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	MUHENKAN
SEND_KEYS	hoge
EXPECT_PREEDIT	ﾎｹﾞ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	MUHENKAN
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	ENTER
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ

# ToggleAlphanumericMode
# Full Katakana -> Hiragana -> Half Ascii -> Hiragana -> Half Ascii -> ...
RESET_CONTEXT
SWITCH_INPUT_MODE	FULL_KATAKANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	EISU
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	EISU
SEND_KEYS	hoge
EXPECT_PREEDIT	hoge
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	EISU
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	ENTER
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ

# SWITCH_KANA_TYPE
# Full Katakana -> Half Katakana -> Hiragana
RESET_CONTEXT
SWITCH_INPUT_MODE	FULL_KATAKANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ
SEND_KEY	MUHENKAN
EXPECT_PREEDIT	ホゲ
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ

RESET_CONTEXT
SWITCH_INPUT_MODE	FULL_KATAKANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
EXPECT_PREEDIT	ﾎｹﾞ
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ

RESET_CONTEXT
SWITCH_INPUT_MODE	FULL_KATAKANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
EXPECT_PREEDIT	ほげ
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ

RESET_CONTEXT
SWITCH_INPUT_MODE	FULL_KATAKANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
EXPECT_PREEDIT	ホゲ
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ


# From HALF_ASCII

# InputModeHiragana
RESET_CONTEXT
SWITCH_INPUT_MODE	HALF_ASCII
SEND_KEYS	hoge
EXPECT_PREEDIT	hoge
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	HIRAGANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	ENTER
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ

# InputModeFullKatakana
RESET_CONTEXT
SWITCH_INPUT_MODE	HALF_ASCII
SEND_KEYS	hoge
EXPECT_PREEDIT	hoge
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	KATAKANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ
SEND_KEY	ENTER
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ

# InputModeSwitchKanaType
# Half Ascii -> Half Ascii (No change)
RESET_CONTEXT
SWITCH_INPUT_MODE	HALF_ASCII
SEND_KEYS	hoge
EXPECT_PREEDIT	hoge
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	MUHENKAN
SEND_KEYS	hoge
EXPECT_PREEDIT	hoge
SEND_KEY	ENTER
SEND_KEYS	hoge
EXPECT_PREEDIT	hoge

# ToggleAlphanumericMode
# Half Ascii -> Hiragana -> Half Ascii -> Hiragana -> ...
RESET_CONTEXT
SWITCH_INPUT_MODE	HALF_ASCII
SEND_KEYS	hoge
EXPECT_PREEDIT	hoge
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	EISU
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	EISU
SEND_KEYS	hoge
EXPECT_PREEDIT	hoge
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	EISU
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	ENTER
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ

# SWITCH_KANA_TYPE
# Full Katakana -> Half Katakana -> Hiragana
RESET_CONTEXT
SWITCH_INPUT_MODE	HALF_ASCII
SEND_KEYS	hoge
EXPECT_PREEDIT	hoge
SEND_KEY	MUHENKAN
EXPECT_PREEDIT	ホゲ
SEND_KEYS	hoge
EXPECT_PREEDIT	hoge

RESET_CONTEXT
SWITCH_INPUT_MODE	HALF_ASCII
SEND_KEYS	hoge
EXPECT_PREEDIT	hoge
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
EXPECT_PREEDIT	ﾎｹﾞ
SEND_KEYS	hoge
EXPECT_PREEDIT	hoge

RESET_CONTEXT
SWITCH_INPUT_MODE	HALF_ASCII
SEND_KEYS	hoge
EXPECT_PREEDIT	hoge
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
EXPECT_PREEDIT	ほげ
SEND_KEYS	hoge
EXPECT_PREEDIT	hoge

RESET_CONTEXT
SWITCH_INPUT_MODE	HALF_ASCII
SEND_KEYS	hoge
EXPECT_PREEDIT	hoge
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
EXPECT_PREEDIT	ホゲ
SEND_KEYS	hoge
EXPECT_PREEDIT	hoge


# From HALF_KATAKANA

# InputModeHiragana
RESET_CONTEXT
SWITCH_INPUT_MODE	HALF_KATAKANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ﾎｹﾞ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	HIRAGANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	ENTER
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ

# InputModeFullKatakana
RESET_CONTEXT
SWITCH_INPUT_MODE	HALF_KATAKANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ﾎｹﾞ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	KATAKANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ
SEND_KEY	ENTER
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ

# InputModeSwitchKanaType
# Half Katakana -> Hiragana -> Full Katakana
RESET_CONTEXT
SWITCH_INPUT_MODE	HALF_KATAKANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ﾎｹﾞ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	MUHENKAN
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	MUHENKAN
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	ENTER
SEND_KEYS	hoge
EXPECT_PREEDIT	ホゲ

# ToggleAlphanumericMode
# Half Katakana -> Hiragana -> Half Ascii -> Hiragana -> Half Ascii -> ...
RESET_CONTEXT
SWITCH_INPUT_MODE	HALF_KATAKANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ﾎｹﾞ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	EISU
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	EISU
SEND_KEYS	hoge
EXPECT_PREEDIT	hoge
SEND_KEY	ESC
EXPECT_PREEDIT
SEND_KEY	EISU
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ
SEND_KEY	ENTER
SEND_KEYS	hoge
EXPECT_PREEDIT	ほげ

# SWITCH_KANA_TYPE
# Full Katakana -> Half Katakana -> Hiragana
RESET_CONTEXT
SWITCH_INPUT_MODE	HALF_KATAKANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ﾎｹﾞ
SEND_KEY	MUHENKAN
EXPECT_PREEDIT	ホゲ
SEND_KEYS	hoge
EXPECT_PREEDIT	ﾎｹﾞ

RESET_CONTEXT
SWITCH_INPUT_MODE	HALF_KATAKANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ﾎｹﾞ
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
EXPECT_PREEDIT	ﾎｹﾞ
SEND_KEYS	hoge
EXPECT_PREEDIT	ﾎｹﾞ

RESET_CONTEXT
SWITCH_INPUT_MODE	HALF_KATAKANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ﾎｹﾞ
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
EXPECT_PREEDIT	ほげ
SEND_KEYS	hoge
EXPECT_PREEDIT	ﾎｹﾞ

RESET_CONTEXT
SWITCH_INPUT_MODE	HALF_KATAKANA
SEND_KEYS	hoge
EXPECT_PREEDIT	ﾎｹﾞ
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
SEND_KEY	MUHENKAN
EXPECT_PREEDIT	ホゲ
SEND_KEYS	hoge
EXPECT_PREEDIT	ﾎｹﾞ
