Feedback about this page and suggestions for improvements are always welcome on the vbox-dev mailing list<1>!


Investigating problems with keyboard input in VirtualBox

This page is intended to help people with programming skills who want to investigate problems with keyboard input in VirtualBox.

The code which picks up keyboard events from the host for the default user interface it in the files:


Unfortunately there is no logging available here. The code to read the keyboard is different for Windows, X11 and OS X.

After this, the events are passed on to Main, which is the middle-layer between front-ends and virtual machines.


Main takes care of things which otherwise all front-ends would have to do (not much for the keyboard), then passes the events on to the device emulation code. The path here will be different depending on whether we are using PS/2 keyboard emulation (almost always) or USB keyboard. The device emulation makes the events appear on the guest virtual hardware.


There is logging<2> code here, respectively log group "dev_kbd" and "usb_kbd"

  1. wiki:VBoxLogging

To monitor exactly what the guest is seeing you are best using native tools in the guest operating system, such as evtest, xinput and xev in Linux/X11 guests and keylook<3> in Windows guests.

Last modified 6 years ago Last modified on May 11, 2018 3:13:32 PM
Note: See TracWiki for help on using the wiki.

© 2023 Oracle
ContactPrivacy policyTerms of Use