Input devices such as keyboards and mice are a must to directly interact with a virtual machine. There are multiple ways to share an input device with your virtual machine.
Event devices (evdev) is a generic input event interface available in the Linux and FreeBDS kernels.
/dev/input/by-path/
or /dev/input/by-id/
and look for devices that contains the string event in their name.ls /dev/input/*
/dev/input/by-path:
pci-0000:07:00.0-event-mouse
pci-0000:09:00.0-mouse
pci-0000:07:00.0-mouse platform-i8042-serio-0-event-kbd
pci-0000:08:00.0-event-kbd platform-i8042-serio-1-event-mouse
pci-0000:09:00.0-event-mouse platform-i8042-serio-1-mouse
sudo cat /dev/input/by-path/pci-0000:08:00.0-event-kbd
��b����b����b�!��b���b�� ��b����b����b����b����b��fdsa��b�( ��b�(��b!��b��bR��bR��bW��bW��b�!��b�f��b4 ��b4��bV��bV��bX��bXdsa��b!: !��b!: ��b>: ��b>: ��b�
��b�
��b�y
��b�y
Edit the virtual machine's definition and replace MOUSE_NAME
and KEYBOARD_NAME
with the previously identified devices.
<input type="evdev">
<source dev="/dev/input/by-path/MOUSE_NAME"/>
</input>
<input type="evdev">
<source dev="/dev/input/by-path/KEYBOARD_NAME" grab="all" repeat="on"/>
</input>