
So the WinActivate will let the taskbar grab focus from remote login application. This function also sets the founded taskbar as default window. IfWinNotExist will found the handler of taskbar, and it should not expected to fail. I still have not figured out which window of local machine actually handles/response the Alt-Tab keystroke, so I wasted one hotkey stroke for local machine gaining focus from remote login application. Lose focus from remote machine by hit LWin & Tab. So we need to track the last active window, and do hotkey register only when active window is switched. So we need to check which window is active and register proper hotkeys periodically.Īs we talked above, Alt-Tab has internal state, and multi registration will break the internal state. Most remote logic application will grab the keyboard input and let previous registered hotkey invalided. Re-register HotKeys on Focus Switchįirst, we should re-register hotkeys when focus is switched between local and remote machine. The following steps explain how we can solve this problem by writing a AutoHotKey script. It is difficult to trace the sequence and translate it into remote machine, so local machine would better use the remapped Alt-Tab. The sequence should be well traced during the remapping process. We have two options here: local operations remapped Alt-Tab, or remote operations remapped Alt-Tab.Īlt-Tab is a little different from normal hotkeys, because Alt key can be in hold-position while Tab key can be pressed and release for window navigation.
