Re: small addition to keyboard driver propose with patch

Martin Mares (mj@ucw.cz)
Sun, 27 Dec 1998 16:39:27 +0100


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.

Have a nice fortnight

-- 
Martin `MJ' Mares   <mj@ucw.cz>   http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
"And don't forget to feed your computer virus..."

- 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/