if I use UNICODE=yes, the loadkeys command is performed twice - once outside the unicode check (before it), one inside it. Additionaly, as I use my custom keymap which uses UTF-8 symbols, the first (before unicode check) loadkeys command gives a warning that I should run "kbd_mode -u", which is done later (inside the unicode check). I think the initial loadkeys (before unicode check) should be moved to UNICODE=NO (else) branch of this check. Reproducible: Always Steps to Reproduce: 1. 2. 3.
sounds like you have '-u' in KEYMAPS remove it
i've removed it, but i get these warning during boot time: * Loading key mappings ... loadkeys: warning: this map uses Unicode symbols (perhaps you want to do `kbd_mode -u'?)
well i cant keep guessing at your settings so post /etc/conf.d/keymaps
Created attachment 60833 [details] my keymap config damn, i thought i posted it last time. here it is. will post my keymap next
Created attachment 60834 [details] my keymap
Same problem here.
Created attachment 63144 [details] fixed /etc/init.d/keymaps here's a fixed /etc/init.d/keymaps. i believe this is a good (not ugly) solution for this bug, and it works for me.
That basically duplicates code we have already ... did you set UNICODE="yes" in /etc/rc.conf?
yes, i did. look, your code calls loadkeys twice. it is first run before $UNICODE is even checked, and immediately bitches about UNICODE characters in my keymap (i've got my own custom keymap with unicode characters) - it warns me about these unicode characters and that i should set kbd_mode to unicode. if kbd_mode -u is run before this first loadkeys invocation, there're no problems. maybe you should move the check for $UNICODE before this first invocation and remove my code - i don't care; the important thing is: for loadkeys to not print a warning, the kbd_mode -u should be called before it.
my code checks specifically for unicode characters in the keymap, not for $UNICODE, and sets kbd_mode depending on their presence.
Understood, I think the moving might be an option. I am not sure about the autodetection though ... that might start to get high maintainence ? (Sorry, not utf8 fundy)
I'm not sure I understand your question, Martin.
Meaning, will it work for all utf8 keymaps in all setups?
i think it should, my check is very generic. i think zgrep should be used instead of grep because keymaps may be compressed, zgrep can search in both compressed and uncompressed files.
Created attachment 63349 [details, diff] keymaps.unicode well if all you need to fix this bug is run kbd_mode -u early on, then this patch should fix you right ?
yes, this patch would work too. can be commited to portage, i think
added to svn then, thanks