Bug 116143

Summary: yast2-country doesnt set console keyboard correctly
Product: [openSUSE] openSUSE 11.1 Reporter: Jiří Suchomel <jsuchome>
Component: BasesystemAssignee: Michal Marek <mmarek>
Status: RESOLVED FIXED QA Contact: Klaus Kämpf <kkaempf>
Severity: Normal    
Priority: P3 - Medium CC: jsuchome, mmarek, snwint
Version: Factory   
Target Milestone: ---   
Hardware: Other   
OS: SuSE Linux 10.0   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Jiří Suchomel 2005-09-09 14:45:13 UTC
yast2-country doesnt set console keyboard correctly
Looks like it didn't work even for 9.3; not sure if it isn't only
installation-related.

yast2-country calls

"loadkeys <keymap>; dumpkeys | loadkeys -u"

according to description in bug #59223. However, the correct command should use
"-c charset" parameter for dumpkeys.
Comment 1 Jiří Suchomel 2005-09-09 14:48:43 UTC
Juergen, should 'loadkeys -u <keymap>' work?
Now it works for czech maps (cz-lat2-us.map.gz), not for german ones
(de-latin1-nodeadkeys).


Steffen, where do you have the map of charset values for the languages
(keyboards)? Maybe I could copy it to yast to use the dumpkeys command it correclty.
Comment 2 Steffen Winterfeldt 2005-09-09 14:52:53 UTC
Some maps have an explicit 'charset' keyword somewhere in them. 
 
That's what linuxrc currently has (a bit incomplete): 
 
#define KM_L1 "iso-8859-15" 
#define KM_L2 "iso-8859-2" 
#define KM_L7 "iso-8859-7" 
#define KM_KOI "koi8-r" 
 
/* keymap encodings */ 
struct { 
  char *map; 
  char *enc; 
} km_enc[] = { 
  { "Pl02",         KM_L2  }, 
  { "br-abnt2",     KM_L1  }, 
  { "cz-us-qwertz", KM_L2  }, 
  { "de-lat1-nd",   KM_L1  }, 
  { "es",           KM_L1  }, 
  { "fr-latin1",    KM_L1  }, 
  { "gr",           KM_L7  }, 
  { "hu",           KM_L2  }, 
  { "it",           KM_L1  }, 
  { "no-latin1",    KM_L1  }, 
  { "pt-latin1",    KM_L1  }, 
  { "ru1",          KM_KOI }, 
  { "sk-qwerty",    KM_L2  }, 
  { "slovene",      KM_L2  } 
}; 
 
Comment 3 Jiří Suchomel 2005-09-09 14:53:07 UTC
snwint:
> BTW, the normal 'kbd' init script leaves out '-c' for dumpkeys, too. 
> I always wondered how this works for czech.

That was my initial finding (in comment #11 of bug #113664) - that current call
in yast (without -c) does not work for czech keyboard (while it works for german...)
Comment 4 Jiří Suchomel 2005-09-09 14:55:19 UTC
Is there any architecture specific stuff?
Comment 5 Steffen Winterfeldt 2005-09-09 14:56:55 UTC
Nothing I'm aware of. 
Comment 6 Jiří Suchomel 2005-09-09 15:22:51 UTC
Hmm... looks like de-latin1-nodeadkeys is the only one complaining for loadkeys -u
Comment 7 Steffen Winterfeldt 2005-09-09 15:33:37 UTC
But does it really _work_? 
Comment 8 Jiří Suchomel 2005-09-09 15:37:36 UTC
For the czech keyboard, it works the same way as with dumpkeys -c iso-8859-2.
At least it looks like.

I'm going to use your map provided in comment #2, unless I get some different
advice from Juergen.
Comment 9 Steffen Winterfeldt 2005-09-09 16:03:58 UTC
Then '-u' seems to be ok but for that de map. 
Comment 10 Jiří Suchomel 2005-09-09 16:30:40 UTC
fixed in svn, submited as yast2-country-2.12.15

setting as LATER to find better solution after 10.0

Steffen, thanks for help
Comment 11 Juergen Weigert 2005-09-12 17:56:06 UTC
when I last tested, "dumpkeys | loadkeys -u" was the only reliably way for  
de-latin1-nodeadkeys. I haven't played with dumpkeys -c yet. 
 
Comment 12 Jiří Suchomel 2005-09-13 06:00:03 UTC
"dumpkeys | loadkeys -u" works for de-latin1-nodeadkeys. It doesn't work for
cz-us-qwertz. "loadkeys -u" fails for de-latin1-nodeadkeys, while it works for
most of the keyboards listed above ("most" means "all which I tested").
Comment 13 Jiří Suchomel 2005-09-27 11:33:15 UTC
.
Comment 14 Jiří Suchomel 2005-09-27 11:35:09 UTC
Juergen, why "loadkeys -u" is not possible to use?

In bug #59223 you have written "[it] is currently broken." It's more then year
ago - what's the problem?
Comment 15 Jiří Suchomel 2005-12-09 15:01:20 UTC
Juergen, could you comment?
Comment 16 Michal Marek 2008-09-03 15:46:18 UTC
-> new maintainer
Comment 17 Jiří Suchomel 2008-09-24 09:00:58 UTC
What's the status of this one?

Currently, YaST calls keymap found in the table of comment 2. If the keymap is there, it points to the encoding string. If the encoding string is defined, loadkyes is called this way:

'loadkeys <keymap> ; dumpkeys -c encoding | loadkeys -u'

Is this still the correct way or does it work differently now? (I'm also wondering about the connections to bug 367801...)
Comment 18 Jiří Suchomel 2008-09-24 12:37:09 UTC
So, according to bug367801#c19, I'm removing the 'dumpkeys -c encoding | loadkeys -u' part of the command, leaving only loadkeys <keymap> there.

Done in yast2-country-2.17.12.