Ketboard driver and buffer
Re:Ketboard driver and buffer
My handler looks like this:
And here is another problem:
When pressing a key, OS prints all keys correctly but shift is not working.
Maby errors with buffer?
Loss...
Code: Select all
_IRQ1_Handler:
CLI
PUSHA
PUSHF
CALL _KBD_Handler
POPF
POPA
STI
IRET
When pressing a key, OS prints all keys correctly but shift is not working.
Maby errors with buffer?
Loss...
Re:Ketboard driver and buffer
I'm about to enter your situation...but I need to bet my kernel loaded at 1 meg....
Then we'll work together on this problem ( I have it too )...
Then we'll work together on this problem ( I have it too )...
Re:Ketboard driver and buffer
scancodes dont change for shifted keys. you neede to track shift+capslock yourself and make them uppercase, or numlock numbers/arrows, etc.
-- Stu --
Re:Ketboard driver and buffer
Ok Tom!
df:
If there something wrong?
df:
If there something wrong?
Code: Select all
if (KBD_Shift = false && CapsLock == true) KeyASCII = KBD_ASCII_KEY_S[ScanCode];
if (KBD_Shift = false && CapsLock == false) KeyASCII = KBD_ASCII_KEY_NS[ScanCode];
if (KBD_Shift = true && CapsLock == false) KeyASCII = KBD_ASCII_KEY_S[ScanCode];
if (KBD_Shift = true && CapsLock == true) KeyASCII = KBD_ASCII_KEY_NS[ScanCode];
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Ketboard driver and buffer
so, basically
Code: Select all
if (shift == caps) keyAscii = KbdAsciiKeyNS[scancode];
else keyAscii=KbdAsciiKeyS[scancode];
Re:Ketboard driver and buffer
Thanx Pype.Clicker for optimization
I forgot to do keybourd overflow protection And write = not ==
Now is only one trouble, printing key two times. But I think it will be ease to correct.
Thnx you all!
I forgot to do keybourd overflow protection And write = not ==
Now is only one trouble, printing key two times. But I think it will be ease to correct.
Thnx you all!
Re:Ketboard driver and buffer
kbd_shift ==... your setting value not comparing.Unexpected wrote: Ok Tom!
df:
If there something wrong?Code: Select all
if (KBD_Shift = false && CapsLock == true) KeyASCII = KBD_ASCII_KEY_S[ScanCode]; if (KBD_Shift = false && CapsLock == false) KeyASCII = KBD_ASCII_KEY_NS[ScanCode]; if (KBD_Shift = true && CapsLock == false) KeyASCII = KBD_ASCII_KEY_S[ScanCode]; if (KBD_Shift = true && CapsLock == true) KeyASCII = KBD_ASCII_KEY_NS[ScanCode];
-- Stu --
Re:Ketboard driver and buffer
Now corrected all bugs!
All works!
It was 3 bugs:
1) I write = not == (just typo)
2) Forgot buffer overflow
3) When key released KB_Hit must be 0 not 1
Thanx you all again!
All works!
It was 3 bugs:
1) I write = not == (just typo)
2) Forgot buffer overflow
3) When key released KB_Hit must be 0 not 1
Thanx you all again!