[TUTORIAL] Pass laptop's keyboard, touchpad and trackpoint into a VM

weuquibegruddi

New Member
Apr 23, 2026
4
0
1
Hopefuly, it's ok to sum-it-up this way, as I was not able to find a post with complete summary on the topic - how to pass laptop's keyboard, touchpad and trackpoint into VM.
Some of inputs were taken from this post.

TLDR; for intel-based laptop, add to your /etc/pve/qemu-server/<VMID>.conf:
Bash:
args: -device virtio-input-host-pci,id=input1,evdev=/dev/input/by-path/platform-i8042-serio-2-event-mouse -device virtio-input-host-pci,id=input0,evdev=/dev/input/by-path/pci-0000:00:15.1-platform-i2c_designware.1-event-mouse -object input-linux,id=kbd1,evdev=/dev/input/by-path/platform-i8042-serio-0-event-kbd,grab_all=on,repeat=on

Steps:
1. Identify devices to be passed for KB, trackpoint (with buttons) and a touchpad:
Run "cat /dev/input/py-path/<device>" for each suspectedly-relevant device (those must have "-event" in their name). Monitor if console responds to your physical actions on the inspected device, like "cat /dev/input/by-path/platform-i8042-serio-2-event-mouse" and press any key/move trackpoint, touch touchpad, etc. Touchpads may sit on i2c (like /dev/input/by-path/pci-0000:00:15.1-platform-i2c_designware.1-event-mouse).
Alternative is to use lspci/lsusb, but inspecting/cat input devices (0..3) is a faster way.

2. Add each device into your VM conf (/etc/pve/qemu-server/<VMID>.conf).
2.a. Keyboard may be added using "-object input-linux"
2.b. Add trackpoint/touchpad using "-device virtio-input-host-pci,id=input1". Otherwise, if you add touchpad using "-object", it will behave weirdly - if you touch top left corner of the pad and move, it will place the curson to top left corner of the screen (absolute positioning and not relative one). I wasn't able to pass trackpoint using "-object" either.

3. Verify it works. Upon shutdown they're released to the host.

The last step for using a laptop with no-x11 proxmox as as host (as clean as possible) an one of VMs with desktop environment as a GUI console is to figure out how to return laptop's display back to host upon VM is shut down. Will be thankfull for the advise.
 
Last edited: