Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Context description: As a Windows admin, I often use mstsc.exe from my client machine to connect to Windows server remote desktop. I realize that,when mstsc is the active window on my client machine:

  • Alt+PgUp acts like Alt+Tab inside the server
  • Alt+PgDn acts like Alt+Shift+Tab inside the server

But, I firmly believe that Microsoft's PgUp/PgDn designation here is counter intuitive. Reason: [ Holding down Alt ] and [ press Tab multiple times ] cycles through windows from top to bottom in z-order(Windows API terminology), so it is more like a page down operation. So, Alt+PgDn should map to Alt+Tab instead of Alt+Shift+Tab .

Therefore, I tried to use Autohotkey to do the key mapping. According to official doc, I write the snippet:

#IfWinActive ahk_class TscShellContainerClass

!PGUP:: !PGDN
!PGDN:: !PGUP

#IfWinActive ahk_class 

It almost work, but fails eventually. The symptom is: When I press Alt+PgDn, the switching window appears and the focus moves, but on releasing the keys, the switch does not actually occur - VERY STRANGE!

enter image description here

Can someone help me out?

Autohotkey version: 1.1.13.01 , Client machine is Windows 7 x64, server machine is Windows Server 2008 R2 and Windows Server 2003.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.