Saturday, August 16, 2014

Getting Windows, OSX, VirtualBox and keyboard to play nicely

It was driving me nuts always switching back and forth between control+c/x/v/etc. and command+c/etc. So I took the time to research the issue and found AutoHotKey (AHK).  Then created a script to change a few control+ hotkeys to WindowKey+.

Here are the lines to be loaded into AHK


(FYI: we will be making the left command button be the windows key in the next step)

#c::^c        ; make it so windows key + c will do control + c (copy)
#v::^v        ; make it so windows key + v will do control + v (paste)
#z::^z        ; make it so windows key + z will do control + z (undo)
#x::^x       ; make it so windows key + x will do control + x (cut)
#s::^s        ; make it so windows key + s will do control + s (save)
#e::END   ; make it so windows key + e will send cursor to end of line


After configuring AutoHotKey you also need to change a setting within VirtualBox
Change the "Host Key" setting to the Right Command button, leaving the left for use by Windows and the AHK tool.  Once this is change the left command button will be the Window's key and work with the script above.