Shop OBEX P1 Docs P2 Docs Learn Events
keystrokes to non-debug window — Parallax Forums

keystrokes to non-debug window

RealLaxRealLax Posts: 14
edited 2006-05-03 20:41 in BASIC Stamp
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?

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-05-03 20:28
    Not keystrokes, but it can send serial data to an application that accepts it. The Debug Terminal window is a simple serial application.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-05-03 20:38
    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.
  • Tom WalkerTom Walker Posts: 509
    edited 2006-05-03 20:41
    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...
Sign In or Register to comment.