VirtualBox Mac - Is it possible re-map a key for a VM
I am running Windows inside VirtualBox on Mac OSX. However, I am frequently copying and pasting/undoing etc using keyboard shortcuts.
Because Mac is dumb and tries to be different, common shortcuts such as ctrl+c and ctrl+v are cmd+c and cmd+v on Mac. This creates a problem because I keep trying to use mac-style shortcuts in the VM, or windows-style shortcuts on the Mac (my workflow is, do ASP.NET dev in the VM, but use the Mac hosts browser).
What I would like to be able to do is make VirtualBox send "Command" key presses as "Ctrl" to the VM, so that I dont have to keep remembering which environment I am in and thinking about which key combination I need to use.
Is this possible?
Because Mac is dumb and tries to be different, common shortcuts such as ctrl+c and ctrl+v are cmd+c and cmd+v on Mac.
Macs had copy and paste before Windows. Separating control and command means that you don't need additional keybindings for interrupting a process in a shell or going a page down in emacs.
Anyway, you can do that with KeyRemap4MacBook.
You could also save something like this as private.xml:
<?xml version="1.0"?>
<root>
<item>
<name>test</name>
<identifier>private.test</identifier>
<only>VIRTUALMACHINE</only>
<autogen>--KeyToKey-- KeyCode::Z, VK_COMMAND, KeyCode::Z, VK_CONTROL</autogen>
<autogen>--KeyToKey-- KeyCode::X, VK_COMMAND, KeyCode::X, VK_CONTROL</autogen>
<autogen>--KeyToKey-- KeyCode::C, VK_COMMAND, KeyCode::C, VK_CONTROL</autogen>
<autogen>--KeyToKey-- KeyCode::V, VK_COMMAND, KeyCode::V, VK_CONTROL</autogen>
<autogen>--KeyToKey-- KeyCode::A, VK_COMMAND, KeyCode::A, VK_CONTROL</autogen>
</item>
</root>
The test folder has an XML file with all the predefined remappings.