Page 1 of 1

Keyboard duplicates the input

Posted: Sun Jun 16, 2013 5:00 pm
by CocaCola
Hello.
I've set up interrupts and the PIC, and registered a custom handler to IRQ1.
The problem is, when I press a key it is echoed twice on the screen.

I've read through these for a quick solution, with no luck:
http://forum.osdev.org/viewtopic.php?f= ... 0&start=15
http://wiki.osdev.org/PS2_Keyboard

If this is a "key K was released" event, what can I do to ignore it, or at least differentiate between it and "key K was pressed" event?

Re: Keyboard duplicates the input

Posted: Sun Jun 16, 2013 5:16 pm
by Casm
CocaCola wrote:Hello.
I've set up interrupts and the PIC, and registered a custom handler to IRQ1.
The problem is, when I press a key it is echoed twice on the screen.

I've read through these for a quick solution, with no luck:
http://forum.osdev.org/viewtopic.php?f= ... 0&start=15
http://wiki.osdev.org/PS2_Keyboard

If this is a "key K was released" event, what can I do to ignore it, or at least differentiate between it and "key K was pressed" event?
You get two interrupts - one for a keypress, and one for a key release. The release has bit seven of the scan code set, whilst the keypress has it clear.