void OnIMCommit(object sender, Gtk.CommitArgs e) { foreach (char c in e.Str) { SearchController.AddChar(c); } }
void OnCommit(object sender, Gtk.CommitArgs ca) { try { if (selectionRelativeIndex != 0) { DeleteSelection(); } for (int i = 0; i < ca.Str.Length; i++) { char utf32Char; if (char.IsHighSurrogate(ca.Str, i)) { utf32Char = (char)char.ConvertToUtf32(ca.Str, i); i++; } else { utf32Char = ca.Str[i]; } lines[linePos] = lines[linePos].Insert(textPos, utf32Char.ToString()); textMode = TextMode.Uncommitted; textPos += utf32Char.ToString().Length; } Recalculate(); } finally { imContext.Reset(); } }
private void ImContext_Commit(object o, Gtk.CommitArgs args) { Input(new RawTextInputEventArgs(GtkKeyboardDevice.Instance, _lastKeyEventTimestamp, args.Str)); }