if several keys share some of the codes, then the keyboard is unusable
[That seems unlikely. /quote]Unlikely, but true. There were eight pairs of keys with the same codes, and there were other inexplicable oddities. QuoteIt's not like a PS2 keyboard is rocket scienceTrue, but it is muddled science. The assignment of the key codes in the original PS/2 keyboards must have made sense on some level (perhaps on a physical level of the pcb) but they bear no relationship to each other or to the ASCII codes which they have to be translated into.And to further confuse the issue the work of detecting, debouncing, buffering and interpreting keypresses was divided between a "keyboard encoder" in the keyboard and a " "keyboard controller" in the host computer, the two being in two-way communication. So when we try to interface an Arduino board with a PS/2 keyboard we are working with half a system. And even worse, the Parallax PS/2 keyboard, as it turns out, is PS/2 in name only. It does have PS/2 style connector. However, I have it sorted out now, or at least to the extent that the keyboard will serve my purposes. I contacted Parallax support staff and they sent me a list of the key code assignments in their keyboard. They have assigned the codes rationally, i.e. like the ASCII codes, and have kept the printing and non-printing codes in separate groups. The authors of the PS2Keboard.h and .cpp files did some reassigning of codes in an attempt to make the PS/2 mish-mash more reasonable. So, the selective reassignment of codes in PS2Keyboards.pss and the total reassignment of codes in the Parallax keboard gave me a system in which several keys were assigned the same code (this happened eight times), some keys had no code, and some printable keys were given control functions and vice versa. As a kludge I went into the PS2Keyboard library files on my PC and re-reassigned some key codes to resolve most of the conflicts and I now have a working keyboard that talks to my Arduino Uno. The Parallax Mini keyboard is a nice little 88-key keyboard, with full-size keys Only the numeric kepad keys have been omitted. Check it out athttp://tinyurl.com/62h7y7qNow if someone would write a library for it the world would be a better place
It's not like a PS2 keyboard is rocket science
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16