1 Aug 2003 01:16
kernel keymap and kbd_mode
Innocenti Maresin <av95 <at> comtv.ru>
2003-07-31 23:16:33 GMT
2003-07-31 23:16:33 GMT
Hello! I use Linux console frequently, usually with KOI8-R charset (USSR cyrillic), but I also think that optional UTF-8 support is good(Continue reading)Since the original RedHat 9 russian keymap is written in KOI8-R (ignoring Unicode), it still give KOI8-R from keyboard even in UTF-8 mode. It is not right. But I found that Linux kernel's keymap is 16bit! It's possible to load Unicode character by "loadkeys" via U+nnnn notation. I supposed that inconsistence is in non-Unicode-awareness of that .kmap . Then, I converted all keycodes to Unicode, and this modified keymap gave me UTF-8. But not only in UTF-8 keyboard mode, in byte mode also :-/ Although my kernel was built with CONFIG_NLS_DEFAULT=koi8-r , no attempt to convert cyrillic to KOI8-R was made when I said "unicode_stop". Locale where I run "unicode_stop" also was koi8r. Evidently, the stupid "unicode_stop" script can't solve this problem and kernel also failed to give me desired characters' translation. Probably "loadkeys" made something incorrectly? Of course, I can generate defkeymap.c with proper Unicode values, rebuild my kernel and check there, but... It seems to me that kernel code contains no ability to translate Unicode to 8bit, so I don't go to waste my time building a new experimental kernel due to only change in defkeymap.c :-/ If I'm wrong and such kernel ability exists, my question is: HOW to use it, how to use 8bit charsets in "kbd_mode -a" (ASCII or XLATE) mode? Of course, some software may reload keymap as 8bit, but IMHO it would be not so good design. If I'm right and kernel cannot (yet) translate keyboard input to an 8bit charset, my questions are:
Since the original RedHat 9 russian keymap is written in KOI8-R (ignoring Unicode),
it still give KOI8-R from keyboard even in UTF-8 mode. It is not right.
But I found that Linux kernel's keymap is 16bit!
It's possible to load Unicode character by "loadkeys" via U+nnnn notation.
I supposed that inconsistence is in non-Unicode-awareness of that .kmap .
Then, I converted all keycodes to Unicode, and this modified keymap gave me UTF-8.
But not only in UTF-8 keyboard mode, in byte mode also :-/
Although my kernel was built with CONFIG_NLS_DEFAULT=koi8-r ,
no attempt to convert cyrillic to KOI8-R was made when I said "unicode_stop".
Locale where I run "unicode_stop" also was koi8r.
Evidently, the stupid "unicode_stop" script can't solve this problem
and kernel also failed to give me desired characters' translation.
Probably "loadkeys" made something incorrectly?
Of course, I can generate defkeymap.c with proper Unicode values,
rebuild my kernel and check there, but...
It seems to me that kernel code contains no ability to translate Unicode to 8bit,
so I don't go to waste my time building a new experimental kernel
due to only change in defkeymap.c :-/
If I'm wrong and such kernel ability exists, my question is:
HOW to use it, how to use 8bit charsets in "kbd_mode -a" (ASCII or XLATE) mode?
Of course, some software may reload keymap as 8bit,
but IMHO it would be not so good design.
If I'm right and kernel cannot (yet) translate keyboard input to an 8bit charset,
my questions are:
So, VGA text seems not to be an acceptable solution for East Asia.
> I am looking forward to linuxconsole project
>
RSS Feed