Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
biznatchio
Mar 31, 2001


Buglord
What you're asking for can't be done with 100% reliability. There are ways to send falsified keyup/down messages to non-active windows, but depending on how the application itself responds to those messages (whether it trusts the message, or whether it queries the keyboard state directly), that approach may not work. Typically, applications that need a better view of what's happening on the keyboard will use more strict checking of the keyboard state, which will quickly make your attempts to fake keypresses to a background app fall apart as the actual keyboard state won't match the fake messages you're trying to send.

That said though, you can use PostMessage to send WM_KEYUP, WM_CHAR, and WM_KEYDOWN messages and maybe get away with it; though given the nature of the Remote Desktop Client, I'm not very optimistic it'll work since that feels like an application that's going to want to know the full keyboard state just by the very nature of what it does.

What I'd suggest instead is to run your RDP session in a VM, then use a more traditional anti-idle utility within that VM.

Adbot
ADBOT LOVES YOU

  • Locked thread