Does it make sense if the controller tells you that a button was pressed down multiple times without being released?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.
keyboard ?
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: keyboard ?
Re: keyboard ?
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.Combuster wrote:Does it make sense if the controller tells you that a button was pressed down multiple times without being released?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.
Re: keyboard ?
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.
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.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
Re: keyboard ?
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.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.