Bug 6639 - The "es-latin1" keytable should be used for the Asturian keyboard layout
Summary: The "es-latin1" keytable should be used for the Asturian keyboard layout
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 2
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Thierry Vignaud
QA Contact:
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-06-30 17:25 CEST by Daniel Calviño Sánchez
Modified: 2012-12-06 09:29 CET (History)
0 users

See Also:
Source RPM: drakx-kbd-mouse-x11-0.102-1.mga2.src.rpm
CVE:
Status comment:


Attachments

Description Daniel Calviño Sánchez 2012-06-30 17:25:14 CEST
Description of problem:
When setting the Asturian keyboard layout in drakkeyboard everything works as expected in a graphical session. However, when typing in a terminal, some keys are not correctly mapped.

Asturian is a language spoken in the north of Spain, and the keyboards are just regular Spanish keyboards. There is an XKB variant for the Spanish XKB layout that just adds mappings for ḷ/Ḷ and ḥ/Ḥ (the characters needed in Asturian that do not exist in Spanish). However, as far as I know, there is no "pure terminal" Asturian keyboard layout (not using XKB; I don't know its proper name). So the Spanish keyboard layout is used in this case.

The problem seems to be that the Spanish mapping set by drakkeyboard is not the right one. The KEYTABLE value that appears in /etc/sysconfig/keyboard when the Asturian layout is set is "es", but when the Spanish layout is set is "es-latin1". The "es-latin1" layout works as expected, but the "es" layout has wrong mapped keys.

Executing "loadkeys es" reveals that the keymap used in this case is /usr/lib/kbd/keymaps/i386/olpc/es.map.gz, instead of /usr/lib/kbd/keymaps/i386/qwerty/es.map.gz. Apparently, loadkeys gets the firsy keymap that matches the given name. As "olpc" appears before "qwerty", the es.map.gz file is loaded from the olpc directory. Using the name "es-latin1" works as expected because there is only one es-latin1.map.gz keymap file, and it is in the qwerty directory.

So, to fix the bug, the keytable set by drakkeyboard in /etc/sysconfig/keyboard for the Asturian keyboard layout should be "es-latin1", instead of "es". As far as I know, drakkeyboard relies on /usr/lib/libDrakX/keyboard.pm to set those values, so the line 205, which reads:
 "ast" => [ N_("_: keyboard\nAsturian"),       "es",             "es(ast)",    0 ],
should be changed to:
 "ast" => [ N_("_: keyboard\nAsturian"),       "es-latin1",      "es(ast)",    0 ],


Version-Release number of selected component (if applicable):
drakx-kbd-mouse-x11-0.102-1.mga2.src.rpm


How reproducible:
Every time the Asturian layout is selected in drakkeyboard.


Steps to Reproduce:
Note that this steps will work only with a Spanish keyboard
1. Run drakkeyboard as root and set the keyboard layout to "Asturian"
2. Change to a terminal (ctrl+alt+f2)
3. Login in the terminal
4. Press "ç" key; a "]" will appear instead
Manuel Hiebel 2012-07-01 21:53:08 CEST

Keywords: (none) => PATCH
Assignee: bugsquad => thierry.vignaud

Comment 1 Daniel Calviño Sánchez 2012-12-06 01:02:22 CET
Still valid in Mageia 3 alpha 3 (LiveDVD KDE4 x86_64).
Comment 2 Thierry Vignaud 2012-12-06 09:11:45 CET
Fixed in SVN for Cauldron
Comment 3 Thierry Vignaud 2012-12-06 09:29:37 CET
backported in mga2 branch too.

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.