Crazy keyboard question...

Axoliien

Senior member
Mar 6, 2002
342
0
0
Ok, so here's the deal. I want to make it so I can pulse a specific key on my keyboard, say the letter t, every set number of n seconds. Now I can set up a pretty simple mechanical design using a 555 timer, small weight, and electromagnet circuit to automate the project, but is there a way to make the system, or keyboard even, think that a specific button is being pressed in a repeated fashion?

Originally, I had thought maybe a simple script could pulse the bus and trick the system, making Windows accept that every n seconds the key is being pressed, but I can't find anything about it anywhere.

Moreover just a home project, thought it would be useful for automating simple run-time testing...
 

AndyHui

Administrator Emeritus<br>Elite Member<br>AT FAQ M
Oct 9, 1999
13,141
17
81
You can write a VBA/WSH script for Windows, using the SendKeys function, and simply loop that script.
 

CrazyDe1

Diamond Member
Dec 18, 2001
3,089
0
0
Hook a microcontroller up in parallel w/ the keyboard w/ 2 PS/2 ports. You're going to have to transmit the scan code for the t key which is 2C hex. When you transmit, you're going to have to pull the clock low and start transmitting at 10-20khz. 1 start bit, 8 data bits, 1 parity bit and 1 stop bit. It's a lot easier to do this with a microcontroller and some code than some circuit you build. If I remember right I think you transmit to port 60h of the 8042 microcontroller on your motherboard, but I'm not sure.
 
Nov 19, 2002
72
0
0
Never mess with hardware to do something software can do even better. Use the Win32 SendInput API functions, in whatever language of your choice. Or gimme $50 and I'll write one for you with a cute little interface.
 

pX

Golden Member
Feb 3, 2000
1,895
0
71
I'd do it the easy way. Get a freeware macro recording program, press record then T, then in how-many-ever seconds hit the program's hot key for "restart".