Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Keyboard layout switching does not work properly

  1. #11
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    2,689
    Blog Entries
    1

    Default Re: Keyboard layout switching does not work properly

    Quote Originally Posted by mushishi View Post
    After installing the package glibc-i18ndata, I managed to create the symbolic link as suggested. Unfortunately, this didn't help. I tried to remove all layouts except German, logged out and in my KDE Plasma session and after a couple of hours I had 2 layouts, one US and one German. The US got included without my intervention.

    Then I added a third layout. When I right-click on the flag symbol in the task bar, I can see that the first and last layout are both US (the last one says "with AltGr dead keys"), all the rest are in between. OTOH when I jump to the KDE configuration menu for layouts, I can only see the layouts I set up - which do not include US English.

    Therefore I thought there must be some KDE deamon which overwrites the settings in the $HOME config path specific to KDE and I ignored the old config file:
    Code:
    $ mv ~/.kde4 ~/.kde4.old
    But as soon as I customize the default settings to include any non-US layout, I get the same issues again. I will try a different Deskop Environment during the weekend to see whether or not this issue is KDE SC-specific.
    Watch for variables LANG and LANGUAGE:
    Code:
    karl@3400G:~> echo $LANG 
    de_DE.UTF-8 
    karl@3400G:~> echo $LANGUAGE       
    de:en_US 
    karl@3400G:~>
    Plasma uses:
    Code:
    3400G:~ # cat .config/plasma-localerc 
    [Formats] 
    LANG=en_DE.UTF-8 
    
    [Translations] 
    LANGUAGE=en 
    3400G:~ #

    Changes will take effect after logging out and logging in again. If the GUI doesn't support your values use an editor such as nano instead while logged out from GUI. Your changes may be overwritten by the GUI when making changes while logged in.
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), openSUSE Tumbleweed, KDE Plasma 5

  2. #12

    Default Re: Keyboard layout switching does not work properly

    System keyboard layout: https://susepaste.org/53110252
    System language: https://susepaste.org/58968628

    The system keyboard layout only works during the KDM login screen. Today I tried logging into GNOME, to a similar effect. The keyboard layout indicator claims 'de', but when I try typing some text I cannot enter any umlauts. At least in KDE Plasma the indicator corresponds to the currently set layout. So this has to be a bug in YasT or whichever freedesktop.org daemon is used by all desktop environments to configure layouts. Anyone knows the name? The system resets the layout to the system default language, even though the YasT setting 'adapt keyboard layout to English' is not ticked.

    Code:
    $ cat .config/plasma-localerc
    [Formats]
    LANG=en_DE.UTF-8
    $ echo $LANG 
    en_DE.UTF-8
    $ echo $LANGUAGE 
    
    When I keep the YasT setting for the system language but change the KDE Plasma language and hope to override the setting this way, the behavior does not change. In other words, the only way to use avoid a US layout is to deactivate layout switching and set all locales to German .

  3. #13

    Default Re: Keyboard layout switching does not work properly

    Quote Originally Posted by mushishi View Post
    System keyboard layout: https://susepaste.org/53110252
    System language: https://susepaste.org/58968628
    ...
    for the sake of completeness KDE layout settings:
    https://susepaste.org/37567591

  4. #14
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    2,689
    Blog Entries
    1

    Default Re: Keyboard layout switching does not work properly

    Quote Originally Posted by mushishi View Post
    for the sake of completeness KDE layout settings:
    https://susepaste.org/37567591
    Systemd has a nice command for displaying system locale. Run that:
    Code:
    erlangen:~ # localectl              
       System Locale: LANG=de_DE.UTF-8 
           VC Keymap: de-latin1-nodeadkeys 
          X11 Layout: de 
           X11 Model: pc105 
         X11 Variant: nodeadkeys 
         X11 Options: terminate:ctrl_alt_bksp 
    erlangen:~ #
    User locale overrides system locale:
    Code:
    karl@erlangen:~> grep LANG .profile 
    # in the variable RC_LANG. 
    #export LANG=de_DE.UTF-8        # uncomment this line for German output 
    #export LANG=fr_FR.UTF-8        # uncomment this line for French output 
    #export LANG=es_ES.UTF-8        # uncomment this line for Spanish output 
    karl@erlangen:~> 
    Plasma settings:
    Code:
    karl@erlangen:~> cat .config/plasma-localerc  
    [Formats] 
    LANG=de_DE.UTF-8 
    
    [Translations] 
    LANGUAGE=de:en_US 
    karl@erlangen:~> 
    For smooth operation users need to check all three settings and make sure configured settings exist.
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), openSUSE Tumbleweed, KDE Plasma 5

  5. #15

    Default Re: Keyboard layout switching does not work properly

    Out of the three suggested settings, only my contents of
    .config/plasma-localerc

    were different. I changed the settings to match yours, then logged out and in again. The effect was that KDE Plasma was in German, but the layouts were not affected.
    I have another idea: maybe there exists a sysconfig setting which can configure system language and multiple keyboard layouts reliably. Will write back for the results.

  6. #16
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    2,689
    Blog Entries
    1

    Default Re: Keyboard layout switching does not work properly

    Quote Originally Posted by mushishi View Post
    Out of the three suggested settings, only my contents of
    .config/plasma-localerc

    were different. I changed the settings to match yours, then logged out and in again. The effect was that KDE Plasma was in German, but the layouts were not affected.
    I have another idea: maybe there exists a sysconfig setting which can configure system language and multiple keyboard layouts reliably. Will write back for the results.
    I tested and it worked:

    Code:
    karl@3400G:~> cat .config/plasma-localerc             
    [Formats] 
    LANG=ru_RU.UTF-8 
    
    [Translations] 
    LANGUAGE=ru:de:en_US 
    karl@3400G:~>
    Check installation of KDE translations:
    Code:
    3400G:~ # zypper if plasma5-desktop-lang 
    Loading repository data... 
    Reading installed packages... 
    
    
    Information for package plasma5-desktop-lang: 
    --------------------------------------------- 
    Repository     : Haupt-Repository (OSS) 
    Name           : plasma5-desktop-lang 
    Version        : 5.21.5-1.1 
    Arch           : noarch 
    Vendor         : openSUSE 
    Installed Size : 12.7 MiB 
    Installed      : Yes (automatically) 
    Status         : up-to-date 
    Source package : plasma5-desktop-5.21.5-1.1.src 
    Summary        : Translations for package plasma5-desktop 
    Description    :  
        Provides translations for the "plasma5-desktop" package. 
    
    3400G:~ #
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), openSUSE Tumbleweed, KDE Plasma 5

  7. #17

    Default Re: Keyboard layout switching does not work properly

    Quote Originally Posted by karlmistelberger View Post
    I tested and it worked:

    Code:
    karl@3400G:~> cat .config/plasma-localerc             
    [Formats] 
    LANG=ru_RU.UTF-8 
    
    [Translations] 
    LANGUAGE=ru:de:en_US 
    karl@3400G:~>
    Check installation of KDE translations:
    Code:
    3400G:~ # zypper if plasma5-desktop-lang 
    Loading repository data... 
    Reading installed packages... 
    
    
    Information for package plasma5-desktop-lang: 
    --------------------------------------------- 
    Repository     : Haupt-Repository (OSS) 
    Name           : plasma5-desktop-lang 
    Version        : 5.21.5-1.1 
    Arch           : noarch 
    Vendor         : openSUSE 
    Installed Size : 12.7 MiB 
    Installed      : Yes (automatically) 
    Status         : up-to-date 
    Source package : plasma5-desktop-5.21.5-1.1.src 
    Summary        : Translations for package plasma5-desktop 
    Description    :  
        Provides translations for the "plasma5-desktop" package. 
    
    3400G:~ #
    Everything the same except the package version of plasma5-desktop-lang is 5.18 and not 5.21. It seems I would need to install Tumbleweed and try it out there; I will be back with results, probably in a week again.

  8. #18
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,140

    Question Re: Keyboard layout switching does not work properly

    Quote Originally Posted by mushishi View Post
    I will be back with results, probably in a week again.
    But, you have only ever shown us what the SOFTWARE settings are –
    • You have never described the physical HARDWARE keyboard device.

    Please tell us which physical keyboard device (HARDWARE) is present on your system.
    • What is the physical (HARDWARE) keyboard layout?

  9. #19

    Thumbs up Re: Keyboard layout switching does not work properly

    Quote Originally Posted by dcurtisfra View Post
    But, you have only ever shown us what the SOFTWARE settings are –
    • You have never described the physical HARDWARE keyboard device.

    Please tell us which physical keyboard device (HARDWARE) is present on your system.
    • What is the physical (HARDWARE) keyboard layout?
    German keyboard (standard).
    First of all, big thanks @karlmistelberger for the config options. Turns out I had 2 problems:
    1. https://github.com/atom/atom-keymap/issues/37 Keyboard layout switching is still buggy in Atom and this has nothing to do with openSUSE or KDE.
    2. I use fcitx-mozc, an input method for Japanese. By default, this input method obtains the system language and sets a default keyboard layout based on that information, not on configured keyboard layouts. In my case, since my system is in English, mozc automatically set up US keyboard layout whenever I don't type in Japanese. This setting overrides the KDE keyboard layout configuration. I had to manually change to the standard German keyboard, now I can switch to any input language I want without problems.

  10. #20
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    2,689
    Blog Entries
    1

    Default Re: Keyboard layout switching does not work properly

    Quote Originally Posted by mushishi View Post
    First of all, big thanks @karlmistelberger for the config options.
    You are welcome!

    I use fcitx-mozc, an input method for Japanese. By default, this input method obtains the system language and sets a default keyboard layout based on that information, not on configured keyboard layouts. In my case, since my system is in English, mozc automatically set up US keyboard layout whenever I don't type in Japanese. This setting overrides the KDE keyboard layout configuration.
    In most cases users want to use their personal settings, not system settings. Any software should respect this.

    I had to manually change to the standard German keyboard, now I can switch to any input language I want without problems.
    Happy to hear you too now get intended behavior.
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), openSUSE Tumbleweed, KDE Plasma 5

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •