Re: small addition to keyboard driver propose with patch

Stanislav V. Voronyi (stas@cnti.uanet.kharkov.ua)
Mon, 28 Dec 1998 12:40:37 +0200


In message <19981227163927.A7165@albireo.ucw.cz> Martin Mares writes:

>Hello,

>> This is a small, but as for me useful patch for
>> drivers/char/keyboard.c. The main idea is using console
>> unicode table to translate unicode keysyms to ascii symbols
>> when in keymap defined some U+xxxx chars, but keyboard in
>> in XLATE mode. For example I do
>>
>> setfont koi8-8x16 -u koi8.uni
>> loadkeys koi8-utf
>>
>> and if I type 'kbd_mode -u' my keyboard generate UTF-8 2-bytes
>> sequences for each russian letter, but if I set 'kbd_mode -a'
>> keyboard generate koi-8 codes for russian letters except of
>> UTF without reloading keymap by loadkeys.

> It looks OK, but I think it should use inverse_translate()
>instead of conv_uni_to_pc().

> The conv_uni_to_pc() function converts Unicode to font encoding
>as opposed to inverse_translate() which is an inversion of
>translate[], therefore it converts Unicode to character set
>used in userland.

Not true. inverse_translate() convert font position
(not unicode) to charset.

That was a first version. In latest release to be
independed from loaded font/console translation I use
inverse_translate(conv_uni_to_pc(unicode_symbol)). There is
only way to be correct in any case.

Look at:
ftp://linux.esc.kharkov.com/pub/Linux/myown/keyboard.patch

SY, Stanislav Voronyi.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/