Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Change a language on demand without changing system keyboard language (Read 2695 times)
Annes
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 5
Joined: Jun 4th, 2018
Change a language on demand without changing system keyboard language
Jul 18th, 2018 at 4:12pm
Print Post  
I have another problem. You find bellow the code that I use it in code-behind to change the keyboard language:

Code:
<Grid x:Name="GridKeyboard" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">

<vk:VirtualKeyboard x:Name="KeyboardVirtual" HorizontalAlignment="Left" VerticalAlignment="Top" InputLocale="{Binding InputLocale,ElementName=wKeyboard}"/>



</Grid>




Code:
public partial class KeyboardMiniMind_Window : UserControl, INotifyPropertyChanged
{
public KeyboardMiniMind_Window()
{
InitializeComponent();
KeyboardVirtual.InputLocale = LanguageLocalizerApp.SelectedLanguage;
KeyboardMindFusionVM vm = this.DataContext as KeyboardMindFusionVM;
KeyboardVirtual.TemplateLayout = vm.GetCustomLayout();
DataContext = vm;
}




This change the keyboard language, but I change also the keyboard system language. In the context of my application, I must not change system keyboard lanaguage.

Could you please find another way for changing the keyabord language without changing system keyboard language.

Thank you.

Sincerely,
Annes
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Online


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Change a language on demand without changing system keyboard language
Reply #1 - Jul 19th, 2018 at 9:32am
Print Post  
The keyboard control relies on current system language to map virtual key codes to characters, so that won't work with the default layout without changing system language. The UnicodeKey from this version should let you send fixed characters independent from system keyboard -
https://mindfusion.eu/Forum/YaBB.pl?num=1531381136

However you will need to create your custom keyboard layouts, as the default layout only contains RegularKey objects that send virtual key codes, later mapped to characters by the OS depending on current language.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Annes
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 5
Joined: Jun 4th, 2018
Re: Change a language on demand without changing system keyboard language
Reply #2 - Jul 19th, 2018 at 1:13pm
Print Post  
Thank You.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint