Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
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?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
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.
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();}
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.