How to programmatically change the keyboard layout?

  • Hello all,


    I want to switch between the keyboard layouts for German (0x407) and English (0x409) from my application.
    Which registry setting has to be modified?
    I tried the NetDCU approach given in http://www.forum.fs-net.de/vie…111&hilit=keyboard+layout but it does not seem to work with PicoCOM4:
    To switch from English to German, I replaced HKCU\Keyboard Layout\Preload\Default="00000409" by "00000407" and saved registry. After reboot I found the value to be "00000409" again, and the current layout was still English.


    Thank you in advance for a timely response.


    André Lehmann

  • Hello,


    Quote

    are you able to save any entry under HKCU?

    Yes, I am, in HKCU as well as in HKLM..

    Quote

    Do you use latest kernel?

    I use kernel V-1.03. I had tried kernel V-1.04 and V-1.05 which led to serious malfunctions so that I returned to the last known good version. I will give V-1.07 a try.
    BTW: What does the prefix "XIP" in "XIPNKPC4_CORE_CF35_120416" mean? Can it be used on PicoCOM4 just as the previous versions?


    Regards


    André Lehmann

  • Hello,
    when you can save registry it should work as outlined above! Can you adjust keyboard layout using taskbar, save registry and then reboot. Are the settings persit?


    Quote

    XIP...

    means "executable in place". Kernel is loaded "stepwise", so a base configuration is faster available and short the boot time. And yes you can use it on every PicoMOD4. I would also update the loaders.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello,

    Quote

    Can you adjust keyboard layout using taskbar, save registry and then reboot. Are the settings persit?

    No.
    (1) If I change using the taskbar icon from DE to EN, save the registry, reboot, I still find DE as current setting.
    (2) If I use Settings => Control panel => Regional and language settings => Input Language to switch from DE to EN, the setting is persistent.
    (3) The method to change

    Code
    1. [HKEY_CURRENT_USER\Keyboard Layout\Preload:Default="00000407"]

    into

    Code
    1. [HKEY_CURRENT_USER\Keyboard Layout\Preload:Default="00000409"]

    , save registry and reboot still does not work.

  • hello al12559,
    you are right we (F&S) have to check this issue. We will do it asp.


    But if:

    Quote

    (2) If I use Settings => Control panel => Regional and language settings => Input Language to switch from DE to EN, the setting is persistent.

    And do work as expected? Then you may compare the both registry to retrieve the desired information.

  • Hello hpb,


    thank you for your reply.
    From unknown reasons, now the method of changing the keyboard layout by modifying the said registry value, followed by registry save and restart works. The problem appears to be solved.


    Regards


    André Lehmann