+ {
+ MInputMethod.Key key = new MInputMethod.Key (str[i]);
+ session.HandleKey (key);
+ int pos = session.CurrentPos;
+ MText head = mt[0, pos];
+ MText preedit = session.Preedit;
+ MText tail = mt[pos, mt.Length];
+ Console.Write ("{0} -> \"{1}|{2}|{3}\" (",
+ str[i, i + 1], head, preedit, tail);
+ for (int j = 0; j < head.Length; j++)
+ Console.Write ("{0}U+{1:X4}", j == 0 ? "(" : " ", head[j]);
+ Console.Write ("|");
+ for (int j = 0; j < preedit.Length; j++)
+ Console.Write ("{0}U+{1:X4}", j == 0 ? "" : " ", preedit[j]);
+ Console.Write ("|");
+ for (int j = 0; j < tail.Length; j++)
+ Console.Write ("{0}U+{1:X4}", j == 0 ? "" : " ", tail[j]);
+ Console.WriteLine (")");
+ }