2
votes

I installed virtualbox in my Windows 7 and installed the Ubuntu as guest os.

I want to press a key(Alt+F1) to activate the Ubuntu and send continue send the same key to Ubuntu and then Ubuntu will active the problem inside Ibuntu.

That means I want to press one key to activate the program in Ubuntu. I think autohotkey script can do it. But I do not know how.

2

2 Answers

1
votes

You can try WinActivate on the VirtualBox window, and follow that with SendInput commands. Since VirtualBox uses all sorts of low level hooks, I don't know how well it will respond to key sending.

Since it is a Windows application, there's a chance it will accept other Windows messages. The ControlSend command may be useful, but I don't know if VBox will pass on the keys to the guest OS.

AutoHotkey struggles with low-level applications. Some software, such as games, deliberately prevent artificial input. Others just do it naturally, for example, VirtualBox.

0
votes

Since Gnome can capture ctrl+click and alt+click, I use:

+RButton:: SendInput {Click, middle} return

to send middle-click from trackpad to vbox linux in win7.

Use on your own risk.