[kbd] [PATCH] loadkeys: Auto-convert “traditional”/Unicode keysyms
Alexey Gladkov
gladkov.alexey at gmail.com
Fri Apr 17 03:01:09 MSD 2009
16.04.2009 19:45, Michael Schutte wrote:
> Do you do this right after the above commands, or after you restored
> Unicode mode? I guess it’s the latter; at least as far as I can see,
> the two commands behave identically when they are run in immediate
> succession.
I tested exactly like that:
<user>$ src/unicode_stop
<user>$ export LANG=ru_RU.koi8r
<user>$ setfont data/consolefonts/koi8r-8x16
<root># loadkeys data/keymaps/i386/qwerty/ruwin_cplk-KOI8-R.map
<user>$ < I getting correct chars when I typing a russian text >
<user>$ dumpkeys -n > dump-loadkeys.old
<root># src/loadkeys data/keymaps/i386/qwerty/ruwin_cplk-KOI8-R.map
<user>$ < I getting wrong chars when I typing a russian text >
<user>$ dumpkeys -n > dump-loadkeys.new
<root># loadkeys data/keymaps/i386/qwerty/ruwin_cplk-KOI8-R.map
<user>$ < correct chars again >
> charset "koi8-r"
>
> at the beginning of ruwin_cplk-KOI8-R.map. Can you confirm this?
It does not help. But the broken simbols are different.
I see difference in "dumpkeys -n" output (see attach).
Did I miss something?
>> How do you test this patch?
> Pretty much the way you do: loadkeys, typing some things,
Hmmm ... you typing in what language?
> verifying that dumpkeys doesn’t show different results (and if so, whether the
> differences are intended by my patch).
see attach.
> I’d say it should be used just the same way as before, just that it
> should work regardless of the input file’s encoding. As long as this
> keymap file has a “charset” specification, that is; I have to admit that
> I didn’t consider that so many .map files don’t feature such a line.
> Still, this shouldn’t be a regression: When the input encoding and the
> console mode (XLATE/Unicode) are compatible, my patch shouldn’t change
> the behaviour.
Your patch will change the behaviour. At least for the russian keymaps
will need to add "charset" directive. We have 4 charsets (koi8-r,
cp1251, cp855, iso8859-5 and utf8). Without "charset" you do not know
what encoding is used in keymap.
> The true reason why I want to push this, though, is that Debian’s
> version of kbd has had a similar patch since 2004.
I want to be completely sure it's working with old keymaps.
> I’d like to get rid of this divergence without losing its useful features.
This is a good reason. :)
> This is why I’ve cleaned it up and why I’m discussing it with you now.
I am concerned keymaps legacy. We have a lot of keymaps that are not
added to the kbd package. Your patch should support the old behaviour
for them. Probably would be better to implement a new option to
enable/disable autodetection.
> Thanks for you patience :-)
No problem :)
--
Rgrds, legion
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dump-loadkeys.new.bz2
Type: application/x-bzip2
Size: 4951 bytes
Desc: not available
URL: <http://lists.altlinux.org/pipermail/kbd/attachments/20090417/abe61fb2/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dump-loadkeys.old.bz2
Type: application/x-bzip2
Size: 5035 bytes
Desc: not available
URL: <http://lists.altlinux.org/pipermail/kbd/attachments/20090417/abe61fb2/attachment-0003.bin>
More information about the kbd
mailing list