Bug 306269

Summary: sax2: changing keyboard has no effect on text mode
Product: [openSUSE] openSUSE 10.3 Reporter: michel munnix <michel.munnix>
Component: SaX2Assignee: Stefan Dirsch <sndirsch>
Status: RESOLVED FIXED QA Contact: E-mail List <sax2-maintainer-bugs>
Severity: Enhancement    
Priority: P2 - High CC: eich, jsrain, jsuchome, ms
Version: Beta 2   
Target Milestone: ---   
Hardware: x86   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description michel munnix 2007-08-30 09:39:51 UTC
"Yast2 keyboard" launches the sax2 module which changes only Xorg config.

either the user should be informed with a popup to run also "yast keyboard" to change the keyboard setting for text mode,
or it should be handled internaly in sax2 : f.ex. a checkbox "adapt keyboard for textmode"
Comment 5 Klaus Kämpf 2007-09-05 08:15:00 UTC
This is a long-standing usability bug and I fully agree with the reporter.

The tool one chooses to configure a setting should not limit the generality of the result, except the tool clearly states something different.

So either make yast2-keyboard (textmode) and SaX2 change X11 and console keyboard maps (principle of least surprise) or add a proper help text. (And the helptext might confuse users)

(Does anyone use different keyboards when typing on console vs. typing on X11 ?)

That said, its probably too late to fix it properly in 10.3
Comment 7 Jiří Suchomel 2007-10-30 20:00:51 UTC
fate 302925
Comment 8 Stefan Dirsch 2008-06-19 07:20:45 UTC
I will work on this now.
Comment 9 Stefan Dirsch 2008-06-19 08:35:20 UTC
Example:

# yast keyboard
< change from Germany to French >
--- /etc/sysconfig/keyboard.old
+++ etc/sysconfig/keyboard     
 # Keyboard settings for the text console
 #
 # Keyboard mapping
 # (/usr/share/kbd/keymaps/)
 # e.g. KEYTABLE="de-latin1-nodeadkeys", "us" or empty for US settings
 #
-KEYTABLE="de-latin1-nodeadkeys.map.gz"
+KEYTABLE="fr_CH-latin1.map.gz"
 [...]
 # The YaST-internal identifier of the attached keyboard.
 #
-YAST_KEYBOARD="german,pc104"
+YAST_KEYBOARD="french-ch,pc104"

Since the information, which model (pc104, macintosh,...) to chose for *console* (we have it for X11 of course) is not available in /usr/share/sax/sysp/maps/Keyboard.map
I suggest to take the X11 Layout (Germany, Czechia, ...) and use 'yast keyboard' to set the console layout and if this fails, since the Layout is not available, not change the console keyboard layout at all. Jiri, is it possible to use the keyboard YaST module in a non-interactive way? Who else could know this?
 
Comment 10 Jiří Suchomel 2008-06-19 10:33:44 UTC
"yast keyboard set layout=<value>", where list of values can be listed via "yast keyboard list"

These are, however, internal YaST names, so I am not sure if it is usable for you...
Comment 11 Stefan Dirsch 2008-06-19 10:59:26 UTC
Sounds nice. Since these are internal YaST names I need another table for mapping <X11 Layout> ==> <YaST Layout name>. I'll work on this table first.
Comment 12 Jiří Suchomel 2008-06-19 11:05:17 UTC
Such information should be here:

/usr/share/YaST2/data/xkblayout2keyboard.ycp

I hope the format should be readable for your app.
Comment 13 Stefan Dirsch 2008-06-19 11:54:20 UTC
Thanks. Might help here.
Comment 14 Stefan Dirsch 2008-07-09 02:10:06 UTC
Implemented.

sax2.changes:
-------------------------------------------------------------------
Wed Jul  9 03:50:18 CEST 2008 - sndirsch@suse.de

- set console keyboard using YaST keyboard module (FATE #302925,
  bnc #306269)