Change the Host Key in VirtualBox: Full Guide
In this article
Yes, you can change the host key in VirtualBox. The host key is the keyboard shortcut that toggles between capturing and releasing your mouse and keyboard from a virtual machine, and by default it is the Right Ctrl key on Windows and Linux, or the Left Command key on macOS. Changing it is a simple settings adjustment that takes effect immediately, and this guide walks you through the process, explains what the host key does, and covers common issues.
What Is the Host Key and Why Change It?
The host key is a modifier key that VirtualBox uses to perform special actions while a virtual machine is running. The most common action is Host (by default Right Ctrl or Left Command), which releases the mouse and keyboard from the virtual machine back to your host operating system. Other combinations, like Host+F for fullscreen or Host+S for a screenshot, rely on the same key.
You might want to change the host key if:
- Your keyboard doesn't have the default key (e.g., a compact laptop without a right Ctrl).
- The default key conflicts with an application you use inside the virtual machine (e.g., a game or a remote desktop tool that also uses Right Ctrl).
- You prefer a key that's easier to reach, like Caps Lock or the left Alt.
- You're on macOS and want a key that feels more natural than the Left Command.
Changing it is safe and doesn't affect your virtual machine's data or configuration—it only changes the keyboard shortcut.
How to Change the Host Key (Step-by-Step)
Follow these steps to change the host key in VirtualBox (version 6.x and 7.x):
- Open VirtualBox on your host machine. Make sure no virtual machine is currently running (or you can change it while a VM is running, but the new key won't apply until the VM is restarted).
- Go to File menu (top-left) and select Preferences (on Windows/Linux) or Settings (on macOS).
- In the Preferences window, click on the Input tab in the left sidebar.
- Look for the Virtual Machine section at the top. You'll see a field labeled Host Key Combination (or just Host Key).
- Click the field, then press the new key combination you want to use. For example, press Caps Lock or Left Ctrl. The field will update to show your chosen key.
- Click OK to save the change.
That's it. The new host key is now active for all virtual machines. If you have a VM running, you'll need to restart it for the change to take effect.
What Keys Can You Use as a Host Key?
VirtualBox allows you to set almost any single modifier key or a combination of a modifier and a regular key. Common choices include:
- Right Ctrl (default on Windows/Linux)
- Left Command (default on macOS)
- Left Ctrl
- Left Alt
- Right Alt
- Caps Lock
- Right Windows (Windows key on the right side)
- Ctrl+Shift or Alt+Shift (combination)
You cannot use a plain letter or number key alone (like "A" or "1") because that would interfere with typing inside the virtual machine. The host key must be a modifier or a combination that includes a modifier.
Common Problems and Solutions
Sometimes changing the host key doesn't go as smoothly as expected. Here are typical issues and how to fix them:
- The new key doesn't work immediately. If a virtual machine is running, close it and reopen it. The host key setting is read when the VM starts.
- You can't type the key in the field. Make sure you click the field first, then press the key. If you press multiple keys, only the last one might register—press them one at a time.
- The host key release stops working. This can happen if the key you chose is also used by an application on the host. Try a different key.
- You forgot the new host key. Open Preferences > Input and look at the field. It will show your current setting.
- On macOS, the Command key doesn't work as expected. Some Mac keyboards have a single Command key on the left. Try using the right Command key or switch to Control.
Alternative: Change Host Key per Virtual Machine
VirtualBox also allows you to set a different host key for each individual virtual machine. This is useful if you have VMs with different needs. To do this:
- Select the virtual machine in the main VirtualBox window (but don't start it).
- Click Settings (the gear icon).
- Go to General > Advanced tab.
- Look for the Host Key Combination field. It may be set to "Default" or a specific key.
- Change it to your preferred key or leave it as "Default" to use the global setting.
This gives you flexibility if you use one VM for gaming (where you want a specific key) and another for productivity.
What Else Does the Host Key Do?
Beyond releasing the mouse and keyboard, the host key is used in many VirtualBox shortcuts. Here are some useful ones:
- Host + F – Toggle fullscreen mode.
- Host + L – Toggle seamless mode.
- Host + C – Toggle scaled mode.
- Host + S – Take a screenshot of the VM.
- Host + Home – Show the virtual machine menu bar (if hidden).
- Host + Del – Send Ctrl+Alt+Del to the VM.
These shortcuts are especially handy when you're in fullscreen and don't want to switch back to the host to access menus.
Frequently Asked Questions
How do I know what my current host key is?
Open VirtualBox, go to File > Preferences > Input. The field labeled Host Key Combination shows your current key. On macOS, it's under Settings > Input.
Can I set the host key to a mouse button?
No, the host key must be a keyboard key or combination. VirtualBox does not support mouse buttons as a host key.
Will changing the host key affect my saved VM state?
No. The host key is a host-level setting, not a VM setting. It doesn't alter the VM's saved state, snapshots, or data.
Why is my host key not working after I change it?
Make sure you restart any running virtual machine after changing the key. Also, verify that the key you chose isn't being intercepted by another program on your host (like a screen reader or a hotkey manager).
Can I use the Windows key as a host key?
Yes, you can use the right Windows key (or left Windows key) as a host key. However, be aware that the Windows key may open the Start menu on your host if you press it alone, but when used as a host key, VirtualBox captures it while the VM is active.
Is there a way to reset the host key to default?
Yes. In the Preferences > Input window, click the field and press the default key for your platform (Right Ctrl on Windows/Linux, Left Command on macOS). You can also click the small arrow next to the field and select "Default" if available.