Skip to content

Latest commit

 

History

History
120 lines (62 loc) · 2.95 KB

README.md

File metadata and controls

120 lines (62 loc) · 2.95 KB

IME-Events

An example of System.Windows.Input.TextCompositionManager when input with CJK IME.

Class TextCompositionManager has three events: PreviewTextInputEvent, PreviewTextInputStartEvent, and PreviewTextInputUpdateEvent (have bubbling/routed variants)

I'm testing four different languages/IMEs, and found that Korean IME has different behaviors than Chinese/Japanese IMEs.

注音輸入法 (Microsoft Bopomofo)

  1. Pressed S, text is now

PreviewTextInputStart -> PreviewTextInputUpdate -> TextChanged

  1. Pressed U, text is now ㄋㄧ

PreviewTextInputUpdate -> TextChanged

  1. Pressed 3, text is now

PreviewTextInputUpdate -> TextChanged

  1. Pressed C, text is now 你ㄏ

PreviewTextInputUpdate -> TextChanged

  1. Pressed L, text is now 你ㄏㄠ

PreviewTextInputUpdate -> TextChanged

  1. Pressed 3, text is now 你好

PreviewTextInputUpdate -> TextChanged

  1. Pressed Enter, text is now 你好

PreviewTextInputUpdate -> PreviewTextInput -> TextChanged

拼音輸入法 (Microsoft Pinyin)

  1. Pressed N, text is now n

PreviewTextInputStart -> PreviewTextInputUpdate -> TextChanged

  1. Pressed I, text is now ni

PreviewTextInputUpdate -> TextChanged

  1. Pressed H, text is now ni'h

PreviewTextInputUpdate -> TextChanged

  1. Pressed A, text is now ni'ha

PreviewTextInputUpdate -> TextChanged

  1. Pressed O, text is now ni'hao

PreviewTextInputUpdate -> TextChanged

  1. Pressed Enter, text is now 你好

PreviewTextInputUpdate -> PreviewTextInput -> TextChanged

Japanese Microsoft IME

  1. Pressed O, text is now

PreviewTextInputStart -> PreviewTextInputUpdate -> TextChanged

  1. Pressed H, text is now おh

PreviewTextInputUpdate -> TextChanged

  1. Pressed I, text is now おは

PreviewTextInputUpdate -> TextChanged

  1. Pressed I, text is now おはい

PreviewTextInputUpdate -> TextChanged

  1. Pressed Y, text is now おはいy

PreviewTextInputUpdate -> TextChanged

  1. Pressed O, text is now おはいよ

PreviewTextInputUpdate -> TextChanged

  1. Pressed Enter, text is now おはいよ

PreviewTextInputUpdate -> PreviewTextInput -> TextChanged

Korean Hangeul IME

  1. Pressed G, text is now

PreviewTextInputStart -> TextChanged

  1. Pressed K, text is now

PreviewTextInputUpdate -> TextChanged

  1. Pressed S, text is now

PreviewTextInputUpdate -> TextChanged

  1. Pressed R, text is now 한ㄱ

PreviewTextInput -> PreviewTextInputStart -> TextChanged

  1. Pressed M, text is now 한그

PreviewTextInputUpdate -> TextChanged

  1. Pressed F, text is now 한글

PreviewTextInputUpdate -> TextChanged

  1. Pressed Enter, text is now 한글

PreviewTextInput -> PreviewTextInputStart -> PreviewTextInput