protected override void AddAllKeyboards(string[] list) { // e.g., "pinyin", "xkb:us::eng", "xkb:fr::fra", "xkb:de::ger", "/usr/share/kmfl/IPA14.kmn", "xkb:es::spa" int kbdIndex = 0; foreach (var item in list) { IbusKeyboards.Add(item, kbdIndex); ++kbdIndex; } RegisterIbusKeyboards(); }
private void AddKeyboard(string source) { var parts = source.Split(new String[] { ";;" }, StringSplitOptions.None); Debug.Assert(parts.Length == 2); if (parts.Length != 2) { return; } var type = parts[0]; var layout = parts[1]; if (type == "xkb") { XkbKeyboards.Add(layout, _kbdIndex); } else { IbusKeyboards.Add(layout, _kbdIndex); } ++_kbdIndex; }