386
-
Vstupnφ za°φzenφ
-
Klßvesnice
-
Item 4662
Otßzka
Mßm takov² problΘm a pot°eboval bych v∞d∞t, jestli se s tφm n∞kdo pot²kß taky, p°φpadn∞ jestli ho vy°e╣il.
Mßm nainstalovan² RH8, locale nastavenΘ na cs_CZ:UTF8 klßvesovß mapa v konzoli je cz-lat2 a mapa v xwindows je cz. V╣echny ΦeskΘ znaky, kterΘ jsou p°φmo na klßvesnici, tj. na klßvesßch 1-0 fungujφ bez problΘm∙, ale nefungujφ mrtvΘ klßvesy. Na textovΘ konzoli nefungujφ v∙bec, v xwindows jsou problΘmy hlavn∞ s hßΦkem, nelze napsat t°eba znaky ≥, ╗, ∩, atd. SystΘm mrtvou klßvesu jakoby akceptuje ale po zmßΦknutφ dal╣φho znaku, t°eba n, se nenapφ╣e nic.
Kdybyste v∞d∞li n∞kdo co s tφm, ozv∞te se prosφm.
Odpov∞di
Je╣t∞ up°esn∞nφ: pod XWindows pou╛φvßm GNOME
Ako mate nastavene locales - premenne LC_* ?
LC_CTYPE musi byt nastavene na sk_SK (ehm, cz_CZ :)
Gnome-2.0 m∞lo ve star╣φch verzφch chybu a neznalo ΦeskΘ mrtvΘ klßvesy (tu╣φm a╛ do gtk-2.0.7). Samostatn² patch je zde.
V textovΘ konzoli to nechodφ a z°ejm∞ je╣t∞ n∞jakou dobu chodit nebude. Patch je zde (pozor, poru╣φte tφm binßrnφ kompatibilitu jßdra):
diff -Nurd linux.orig/drivers/char/keyboard.c linux/drivers/char/keyboard.c
--- linux.orig/drivers/char/keyboard.c Mon Oct 16 21:58:51 2000
+++ linux/drivers/char/keyboard.c Fri Sep 21 17:58:10 2001
@@ -151,7 +151,7 @@
/* N.B. drivers/macintosh/mac_keyb.c needs to call put_queue */
void put_queue(int);
-static unsigned char handle_diacr(unsigned char);
+static ushort handle_diacr(unsigned char);
/* kbd_pt_regs - set by keyboard_interrupt(), used by show_ptregs() */
struct pt_regs * kbd_pt_regs;
@@ -541,12 +541,24 @@
static void do_self(unsigned char value, char up_flag)
{
+ ushort v;
if (up_flag)
return; /* no action, if this is a key release */
- if (diacr)
- value = handle_diacr(value);
-
+ if (diacr) {
+ v = handle_diacr(value);
+ if (kbd->kbdmode == VC_UNICODE) {
+ to_utf8(v & 0xFFFF);
+ return;
+ }
+
+ /*
+ * this makes at least latin-1 compose chars work
+ * even when using unicode keymap in non-unicode mode
+ */
+ value = v & 0xFF;
+
+ }
if (dead_key_next) {
dead_key_next = 0;
diacr = value;
@@ -582,18 +594,18 @@
if (up_flag)
return;
- diacr = (diacr ? handle_diacr(value) : value);
+ diacr = (diacr ? (handle_diacr(value) & 0xFF) : value);
}
/*
* We have a combining character DIACR here, followed by the character CH.
- * If the combination occurs in the table, return the corresponding value.
+ * If the combination occurs in the table, return the corresponding UCS2 value.
* Otherwise, if CH is a space or equals DIACR, return DIACR.
* Otherwise, conclude that DIACR was not combining after all,
* queue it and return CH.
*/
-unsigned char handle_diacr(unsigned char ch)
+ushort handle_diacr(unsigned char ch)
{
int d = diacr;
int i;
diff -Nurd linux.orig/include/linux/kd.h linux/include/linux/kd.h
--- linux.orig/include/linux/kd.h Sat Jun 24 06:31:24 2000
+++ linux/include/linux/kd.h Fri Sep 21 17:52:54 2001
@@ -115,7 +115,8 @@
#define KDSKBSENT 0x4B49 /* sets one function key string entry */
struct kbdiacr {
- unsigned char diacr, base, result;
+ unsigned char diacr, base;
+ unsigned short int result; /* holds UCS2 value */
};
struct kbdiacrs {
unsigned int kb_cnt; /* number of entries in following array */
|