I use VirtualBox on Windows 10 host, and my guest OS is linux openSUSE. Since I still need many windows control hotkeys, I do not use Auto Capture Keyboard in VirtualBox. As a drawback, I can't use Alt+Tab to cycle through applications when I am inside Linux, and instead I end up with cycling through windows applications. I'd like to fix that with AutoHotKey: when VirtualBox window is active, reassign Win+Tab so that it sends Alt+Tab to Linux (instead of popping up windows desktop chooser). But whatever script I figure out, it doesn't work the way I want. E.g., this one has no any effect at all:

#IfWinActive, openSUSE13.2 [Running] - Oracle VM VirtualBox
LWin & Tab:: ControlSend, QWidget7, !{Tab}

(though if in the second line I write !Tab instead of !{Tab}, it works like Alt+T shortcut in Linux applications). I also used Send and SendInput instead of ControlSend, but that doesn't help. What's wrong with that?

  • I think your goal is not achievable. no matter to which control you send the keys, be it Virtualbox or firefox or whatever, the key sequence !{Tab} will always be captured by Windows itself. – David Dai Dec 21 '15 at 5:58
  • But it seems that the guest OS inside the VirtualBox does receive the signal - as I wrote, if I write "Send !Tab", and if I then press Alt+Tab, this does act in the guest OS, but it acts in a wrong way (as if I pressed Alt+T). So the signal is there, the only thing left is to interpret it correctly. – Maximko Dec 21 '15 at 13:59
  • Sure Alt+T can be passed to the guest OS cause it is not trapped by Windows, but I'm pretty sure ALT+TAB cannot. – David Dai Dec 22 '15 at 2:35
  • Well, probably I failed to write it more explicitly :) The point is that when I press the key combination Alt+Tab on my physical keyboard, the signal is sent to the guest OS, but it is interpreted incorrectly. Nevertheless, that implies that the Alt+Tab signal does pass to the guest OS. – Maximko Dec 22 '15 at 4:13
  • I think it's passed incorrectly, instead of interpreted incorrectly. What actually passed to the Virtualbox Window I think is, Alt+t, then a, then b. – David Dai Dec 22 '15 at 4:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.