#
# ConvertTo*
#

SET_CONFIG	preedit_method	ROMAN
SWITCH_COMPOSITION_MODE	FULL_ASCII
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	pya
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	pya
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

# half-width→カナ→かな
RESET_CONTEXT
SEND_KEYS	pya
EXPECT_PREEDIT	ｐｙａ
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	ｐｙａ
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_COMPOSITION_MODE	FULL_ASCII
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
