Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#13837 - [kbd] Keymaps defaults to dvorak

Attached to Project: Arch Linux
Opened by Martin Sandsmark (sandsmark) - Tuesday, 17 March 2009, 21:31 GMT
Last edited by Roman Kyrylych (Romashka) - Thursday, 23 July 2009, 19:52 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Roman Kyrylych (Romashka)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No


If you just specify your country code (no, for example, in my case), for example for KEYMAP in /etc/rc.conf, or when using loadkeys, it defaults to loading the dvorak version.
This is pretty silly and caused some major frustrations (for example when X fails to start for the first time in half a year, and you can't log in at the tty's).

Example output:
lejon:~/# loadkeys no
Loading /usr/share/kbd/keymaps/i386/dvorak/

This works, but it's a workaround imho:
lejon:~/# loadkeys qwerty/no
Loading /usr/share/kbd/keymaps/i386/qwerty/
This task depends upon

Closed by  Roman Kyrylych (Romashka)
Thursday, 23 July 2009, 19:52 GMT
Reason for closing:  Fixed
Additional comments about closing:  in kbd-1.15-2
Comment by Øyvind Heggstad (Mr.Elendig) - Saturday, 21 March 2009, 10:24 GMT
You can also use 'no-latin1'. IIRC the qwerty version of 'no' didn't even exist until recently.
Comment by torkjel hongve (torkjel) - Tuesday, 14 April 2009, 20:06 GMT
Bumped into the same issue and it caused quite a bit of frustration too. I do believe 'KEYMAP="no"' worked as expected when I first installed this machine, about 6 months ago. It didn't force dvorak on me at least...
Comment by Roman Kyrylych (Romashka) - Sunday, 07 June 2009, 10:07 GMT
The problem is due to loadkeys using the first keyboard it finds, which is dvorak:
$ pacman -Ql kbd | grep keymaps | grep -e '/no'
kbd /usr/share/kbd/keymaps/i386/dvorak/
kbd /usr/share/kbd/keymaps/i386/qwerty/no-latin1.doc
kbd /usr/share/kbd/keymaps/i386/qwerty/
kbd /usr/share/kbd/keymaps/i386/qwerty/
I've seen the same issue back when building klibc-kbd, the solution was to patch kbd by renaming all duplicate filenames,
I submitted it upstream, but the maintainer refused to rename files.
The bug reappeared because the patch was removed in kbd-1.15-1:
Comment by Roman Kyrylych (Romashka) - Sunday, 07 June 2009, 12:40 GMT
Here's the list of maps with the same name but in different directories, which will be confused by loadkeys:
$ find data/keymaps -name '*.map' | grep -v include | sed 's:.*/::g' | sort | uniq -d
Comment by Roman Kyrylych (Romashka) - Sunday, 07 June 2009, 12:45 GMT
$ for i in $(find data/keymaps -name '*.map' | grep -v include | sed 's:.*/::g' | sort | uniq -d); do find data/keymaps -name "$i"; done
Comment by Roman Kyrylych (Romashka) - Sunday, 07 June 2009, 12:53 GMT
I just had an idea that renaming files with mv is better than doing the same with patch,
because this way we do not have to change the patch every time map files change.

Tobias, please add the following lines to the PKGBUILD:
mv data/keymaps/i386/qwertz/cz{,-qwertz}.map
mv data/keymaps/i386/olpc/es{,-olpc}.map
mv data/keymaps/i386/olpc/pt{,-olpc}.map
mv data/keymaps/i386/dvorak/no{,-dvorak}.map
mv data/keymaps/i386/fgGIod/trf{,-fgGIod}.map

EDIT: pt was added to avoid getting olpc layout when user choose pt instead of pt-latin1 or pt-latin5, same renaming was done in the patch.
Comment by Roman Kyrylych (Romashka) - Saturday, 18 July 2009, 17:09 GMT
Please try kbd-1.15-2 from testing (x86_64 only, i686 pending).
Keymaps were renamed as in my previous comment.
Comment by Øyvind Heggstad (Mr.Elendig) - Sunday, 19 July 2009, 14:32 GMT
Personally, I don't like the idea of having them renamed at all. IMO it should be kept as it is from upstream, and the user should specify qwerty/whatever instead.
Comment by Roman Kyrylych (Romashka) - Sunday, 19 July 2009, 16:02 GMT
specifying qwerty/es instead of just es because of almost-unused olpc/es is ridiculous, same for qwerty/no vs no because of dvorak/no
Comment by Roman Kyrylych (Romashka) - Sunday, 19 July 2009, 16:11 GMT
FYI when I sent a message the maintainer more than a year ago about this problem he agreed that such keymap name confusion is indeed a problem, and all new keymaps have distict names (e.g. newly added dvorak-fr). The renaming was seen as a workaround, and some better way was planned to be found (not happened yet).
IMO the renaming is okay here, since the files being renamed are rarely used anyway, but now they cannot take precedence instead of files that in 99,9% were meant to be loaded.
Comment by Øyvind Heggstad (Mr.Elendig) - Sunday, 19 July 2009, 18:08 GMT
I agrea, but I do believe that it should be changed upstream instead of downstream.
Comment by Roman Kyrylych (Romashka) - Sunday, 19 July 2009, 18:55 GMT
Yes, that's why I've sent an email to the maintainer at the same time as I built a new package.
But until upstream does something that will fix the problem, the workaround is better than not fixing the problem at all.
I'd be happy to use the way upstream choses to eliminate the issue and remove our filename customizations.