Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

Did you try adding UP hotkeys as well? Something like this...

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

That might not be the exact syntax for sending the up sequence (it may be something like Send !{PGDN UP}, but just an idea to test.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.