How can I put characters directly into the keyboard buffer?
-
Hi all, I want to write a little tool which reads some characters from the serial port and puts them directly into the keyboard buffer, so that they appear in the currently active application at the current cursor position. Handling of the seral port isn't a problem, but can anyone give me a hint how to emulate a keystroke from within a program (C/C++, WinXp) :confused: Thanks! Reinhard
-
Hi all, I want to write a little tool which reads some characters from the serial port and puts them directly into the keyboard buffer, so that they appear in the currently active application at the current cursor position. Handling of the seral port isn't a problem, but can anyone give me a hint how to emulate a keystroke from within a program (C/C++, WinXp) :confused: Thanks! Reinhard
-
Hi all, I want to write a little tool which reads some characters from the serial port and puts them directly into the keyboard buffer, so that they appear in the currently active application at the current cursor position. Handling of the seral port isn't a problem, but can anyone give me a hint how to emulate a keystroke from within a program (C/C++, WinXp) :confused: Thanks! Reinhard
You can use the
SendInput
function for that purpose but I don't think this is a great idea. What kind of application are you using ? Console app or windows app ? In both cases this won't work as expected. In the console app, you can only see text appear if the program reaqire some entry (cin for example) and for the window application, the control inside which you want to display the text needs to have the focus. Why don't you choose an easier solution: read the data from the serial port yourself and print it yourself. It is much more simple ! -
Hi all, I want to write a little tool which reads some characters from the serial port and puts them directly into the keyboard buffer, so that they appear in the currently active application at the current cursor position. Handling of the seral port isn't a problem, but can anyone give me a hint how to emulate a keystroke from within a program (C/C++, WinXp) :confused: Thanks! Reinhard
-
Hi all, I want to write a little tool which reads some characters from the serial port and puts them directly into the keyboard buffer, so that they appear in the currently active application at the current cursor position. Handling of the seral port isn't a problem, but can anyone give me a hint how to emulate a keystroke from within a program (C/C++, WinXp) :confused: Thanks! Reinhard
-
Hi all, I want to write a little tool which reads some characters from the serial port and puts them directly into the keyboard buffer, so that they appear in the currently active application at the current cursor position. Handling of the seral port isn't a problem, but can anyone give me a hint how to emulate a keystroke from within a program (C/C++, WinXp) :confused: Thanks! Reinhard
Many thanks to all of you!!! I've tried some of the hints and esp. the SendKeys object helped a lot. You've saved my day... :-D Reinhard
-
Many thanks to all of you!!! I've tried some of the hints and esp. the SendKeys object helped a lot. You've saved my day... :-D Reinhard
reinhard_jd wrote:
I've tried some of the hints and esp. the SendKeys object helped a lot.
you can try keybd_event Function tooo
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV