Win - using Autohotkey to switch to VM instead

20th November 2011 – 144 words

When using Guake/Yakuake often, one easily tempted to use the key F12 in Windows… and nothing happens! Now, I am using Autohotkey to open my VM instead – and there I usually have a beautiful yakuake with 256 colors, instead of an ugly cmd or putty.

SetTitleMatchMode 1
~F12::

IfWinExist Ubuntu
	WinActivate
return

One caveat: Doesn’t seems to work with Firebug, which takes the F12 key by itself. But Firebug offers ways to change keybindings.

Update

Thanks to the comment from outsmartin, one can leave out the ‘~’ and the F12-keypress will always be sent into the Virtual Box.

SetTitleMatchMode 1

F12::
IfWinExist LinuxMint
  WinActivate
Send {F12}
return

Reposted from notes.it-jobs-und-stellen.de