#
# ConvertTo*
#

SET_CONFIG	preedit_method	ROMAN
SWITCH_COMPOSITION_MODE	HALF_ASCII
SET_CONFIG	session_keymap	MSIME
SEND_KEY	ON

# keymap

# ConvertToFullKatakana
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	CTRL i
EXPECT_PREEDIT	ピャ
SEND_KEYS	pya
EXPECT_PREEDIT	pya

# ConvertToHalfWidth
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	CTRL o
EXPECT_PREEDIT	pya
SEND_KEYS	pya
EXPECT_PREEDIT	pya

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

# ConvertToHalfAlphanumeric
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	CTRL t
EXPECT_PREEDIT	pya
SEND_KEYS	pya
EXPECT_PREEDIT	pya

# ConvertToHiragana
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	CTRL u
EXPECT_PREEDIT	ぴゃ
SEND_KEYS	pya
EXPECT_PREEDIT	pya

# ConvertToHalfAlphanumeric
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	F10
EXPECT_PREEDIT	pya
SEND_KEYS	pya
EXPECT_PREEDIT	pya

# ConvertToHiragana
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	F6
EXPECT_PREEDIT	ぴゃ
SEND_KEYS	pya
EXPECT_PREEDIT	pya

# ConvertToFullKatakana
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	F7
EXPECT_PREEDIT	ピャ
SEND_KEYS	pya
EXPECT_PREEDIT	pya

# ConvertToHalfWidth
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	F8
EXPECT_PREEDIT	pya
SEND_KEYS	pya
EXPECT_PREEDIT	pya

# ConvertToFullAlphanumeric
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	F9
EXPECT_PREEDIT	ｐｙａ
SEND_KEYS	pya
EXPECT_PREEDIT	pya

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

# behavior

# half-width→カナ→かな
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	F8
EXPECT_PREEDIT	pya
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	pya
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	pya
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	pya
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	pya
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	pya
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_COMPOSITION_MODE	HALF_ASCII
SET_CONFIG	session_keymap	KOTOERI
SEND_KEY	ON

# keymap

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

# DisplayAsHalfAlphanumeric
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	CTRL :
EXPECT_PREEDIT	pya
SEND_KEYS	pya
EXPECT_PREEDIT	pyapya

# DisplayAsHalfAlphanumeric
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	CTRL '
EXPECT_PREEDIT	pya
SEND_KEYS	pya
EXPECT_PREEDIT	pyapya

# DisplayAsHiragana
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	CTRL j
EXPECT_PREEDIT	ぴゃ
SEND_KEYS	pya
EXPECT_PREEDIT	ぴゃpya

# DisplayFullKatakana
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	CTRL k
EXPECT_PREEDIT	ピャ
SEND_KEYS	pya
EXPECT_PREEDIT	ピャpya

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

# DisplayAsHiragana
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	F6
EXPECT_PREEDIT	ぴゃ
SEND_KEYS	pya
EXPECT_PREEDIT	ぴゃpya

# DisplayFullKatakana
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	F7
EXPECT_PREEDIT	ピャ
SEND_KEYS	pya
EXPECT_PREEDIT	ピャpya

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

# DisplayAsFullAlphanumeric
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	F9
EXPECT_PREEDIT	ｐｙａ
SEND_KEYS	pya
EXPECT_PREEDIT	ｐｙａpya

# DisplayAsHalfAlphanumeric
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	F10
EXPECT_PREEDIT	pya
SEND_KEYS	pya
EXPECT_PREEDIT	pyapya

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

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

# DisplayAsHiragana
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	OPTION F1
EXPECT_PREEDIT	ぴゃ
SEND_KEYS	pya
EXPECT_PREEDIT	ぴゃpya

# DisplayFullKatakana
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	OPTION F2
EXPECT_PREEDIT	ピャ
SEND_KEYS	pya
EXPECT_PREEDIT	ピャpya

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

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

# DisplayAsHalfAlphanumeric
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	OPTION F5
EXPECT_PREEDIT	pya
SEND_KEYS	pya
EXPECT_PREEDIT	pyapya

# DisplayAsHalfAlphanumeric
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	OPTION s
EXPECT_PREEDIT	pya
SEND_KEYS	pya
EXPECT_PREEDIT	pyapya

# DisplayFullKatakana
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	OPTION x
EXPECT_PREEDIT	ピャ
SEND_KEYS	pya
EXPECT_PREEDIT	ピャpya

# DisplayAsHiragana
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	OPTION z
EXPECT_PREEDIT	ぴゃ
SEND_KEYS	pya
EXPECT_PREEDIT	ぴゃpya

# behavior

# ｶﾅ→カナ→かな
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
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	pya
SEND_KEY	F9
EXPECT_PREEDIT	ｐｙａ
SEND_KEY	F9
EXPECT_PREEDIT	ｐｙａ

# Half width ASCII
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	F10
EXPECT_PREEDIT	pya
SEND_KEY	F10
EXPECT_PREEDIT	pya

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

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

RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	F9
EXPECT_PREEDIT	ｐｙａ
SEND_KEY	F8
EXPECT_PREEDIT	pya
SEND_KEY	F8
EXPECT_PREEDIT	pya

RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	pya
SEND_KEY	F10
EXPECT_PREEDIT	pya
SEND_KEY	F8
EXPECT_PREEDIT	pya
SEND_KEY	F8
EXPECT_PREEDIT	pya
