
Originally Posted by
netz
One more:
Since you couldn't be fucked to read the manual:
3.4.1.1 Capturing and releasing keyboard and mouse
Since the operating system in the virtual machine does not “know” that it is not run-
ning on a real computer, it expects to have exclusive control over your keyboard and
mouse. This is, however, not the case since, unless you are running the VM in full-
screen mode, your VM needs to share keyboard and mouse with other applications
and possibly other VMs on your host.
As a result, initially after installing a host operating system and before you install
the guest additions (we will explain this in a minute), only one of the two – your VM
or the rest of your computer – can “own” the keyboard and the mouse. You will see a
second mouse pointer which will always be con?ned to the limits of the VM window.
Basically, you activate the VM by clicking inside it.
To return ownership of keyboard and mouse to your host operating system,
VirtualBox reserves a special key on your keyboard for itself: the “host key”. By
default, this is the right Control key on your keyboard, but you can change this default
in the VirtualBox Global Settings. In any case, the current setting for the host key is
always displayed at the bottom right of your VM window, should you have forgotten
about it:
In detail, all this translates into the following:
• Your keyboard is owned by the VM if the VM window on your host desktop
has the keyboard focus (and then, if you have many windows open in your guest
operating system as well, the window that has the focus in your VM). This means
30
3 Starting out with VirtualBox
that if you want to type within your VM, click on the title bar of your VM window
?rst.
To release keyboard ownership, press the Host key (as explained above, typically
the right Control key).
Note that while the VM owns the keyboard, some key sequences (like Alt-Tab for
example) will no longer be seen by the host, but will go to the guest instead.
After you press the host key to reenable the host keyboard, all key presses will
go through the host again, so that sequences like Alt-Tab will no longer reach the
guest.
edit: a little bit down the manual...
Host operating systems reserve certain key combinations for themselves. For
example, it is impossible to enter the Ctrl+Alt+Delete combination if you want
to reboot the guest operating system in your virtual machine, because this key
combination is usually hard-wired into the host OS (both Windows and Linux
intercept this), and pressing this key combination will therefore reboot your host.
Also, with Linux, the key combination Ctrl+Alt+Backspace normally resets the
X server (to restart the entire graphical user interface in case it got stuck). As
the X server intercepts this combination, pressing it will usually restart your host
graphical userface (and kill all running programs, including VirtualBox, in the
process).
31
3 Starting out with VirtualBox
Third, also with Linux, the key combination Ctrl+Alt+Fx (where Fx is one of
the function keys from F1 to F12) normally allows to switch between virtual
terminals. As with Ctrl+Alt+Delete, these combinations are intercepted by the
host operating system and therefore always switch terminals on the host.
If, instead, you want to send these key combinations to the guest operating sys-
tem in the virtual machine, you will need to use one of the following methods:
– Use the items in the “VM” menu of the virtual machine window. There you
will ?nd “Insert Ctrl+Alt+Delete” and “Ctrl+Alt+Backspace”; the latter
will only have an effect with Linux guests, however.
– Press special key combinations with the Host key (normally the right Con-
trol key), which VirtualBox will then translate for the virtual machine:
? Host key + Del to send Ctrl+Alt+Del (to reboot the guest);
? Host key + Backspace to send Ctrl+Alt+Backspace (to restart the
graphical user interface of a Linux guest);
? Host key + F1 (or other function keys) to simulate Ctrl+Alt+F1 (or
other function keys, i.e. to switch between virtual terminals in a Linux
guest).
have fun.