Page 2 of 2
Re: keyboard ?
Posted: Thu Apr 08, 2010 9:56 am
by Combuster
I am running into the problem of also not knowning if somebody pushed the same button twice or if I am just reading it to fast from port 0x60.
Does it make sense if the controller tells you that a button was pressed down multiple times
without being released?
Re: keyboard ?
Posted: Thu Apr 08, 2010 10:22 am
by Selenic
Combuster wrote:I am running into the problem of also not knowning if somebody pushed the same button twice or if I am just reading it to fast from port 0x60.
Does it make sense if the controller tells you that a button was pressed down multiple times
without being released?
I seem to remember Bochs sending multiple keydown events without a keyup, if you kept the key held, but that might be due to the Windows' key-repeat rather than due to anything Bochs-related.
Re: keyboard ?
Posted: Thu Apr 08, 2010 12:42 pm
by neon
Hello,
The "key repeat" isnt a Windows thing; its a feature on the keyboard controller (Command 0xF3 - Set Autorepeat delay and repeat rate.) Because Bochs emulates the hardware, it also emulates this functionality.
Re: keyboard ?
Posted: Thu Apr 08, 2010 2:21 pm
by Gigasoft
Is their someway I can check if a new key was pressed before I start reading from port 0x60 for the scancode for it. I am running into the problem of also not knowning if somebody pushed the same button twice or if I am just reading it to fast from port 0x60.
To determine whether a new byte has been received, you read port 64h and check bit 0. Bit 5 then tells you if the byte was from the mouse port or the keyboard port.