Bug #310
opensvc:/system/keymap ignores eeprom layout
50%
Description
usr/src/cmd/kbd/keymap:
# # Systems with no hardware keyboard ID may provide an eeprom value, # or the value can be supplied in svc:/system/keymap:default. A value # supplied in svc:/system/keymap:default will override the value # supplied in eeprom. # [ -x /usr/lib/set_keyboard_layout ] && /usr/lib/set_keyboard_layout # Initialize the keyboard defaults [ -h /dev/kbd -a -x /usr/bin/kbd ] && /usr/bin/kbd -i >/dev/null 2>&1
However, usr/src/cmd/kbd/keymap.xml has:
<propval name='layout' type='astring' value='US-English' />
Hence
/usr/bin/kbd -i
will always override the settings from /usr/lib/set_keyboard_layout.
Related issues
Updated by Albert Lee over 11 years ago
- % Done changed from 0 to 50
I think this is the correct solution:
--- a/usr/src/cmd/kbd/keymap.xml +++ b/usr/src/cmd/kbd/keymap.xml @@ -77,7 +77,7 @@ <propval name='keyclick' type='boolean' value='false' /> <propval name='repeat_delay' type='integer' value='500' /> <propval name='repeat_rate' type='integer' value='40' /> - <propval name='layout' type='astring' value='US-English' /> + <propval name='layout' type='astring' value='' /> <propval name='kbd_beeper_freq' type='integer' value='2000' /> <propval name='console_beeper_freq' type='integer' value='900' /> </property_group>
The caselog for PSARC/2010/183 ( http://arc.opensolaris.org/caselog/PSARC/2010/183/mail ) shows that SMF contains values for the properties rather than leaving them uninitialised is to make the defaults visible to the user, but the real default for the layout should be the eeprom value and not "US-English".
Related is #203 Keyboard configuration is not preserved across upgrades
Updated by Albert Lee over 11 years ago
set_keyboard_layout
needs to set the layout to "US-English" if it's currently "Unknown", else loadkeys
(run at the end of the keymap
method script) will fail.
Updated by Garrett D'Amore about 11 years ago
Joerg has a fix for this as well:
http://hg.berlios.de/repos/schillix-on/rev/ddbb71ca03b9
This is different from his first attempted fix, and seems to be the "correct" fix. To bad he didn't submit this to us more directly.
Updated by Albert Lee about 11 years ago
Joerg's kbd change covers #203 which I think my fix would be preferred for, as his involves introducing an additional value to the layout property to support /etc/default/kbd
.
On the OpenIndiana live media it was discovered that the interactive layout selection runs before the keymap method but does apparently does not set the SMF or eeprom property, so an updated set_keyboard_layout
invoked from the keymap method would override its selection with "US-English" since the layout appeared to be empty. Either the layout selection should be updated to store its configuration or the keymap method should not attempt to change the layout when both eeprom and SMF have an empty string (or eeprom has "Unknown"?).