Simulating keyboard input

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi! I'm trying to write a background app that receives input from an external
device (through the comm port) and then sends that data to the active
foreground window that has focus. So far I have gotten this working using
the "keybd_event" function to send the data to the foreground window, but it
works for local apps only. When I RDP out to another machine and set focus
on a notepad session or command prompt window on the remote machine, the data
never makes it over. Any ideas?
 
jen2276 said:
Hi! I'm trying to write a background app that receives input from an
external
device (through the comm port) and then sends that data to the active
foreground window that has focus. So far I have gotten this working using
the "keybd_event" function to send the data to the foreground window, but
it
works for local apps only. When I RDP out to another machine and set
focus
on a notepad session or command prompt window on the remote machine, the
data
never makes it over.

You may want to take a look at SendInput().

Frankly, I have no idea if it works in the remote case but I think that it
exists to work around some of the limitations of keybd_event().

Regards,
Will
 
Back
Top