USB keyboard to PS2?

Status
Not open for further replies.

kylersk

New member
Hello all,

I just purchased a Teensy++ 2.0 board and having a fun time playing with it.

In little time, I've been able to have it duplicate a keypress (awesome examples and faqs!) via USB keyboard.

Now my question: Is it possible to use the Teensy as a keyboard emulator on a PS2 port. I'm trying to replace an old key board/operator interface that is connected via PS2 port on an old piece of machinery that's running DOS.

Thanks in advance.
 
There is a library mentioned at the bottom of this page that might be a starting point:
http://playground.arduino.cc/ComponentLib/Ps2mouse

"It can be used to act as a mouse or a keyboard."

EDIT: Having delved into the zip file a bit, it implements the clocking out and parity as expected but it looks like you'd have to know the scan codes for each key you'd like to send. This is not the worst thing, but it does not seem a library for easy piping of text to the ps2 port.
 
Last edited:
I imagine that in the grand scheme of things, it might be simpler to just get hardware that does this without having to wire up a Teensy 2.0++ to do it. If you want to do it to learn how to do it, go ahead and plunge in.

Lets see, if you live in the USA, going to newegg.com I see:
Now, in a few years time, it may be that PS/2 keyboards are completely unavailable, but for now, you still can get them. :cool:
 
Michael,

I was under the impression that not all USB keyboards work with the dongles. The keyboard must be designed to work with it's own USB to PS/2 converter. So other brands of converters will not work.

Maybe I'm wrong?

The reason to try Teensy was the fact that one button press must mimic SHIFT-F1 for example.
 
Thanks, but that looks to take a PS/2 mouse as an input into the teensy.

EDIT: Nevermind, the end does state act as a device.
 
Michael,

I was under the impression that not all USB keyboards work with the dongles. The keyboard must be designed to work with it's own USB to PS/2 converter. So other brands of converters will not work.

Maybe I'm wrong?
That's why I first suggested getting a real PS/2 keyboard first, and USB keyboard with PS/2 dongle second. Those should always work. I don't remember if I've used the USB->PS/2 converter (I've used the ones that convert from PS/2 to USB), and if I used it, whether it works on random keyboards or not. It may work, or it may not.

It just seemed like a lot of effort to do something that you could easily buy an off the shelf solution cheaply. Now, sometimes you go down that route because it is fun or challenging. Or maybe you are out of cash, or need to solve a problem with parts on hand immediately. If you don't have multiple Teensy 2.0++'s, it may be a problem if the Teensy has to act as keyboard controller.
 
That's why I first suggested getting a real PS/2 keyboard first, and USB keyboard with PS/2 dongle second. Those should always work. I don't remember if I've used the USB->PS/2 converter (I've used the ones that convert from PS/2 to USB), and if I used it, whether it works on random keyboards or not. It may work, or it may not.

I do have a ps/2 keyboard on the device now. It's just a pain for the operators to remember the correct keystrokes to do certain functions. That's why I tried the teensy. I figured I could wire up push buttons, label them and have the teensy send the correct keystrokes based on one button press.

I've since found a manufacturer of custom/programmable keyboards that'll work for my application.

Ah well, was a cheap investment and now I got a Teensy that I can play with on my own (outside of work) ;)
 
Status
Not open for further replies.
Back
Top