svc:/system/keymap ignores eeprom layout
# # 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' />
/usr/bin/kbd -iwill always override the settings from /usr/lib/set_keyboard_layout.
Updated by Albert Lee over 9 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 Garrett D'Amore about 9 years ago
Joerg has a fix for this as well:
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 9 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
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"?).