Bug 273414 - Cannot choose keyboard layout variant as first choice
Summary: Cannot choose keyboard layout variant as first choice
Status: RESOLVED UPSTREAM
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_keyboard_layout (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Andriy Rysin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-16 14:36 UTC by zorggy
Modified: 2015-08-08 10:25 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zorggy 2011-05-16 14:36:38 UTC
Version:           unspecified (using KDE 4.6.2) 
OS:                Linux

My keyboard is mapped as "us", "USA" layout and "Default" variant, but I would like to get the "International (with dead keys)" one as my first choice. Unfortunately it does not work when logging out/in: it goes back with the "Default" variant. So I have to change it each time I log in.

Reproducible: Always

Steps to Reproduce:
1) In "System Settings" window, select "Input devices", then "Keyboard" and finally "Layouts" tab. There is only one layout: map "us", layout "USA", label "us".
2) Add new layout: Check "configure layouts" and click on "Add layout" button. In the new window select "USA" layout, "International (with dead keys)" variant and enter "int" label. Validate with "OK". Then select this new layout and put it as first line with the green "up" button. Apply changes.

Actual Results:  
The keyboard variant is the one intended. But after a log out/in, the default variant "us" is selected instead of the international one, named "int".
Comment 1 Andriy Rysin 2011-05-16 17:36:34 UTC
Could you please attach you kxkbrc file?
Comment 2 zorggy 2011-05-16 17:44:56 UTC
Here is my ~/.kde/share/config/kxkbrc file (file attached too):

[Layout]
DisplayNames=,int
LayoutList=us,us(intl)
LayoutLoopCount=-1
Model=applealu_iso
ResetOldOptions=false
ShowFlag=false
ShowLayoutIndicator=true
ShowSingle=true
SwitchMode=Global
Use=true

Jean-Michel.

On 05/16/2011 05:36 PM, Andriy Rysin wrote:
> https://bugs.kde.org/show_bug.cgi?id=273414
>
>
>
>
>
> --- Comment #1 from Andriy Rysin<arysin gmail com>   2011-05-16 17:36:34 ---
> Could you please attach you kxkbrc file?
>
Comment 3 Andriy Rysin 2011-05-17 06:20:00 UTC
Your config file looks wrong - your default us layout is first. Configuration wasn't saved properly.
But I can't reproduce this problem: I was able to configure two layouts: us(intl) as default and us and it works properly before and after reboot.

Could you please check that systemsettings show the right order after you save, close and reopen it?
Comment 4 zorggy 2011-05-17 08:40:49 UTC
Hello Andriy,

Okay, my config file was the other way round. Now I put it with the 
"intl" variant first through the "System Settings" application and the 
file looks like (correct to me):

[Layout]
DisplayNames=int,
LayoutList=us(intl),us
LayoutLoopCount=-1
Model=applealu_iso
ResetOldOptions=false
ShowFlag=false
ShowLayoutIndicator=true
ShowSingle=true
SwitchMode=Global
Use=true

Then I logged out/in (I tried to reboot too) and... the "Default" 
variant is selected (I have the "Show layout indicator" check box 
selected); I've checked writing text, it is the "Default" variant.

I have two computers with Fedora 14 / KDE and I've got the same problem 
on both.

Thank you for your help.

Jean-Michel.


On 05/17/2011 06:20 AM, Andriy Rysin wrote:
> https://bugs.kde.org/show_bug.cgi?id=273414
>
>
>
>
>
> --- Comment #3 from Andriy Rysin<arysin gmail com>   2011-05-17 06:20:00 ---
> Your config file looks wrong - your default us layout is first. Configuration
> wasn't saved properly.
> But I can't reproduce this problem: I was able to configure two layouts:
> us(intl) as default and us and it works properly before and after reboot.
>
> Could you please check that systemsettings show the right order after you save,
> close and reopen it?
>
Comment 5 Andriy Rysin 2011-05-22 17:09:40 UTC
I can't reproduce this problem neighter on OpenSuse 11.4 (KDE 4.6) nor on compiled KDE from master. I have us(intl),us and by default the intl is selected.

When you relogin/reboot and your selected variant is default what's the context menu order in the indicator? Is it intl, default or default, intl?
Comment 6 zorggy 2011-05-22 18:06:31 UTC
First, I owe to say that I only tested on two different computers with 
Fedora (14). I have a friend who uses Ubuntu, I'm going to check on her 
computer next week and let you know.

In the Keyboard Settings application I have two variants: "us-default" 
and "us-intl". If I put "us-default" as first choice, everything is 
correct, I can change to "us-intl" from the System Tray and I can reboot 
without any problem. But If I put "us-intl" variant as first choice I've 
got a problem as soon as I finish the session: if I log out - log in 
then I can only access the "us-default" variant, as if the "us-intl" 
choice had disappeared. However in the Keyboard Settings application the 
two variants are present and in the right order. Finally if I put back 
the "us-default" variant as first choice, I can normally change the 
variants from the System Tray.

Oh, shit! I've just tried to change the keyboard type and this is the 
problem! As I have two Apple keyboards, one small at home and one big at 
work, I set the Keyboard model to: "Apple | Apple Aluminium Keyboard". 
But I've just put "Generic | Generic 104-key PC" and after a log out 
-log in, the "int" directly appeared in the System Tray!

Sorry, I did not realized before. So, are you the right person to solve 
this problem?

On 05/22/2011 05:09 PM, Andriy Rysin wrote:
> https://bugs.kde.org/show_bug.cgi?id=273414
>
>
>
>
>
> --- Comment #5 from Andriy Rysin<arysin gmail com>   2011-05-22 17:09:40 ---
> I can't reproduce this problem neighter on OpenSuse 11.4 (KDE 4.6) nor on
> compiled KDE from master. I have us(intl),us and by default the intl is
> selected.
>
> When you relogin/reboot and your selected variant is default what's the context
> menu order in the indicator? Is it intl, default or default, intl?
>
Comment 7 Andriy Rysin 2011-05-22 19:27:53 UTC
Ahh, good catch, so when I try to do "setxkbmap -model applealu_iso" I get "Error loading keyboard description"
I've added a bug in xkeyboard-config at freedesktop.org: https://bugs.freedesktop.org/show_bug.cgi?id=37472
Comment 8 Andriy Rysin 2011-05-28 14:54:33 UTC
Seems like apple keyboard models can't be used with generic layouts, here's the answer from the xkeyboard-config maintainer:

This is the answer. If you're using mac layouts, you cannot use "general" ones.
The simple workaround would be to copy intl section from symbols/us to
symbols/macintosh_vndr/us.

I cannot think of easy way of fixing it except introducing very complex rules
for vendors (up to every variant!)
Comment 9 Alexander Adam 2015-08-08 10:25:04 UTC
It is not really fixed. I just ran into this issue and simply didn't know why the settings didn't work.
Choosing one of the non-working keyboard models also leads to other non working keyboard settings of course (like repeat delay and rate).

I was lucky to find this issue here but does anybody here think it is acceptable that the system settings dialogue happily accepts everything but won't do anything when it went wrong? Joe average most probably won't know why it didn't work.

Is it really acceptable to offer options that won't work anyway?
Is it somehow useful that the information that his setting didn't work won't be shown to the user? Currently you can only find it in Xsession-errors.

At the moment the problem is simply reproducible and far away from "fixed".
It is not about setting a particular keyboard type but also about handling cases when something went wrong.