View Full Version : keystrokes to non-debug window
05-04-2006, 03:26 AM
I don't want keystrokes to go to a debug window, but to the front application.
For example, if I make Notepad the foremost application, can the Stamp board send keystrokes to that app?
Is this possible?
Basically I am asking if a Stamp board can send keystrokes to the computer itself?
05-04-2006, 03:28 AM
Not keystrokes, but it can send serial data to an application that accepts it. The Debug Terminal window is a simple serial application.
Applications Engineer, Parallax
05-04-2006, 03:38 AM
The BS2 can send "keystrokes" over a serial port, to a program (written in Visual Basic, perhaps) which opens that serial port, recieves the 'keystrokes', and then sends them using "SendKey" to another Windows program.
But you must have an intermediary program which reads the serial port, and knows enough about Windows to interface with the Windows run-time environment. That being true, you might as well put the 'keystrokes' into the intermediary program in the first place.
Now, I understand there is a chip that will provide an interface between a BS2 and a PC keyboard port, and send 'real' keystrokes into your PC. I've never used it though.
05-04-2006, 03:41 AM
Remember that the Stamp in a typical application only "sends" keystrokes to the serial port on the PC. It is up to the programming on the PC to do something with those signals. It just so happens that Hyperterminal and the Debug window are programmed to display those signals as text on the screen. Notepad is programmed to respond to keystrokes...not to "listen" to the serial port. If you are interested in capturing those signals, there are several products that are designed to allow you to do so...depending on your eventual goal.
Truly Understand the Fundamentals and the Path will be so much easier...