#
# ConvertTo*
#

SET_CONFIG	preedit_method	ROMAN
SWITCH_INPUT_MODE	HALF_KATAKANA
SET_CONFIG	session_keymap	MSIME
SEND_KEY	ON

# keymap

# ConvertToFullKatakana
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	CTRL i
EXPECT_PREEDIT	ピャ
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ

# ConvertToHalfWidth
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	CTRL o
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ

# ConvertToFullAlphanumeric
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	CTRL p
EXPECT_PREEDIT	ｐｙａ
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ

# ConvertToHalfAlphanumeric
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	CTRL t
EXPECT_PREEDIT	pya
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ

# ConvertToHiragana
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	CTRL u
EXPECT_PREEDIT	ぴゃ
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ

# ConvertToHalfAlphanumeric
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F10
EXPECT_PREEDIT	pya
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ

# ConvertToHiragana
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F6
EXPECT_PREEDIT	ぴゃ
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ

# ConvertToFullKatakana
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F7
EXPECT_PREEDIT	ピャ
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ

# ConvertToHalfWidth
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F8
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ

# ConvertToFullAlphanumeric
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F9
EXPECT_PREEDIT	ｐｙａ
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ

# ConvertToFullAlphanumeric
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	SHIFT MUHENKAN
EXPECT_PREEDIT	ｐｙａ
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ

# behavior

# ｶﾅ→カナ→かな
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F8
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F7
EXPECT_PREEDIT	ピャ
SEND_KEY	F6
EXPECT_PREEDIT	ぴゃ

# Full width ASCII
# lower case -> upper case -> capitalized
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F9
EXPECT_PREEDIT	ｐｙａ
SEND_KEY	F9
EXPECT_PREEDIT	ＰＹＡ
SEND_KEY	F9
EXPECT_PREEDIT	Ｐｙａ
SEND_KEY	F9
EXPECT_PREEDIT	ｐｙａ

# Half width ASCII
# lower case -> upper case -> capitalized
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F10
EXPECT_PREEDIT	pya
SEND_KEY	F10
EXPECT_PREEDIT	PYA
SEND_KEY	F10
EXPECT_PREEDIT	Pya
SEND_KEY	F10
EXPECT_PREEDIT	pya

# Convert to half width
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F9
EXPECT_PREEDIT	ｐｙａ
SEND_KEY	F8
EXPECT_PREEDIT	pya
SEND_KEY	F8
EXPECT_PREEDIT	PYA
SEND_KEY	F8
EXPECT_PREEDIT	Pya
SEND_KEY	F8
EXPECT_PREEDIT	pya

RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F9
SEND_KEY	F9
EXPECT_PREEDIT	ＰＹＡ
SEND_KEY	F8
EXPECT_PREEDIT	PYA
SEND_KEY	F8
EXPECT_PREEDIT	Pya
SEND_KEY	F8
EXPECT_PREEDIT	pya
SEND_KEY	F8
EXPECT_PREEDIT	PYA

RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F9
SEND_KEY	F9
SEND_KEY	F9
EXPECT_PREEDIT	Ｐｙａ
SEND_KEY	F8
EXPECT_PREEDIT	Pya
SEND_KEY	F8
EXPECT_PREEDIT	pya
SEND_KEY	F8
EXPECT_PREEDIT	PYA
SEND_KEY	F8
EXPECT_PREEDIT	Pya

#
# DisplayAs*
#

SET_CONFIG	preedit_method	ROMAN
SWITCH_INPUT_MODE	HALF_KATAKANA
SET_CONFIG	session_keymap	KOTOERI
SEND_KEY	ON

# keymap

# DisplayAsHalfWidth
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	CTRL ;
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬﾋﾟｬ

# DisplayAsHalfAlphanumeric
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	CTRL :
EXPECT_PREEDIT	pya
SEND_KEYS	pya
EXPECT_PREEDIT	pyaﾋﾟｬ

# DisplayAsHalfAlphanumeric
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	CTRL '
EXPECT_PREEDIT	pya
SEND_KEYS	pya
EXPECT_PREEDIT	pyaﾋﾟｬ

# DisplayAsHiragana
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	CTRL j
EXPECT_PREEDIT	ぴゃ
SEND_KEYS	pya
EXPECT_PREEDIT	ぴゃﾋﾟｬ

# DisplayFullKatakana
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	CTRL k
EXPECT_PREEDIT	ピャ
SEND_KEYS	pya
EXPECT_PREEDIT	ピャﾋﾟｬ

# DisplayAsFullAlphanumeric
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	CTRL l
EXPECT_PREEDIT	ｐｙａ
SEND_KEYS	pya
EXPECT_PREEDIT	ｐｙａﾋﾟｬ

# DisplayAsHiragana
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F6
EXPECT_PREEDIT	ぴゃ
SEND_KEYS	pya
EXPECT_PREEDIT	ぴゃﾋﾟｬ

# DisplayFullKatakana
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F7
EXPECT_PREEDIT	ピャ
SEND_KEYS	pya
EXPECT_PREEDIT	ピャﾋﾟｬ

# DisplayAsHalfWidth
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F8
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬﾋﾟｬ

# DisplayAsFullAlphanumeric
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F9
EXPECT_PREEDIT	ｐｙａ
SEND_KEYS	pya
EXPECT_PREEDIT	ｐｙａﾋﾟｬ

# DisplayAsHalfAlphanumeric
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F10
EXPECT_PREEDIT	pya
SEND_KEYS	pya
EXPECT_PREEDIT	pyaﾋﾟｬ

# DisplayAsHalfWidth
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	OPTION a
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬﾋﾟｬ

# DisplayAsFullAlphanumeric
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	OPTION c
EXPECT_PREEDIT	ｐｙａ
SEND_KEYS	pya
EXPECT_PREEDIT	ｐｙａﾋﾟｬ

# DisplayAsHiragana
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	OPTION F1
EXPECT_PREEDIT	ぴゃ
SEND_KEYS	pya
EXPECT_PREEDIT	ぴゃﾋﾟｬ

# DisplayFullKatakana
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	OPTION F2
EXPECT_PREEDIT	ピャ
SEND_KEYS	pya
EXPECT_PREEDIT	ピャﾋﾟｬ

# DisplayAsFullAlphanumeric
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	OPTION F3
EXPECT_PREEDIT	ｐｙａ
SEND_KEYS	pya
EXPECT_PREEDIT	ｐｙａﾋﾟｬ

# DisplayAsHalfWidth
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	OPTION F4
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬﾋﾟｬ

# DisplayAsHalfAlphanumeric
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	OPTION F5
EXPECT_PREEDIT	pya
SEND_KEYS	pya
EXPECT_PREEDIT	pyaﾋﾟｬ

# DisplayAsHalfAlphanumeric
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	OPTION s
EXPECT_PREEDIT	pya
SEND_KEYS	pya
EXPECT_PREEDIT	pyaﾋﾟｬ

# DisplayFullKatakana
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	OPTION x
EXPECT_PREEDIT	ピャ
SEND_KEYS	pya
EXPECT_PREEDIT	ピャﾋﾟｬ

# DisplayAsHiragana
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	OPTION z
EXPECT_PREEDIT	ぴゃ
SEND_KEYS	pya
EXPECT_PREEDIT	ぴゃﾋﾟｬ

# behavior

# ｶﾅ→カナ→かな
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F8
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F7
EXPECT_PREEDIT	ピャ
SEND_KEY	F6
EXPECT_PREEDIT	ぴゃ

# Full width ASCII
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F9
EXPECT_PREEDIT	ｐｙａ
SEND_KEY	F9
EXPECT_PREEDIT	ｐｙａ

# Half width ASCII
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F10
EXPECT_PREEDIT	pya
SEND_KEY	F10
EXPECT_PREEDIT	pya

# Translate half width
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F8
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F8
EXPECT_PREEDIT	ﾋﾟｬ

RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F7
EXPECT_PREEDIT	ピャ
SEND_KEY	F8
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F8
EXPECT_PREEDIT	ﾋﾟｬ

RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F9
EXPECT_PREEDIT	ｐｙａ
SEND_KEY	F8
EXPECT_PREEDIT	pya
SEND_KEY	F8
EXPECT_PREEDIT	pya

RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ﾋﾟｬ
SEND_KEY	F10
EXPECT_PREEDIT	pya
SEND_KEY	F8
EXPECT_PREEDIT	pya
SEND_KEY	F8
EXPECT_PREEDIT	pya
