Use SERout to send keypress event to computer
Jeanmichel
Posts: 5
Hi, sorry my last question was probably a bit blunt. I'm just wondering if it is possible to use SERout to send a keypress event or hotkey to the computer using the serial port which is used for programming the chip.
Essentially I have a hotkey setup on my computer ( vista pc ) which will launch an application when that key (say 6) is pressed, I would like the chip to send information to the computer so it thinks that key 6 has been pressed and therefore launches the application.
Really appreciate any help.
Essentially I have a hotkey setup on my computer ( vista pc ) which will launch an application when that key (say 6) is pressed, I would like the chip to send information to the computer so it thinks that key 6 has been pressed and therefore launches the application.
Really appreciate any help.
Comments
Correct me if I am wrong, but are you asking whether you can press a key on the computer keyboard/keypad, and it will retrieve some form of data from the BS2 and display it in the debug terminal? If so, I think that is very plausible, but would require some fiddling with vista hotkeys...
And finally, your last question didn't seem blunt at all, but I think it may be best to start posting replies to a thread instead of asking it all over again in a separate thread, so as to provide a clear explanation to one who has the same question...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!
*-NEW-* SD Card Adapter·Now available!· Add extra memory to your next Propeller project with ease!
What I'm looking for is actually the other way round. The BS2 has a button attached that when pressed I would like to launch an application on the computer by sending something like a sendkey event using SEROUT.
·
·After you got you Stamp code clean quit the editor and run your Stamp code.
·Than start your other application on same COM port.
·Make sure you are NOT running the Stamp editor·at the·same time!
·The OS will not let you use·the··same·COM port.
·SetStr VAR byte(5)
·....
· serStr(0) = "H"
· serStr(1) = "E"
· serStr(2) = "L"
· serStr(3) = "L"
· serStr(4) = "O"
· SEROUT 16, 16468, [noparse][[/noparse]STR serStr\5]
....
Cheers Vaclav
For example SEROUT does not do any checking if you are actually communicating.
Same goes for any other application. Most software people do not think about hardware behavior and that gets them into trouble. Since you have no editor running you are "flying blind".
I would monitor the port by some external means (LED).
Good luck
·