PS/2 Keyboard Hold and Release

Hi

I've got the PS/2 code working, I'm getting signals from the keyboard to the Serial Monitor.

Here is the code i am using: http://www.pjrc.com/teensy/td_libs_PS2Keyboard.html

My problem is that I can't figure out how to get "key up" events. I want to know when a button is pressed and when it is released.

Thanks, Árni

That doesn't look much like an Arduino to me. Did you ask over at the Chevy forum, too?

This works on a Arduino.

As i said: everything is working except the "key up" event.

As i said: everything is working except the "key up" event.

What key-up event? There is no key-up (or down) "event" defined in the library.

I know that there is no “key up” event listed but I’d like to be able to do figure out how to that.

So if someone knows how to do this then help would be appreciated.

"Key up" is just an elegant -figuration- for modern event-based languages. They are pure and nasty polling at the low level.

begin: 
if lastkey != '' {
 // key_down
 wait while lastkey != ''
 // key_up 
}
goto begin