_ RU.LINUX (2:5077/15.22) ___________________________________________ RU.LINUX _
From : Igor Kopylov 2:5020/1188.26 12 May 98 15:27:14
Subj : Re: Индикатоp кодиpовки
________________________________________________________________________________
Приветствую тебя, All!
По пpоcьбам тpyдящиxcя маcc,
* Forwarded by Igor Kopylov (2:5020/1188.26)
* Area : #NETMAIL
* From : Serg Oskin, 2:5020/20@fidonet (Пятница Май 08 1998 19:57)
* To : Igor.Kopylov
* Subj : Re: Индикатоp кодиpовки
In article <894554684@p26.f1188.n5020.z2.ftn>,
Igor Kopylov <Igor.Kopylov@p26.f1188.n5020.z2.fidonet.org> writes:
> Приветствую тебя, All!
>
> Kто делал или знает как делаетcя - индикатоp RUS/LAT как cделать?
> Боpдюpчиком цветным чтоб или еще как нибyдь показывал.
Вот завалялось, для 2.x.x сам докрутишь. :)
Hello! There is a linux-2.0.18 console patch for displaying AltGr
keyboard state as console color border (an additional led). You can swap
scroll lock and AltGr leds. This is useful for Cyrillic, Greek and
others, who use AltGr keyboard lock state to enter chars from 128..255
range.
Regards,
Sergey Ya. Korshunoff p5.f434.n5020.z2.fidonet.org
PS: Thanks Vladimir Goncharov and Seva Semenov for support.
/* note: 0x4B00-0x4B4E all have had a value at some time;
don't reuse for the time being */
-/* note: 0x4B60-0x4B6D, 0x4B70, 0x4B71 used above */
+/* note: 0x4B4F, 0x4B60-0x4B6D, 0x4B70, 0x4B71 used above */
#endif /* _LINUX_KD_H */
- ---8<------------------------------------------->8-------------------
# console border as aditional led for displaying AltGr keyboard state
#
- --- linux/drivers/char/keyboard.c.old Thu Jul 25 21:24:49 1996
+++ linux/drivers/char/keyboard.c Sun Mar 9 21:39:20 1997
@@ -81,6 +81,11 @@
unsigned char kbd_read_mask = 0x01; /* modified by psaux.c */
+unsigned char con_border_enable = 0;
+unsigned char con_border_color1 = 4;
+unsigned char con_border_color0 = 0;
+unsigned char con_border_swapleds = 0;
+
/*
* global state includes the following, and various static variables
* in this module: prev_scancode, shift_state, diacr, npadch, dead_key_next.
@@ -1090,7 +1095,7 @@
}
/*
- * The leds display either (i) the status of NumLock, CapsLock, ScrollLock,
+ * The leds display either (i) the status of NumLock, CapsLock, ScrollLock,
AltGr,
* or (ii) whatever pattern of lights people want to show using KDSETLED,
* or (iii) specified bits of specified words in kernel memory.
*/
@@ -1103,7 +1108,7 @@
}
void setledstate(struct kbd_struct *kbd, unsigned int led) {
- if (!(led & ~7)) {
+ if (!(led & ~15)) {
ledioctl = led;
kbd->ledmode = LED_SHOW_IOCTL;
} else
@@ -1120,7 +1125,7 @@
void register_leds(int console, unsigned int led,
unsigned int *addr, unsigned int mask) {
struct kbd_struct *kbd = kbd_table + console;
- if (led < 3) {
+ if (led < 4) {
ledptrs[led].addr = addr;
ledptrs[led].mask = mask;
ledptrs[led].valid = 1;
@@ -1131,11 +1136,29 @@