Question about a real keyboard on 8042

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.
Post Reply
doxrobot
Member
Member
Posts: 30
Joined: Wed May 15, 2013 10:14 am

Question about a real keyboard on 8042

Post by doxrobot »

For some reason this dosen't happen in bochs, but on my real machine when you hold down a key without letting it up, the 8042 controller will keep firing interrupts. This is normal behavior correct?

I just want my interface to be as if when the user holds down a key, it will continue to print the key, but in bochs when the user holds a key, it will only print once until the key is released.

Maybe I need to update bochs. What is normal behavior?
Casm
Member
Member
Posts: 221
Joined: Sun Oct 17, 2010 2:21 pm
Location: United Kingdom

Re: Question about a real keyboard on 8042

Post by Casm »

By default Bochs should fire an interrupt every 250ms, unless you have accidentally changed it.
sounds
Member
Member
Posts: 112
Joined: Sat Feb 04, 2012 5:03 pm

Re: Question about a real keyboard on 8042

Post by sounds »

The "typematic rate" and "typematic delay" are set in the keyboard itself, in the controller chip. Not the 8042 controller in the system.

If I hold down A, I should receive the following:

A pressed (IRQ fires)
(typematic delay)
A pressed (IRQ fires)
(typematic rate)
A pressed (IRQ fires)
(typematic rate)
A pressed (IRQ fires)
...

Only when I release A, I should get:
A released (IRQ fires)

Bochs should also show that.

Setting the rate & delay involves sending bytes to the keyboard controller.
Post Reply