/// <summary> /// Creates and returns a keyboard definition object based on the ID. /// Note that this method is used when we do NOT have a matching available keyboard. /// Therefore we can presume that the created one is NOT available. /// </summary> public KeyboardDescription CreateKeyboardDefinition(string id) { string layout, locale; KeyboardController.GetLayoutAndLocaleFromLanguageId(id, out layout, out locale); string cultureName; var inputLanguage = WinKeyboardUtils.GetInputLanguage(locale, layout, out cultureName); return(new WinKeyboardDescription(id, GetDisplayName(layout, cultureName), layout, cultureName, false, inputLanguage, this, default(TfInputProcessorProfile))); }
/// <summary> /// Creates and returns a keyboard definition object based on the ID. /// Note that this method is used when we do NOT have a matching available keyboard. /// Therefore we can presume that the created one is NOT available. /// </summary> public KeyboardDescription CreateKeyboardDefinition(string id) { CheckDisposed(); switch (InstalledKeymanVersion) { case KeymanVersion.Keyman10: string layout, locale; KeyboardController.GetLayoutAndLocaleFromLanguageId(id, out layout, out locale); string cultureName; var inputLanguage = WinKeyboardUtils.GetInputLanguage(locale, layout, out cultureName); return(new KeymanKeyboardDescription(id, false, this, false) { InputLanguage = inputLanguage }); default: return(new KeymanKeyboardDescription(id, false, this, false)); } }