Remote Desktop Woes – AutoHotKey to the Rescue!

One of the big issues with using Remote Desktop is that sometimes it doesn’t always send the right keystrokes to the right computer.  Here is how I used AutoHotKey to fix that.ADHERER

Windows Remote Desktop, in later versions, has options for how you want to use the Windows key.  Do you want it to go to the local computer or to the remote one?  That’s great for keyboard power-users like myself who do nearly everything from the Win-R “Run” box.

Unfortunately, however, my company uses Cisco’s tools for remote connection and VPN activities and when I use Remote Desktop via their software, the Windows key always goes to the local computer.  It really puts a crimp in my productivity.

Well, here comes AutoHotKey to the rescue!

Some keys are faithfully sent to the remote machine.  Ctrl and Alt are definitely among them.  So if I could somehow remap those keys to simulate a Windows keypress, I would be in great shape.

Well, as it turns out, AutoHotKey does this very well.  But I really have to program individual commands.  My most common is Win-R, so I used the following line":

^!r::SendInput #r

to remap Ctrl-Alt-r to Win-R.  Now when I press Ctrl-Alt-r from my local machine, the remote machine opens the Run box just as if I’d pressed Win-r.  I also did the same with Win-d, which minimizes all windows to show the desktop:

^!d::SendInput #d

However, it sure would be nice to have a key remapped globally to the Windows key.  Well, hey, the CapsLock key is nearly useless in its current role, so here’s a bit of AutoHotKey code I picked up somewhere:

;remap Shift-Capslock to Capslock and Capslock to Win
+Capslock::Capslock
Capslock::LWin

As you can see, this remaps Shift-CapsLock to the CapsLock function.  So if I still want to turn CapsLock on, I can.  And the CapsLock key is remapped to the left Windows (LWin) key.

I haven’t tested this one on Remote Desktop yet.  It might toggle my CapsLock on the local machine, which could cause all manner of weirdness.  But it sure works on my remote machine when I’m sitting at it locally.  CapsLock-r opens the Run box, CapsLock-e opens Explorer, etc.

So, what else do you all use AutoHotKey to help you do?  I’m always looking for ideas.  Give them to me in the comments below.


Filed under AutoHotKey, Windows

Leave a Reply

** Comment Policy: Real simple, don't spam. That means refrain from the use of keywords in your anchor text and don't use your company/website in the name field. We reserve the right to edit/delete your comments as we choose. All first comments will go through moderation.

Stay Connected with Geekwerks


Recent Comments

  • Maurita Sarjeant: Nothing in life is really easy. One just must keep plugging and plugging at it.
  • Michael Swanberg: Yes, actually, I do care. Link to my articles all you like, but copying them is a violation of...
  • Michael Wallace: Yo , I am making a new popular forum and I think some of your articles would really fit in well....
  • Isaias Buchser: Or leave it at home if you’re not going to use it.
  • Iphone NL: I believe open is always a better choice. From the communities perspective, you are helping them a great...

Ad