Out of ideas about sending ALt+Tab into VirtualBox guest OS Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Galicarnax

Out of ideas about sending ALt+Tab into VirtualBox guest OS  Topic is solved

28 May 2017, 08:10

Ok. I have VirtualBox, with Linux inside. My host is Win10. You may know that VirtualBox might work in two modes. In one of them, it grabs the keyboard entirely (except Right Ctrl, which is used to come bac to host OS). That's it - you live and type in an honest Linux machine. Alt+Tab will cycle, naturally, between the applications inside Linux, any Autohotkey scripts in the host Win10 are ignored, etc. In another mode, the keyboard is not grabbed by VirtualBox, but this is helpful only if you work with a single application in Linux, because Alt+Tab now switches only between applications of the host OS.

That has bugged be quite a lot. So when I learnt about AutoHotKey, I though - that's it! I'm saved! I can write a script, such that when the active window is VirtualBox, I can send Alt+Tab to Linux!

And yet, whichever version of a script that could do this I tried, it failed. For example, this one cause Alt+Tab to switch between host's apps as usual:
#IfWinActive Ubuntu [Running] - Oracle VM VirtualBox
!Tab:: Send !{Tab}
#IfWinActive

and this one just type "Tab" if there is an input active within Linux:
#IfWinActive Ubuntu-16.04.2 [Running] - Oracle VM VirtualBox
!Tab:: Send !Tab
#IfWinActive

I also tried different versions of Send (SendInput, SendRaw, SendEvent) - nothing works.

What am I doing wrong? Or does even a solution with AHK exists for this problem?

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: haomingchen1998, OrangeCat and 137 guests