Sending keystrokes from PICAXE to PS2 input

tom91

New Member
I'm looking to build something similar to this:
http://www.raildriver.com/products/raildriver.php
albeit not as advanced or complex. In order to control the simulator (Kuju Rail Simulator or Microsoft Tran Sim) I need to be able to send 'keystrokes' to the computer from a PICAXE. I know a PICAXE can read characters from a PS2 keyboard, but can connect to the computer's PS2 keyboard connector and 'pretend' to be a keybaord?
Otherwise, how difficult would it be to send commands via a normal serial connection to a VB script (or similar), which would then have to 'simluate' keystokes? I haven't really done much in VB, just C.
 

papaof2

Senior Member
Be aware that a keyboard emulator needs to respond to the PC's boot-up check for a keyboard or the PC will not know the keyboard is there (this is an option in some BIOS's).

Have a look at the PS2 protocol description at these sites:
http://www.computer-engineering.org/ps2protocol/
http://www.networktechinc.com/ps2-prots.html
http://www.beyondlogic.org/keyboard/keybrd.htm
http://www.cs.cmu.edu/afs/cs/usr/jmcm/www/info/key2.txt


And some info on PS2 keyboard emulators:
http://www.motherboardpoint.com/t88167-ps2-keyboard-emulation.html
http://jledger.proboards19.com/index.cgi?board=dtvhacking&action=display&thread=1171796543&page=1


There are commercial emulators:
http://www.newegg.com/Product/Product.aspx?Item=N82E16817802066 $55US

And a library for BASCOM-AVR:
http://www.dontronics-shop.com/PS2-AT-Mouse-and-Keyboard-emulator-for-Bascom-AVR-p-16318.html

VB6 serial comm is relatively easy to work with or you can get a serial "wedge" (serial-to-keyboard-buffer driver) that takes whatever comes in on a serial port and sends it to a specific program (or the active window).
This one is $35: http://www.billproduction.com/
If you can find a copy of Bill Redirect 1.2R, it's free - check the download sites that actually archive files (instead of linking to the source site). I use 1.2R to interface with an old barcode scanner (to catalog books, CDs, and videos).

John
 

tom91

New Member
Thanks for the reply. The Bill Redirect software should be just the job, much easier than messing around with PS2 interfacing or VB scripts.
 

Calamitie

Member
Making a program to send keys is super simple in VB6, all you would do is use the built-in SendKeys function:

Code:
SendKeys "Michael"
(where "Michael" would be the serial data)
 
Top