Page 1 of 1
Num/Caps/Scroll - Lock
Posted: Sun Feb 16, 2003 5:57 am
by Hornet
Hello.
How can i activate the Num/Caps/Scroll Lock LEDs in Protected Mode?
thx Hornet (german)
Re:Num/Caps/Scroll - Lock
Posted: Sun Feb 16, 2003 6:18 am
by df
you dont. they are toggles, you have to keep the state yourself. and have your keyboard driver interpret keypresses based on its state.
Re:Num/Caps/Scroll - Lock
Posted: Sun Feb 16, 2003 7:25 am
by chrisa128
Hi,
To actually get the LEDs to light up you have to send a command to the keyboard, here is the one from my Keyboard Driver....
Code: Select all
write_kbd(0x60, 0xED); temp = 0;
if(kbd_status & KBD_META_SCRL)
temp |= 1;
if(kbd_status & KBD_META_NUM)
temp |= 2;
if(kbd_status & KBD_META_CAPS)
temp |= 4;
write_kbd(0x60, temp);
return 0;
The first line tells the keyboard u want to turn the LEDS on/off. The other checks to see which LED you want to set. The last line sets it. The bottom three bits actually tells it the led.
Hope this helps,