Pass the laptop’s built-in keyboard, hotkeys, and both touchpads to VM 101. Use udev symlinks on the host for stability across reboots, and expose touchpads as virtio-input-host to get native GNOME gestures in the guest.
Files created under /etc/udev/rules.d/:
nano /etc/udev/rules.d/99-touchpad.rules
SUBSYSTEM=="input", KERNEL=="event*", ENV{ID_PATH}=="pci-0000:00:15.0-platform-i2c_designware.0", SYMLINK+="input/msn-touchpad"
SUBSYSTEM=="input", KERNEL=="event*", ENV{ID_PATH}=="platform-i8042-serio-1", SYMLINK+="input/elantech-touchpad"
nano etc/udev/rules.d/99-keyboard.rules
SUBSYSTEM=="input", KERNEL=="event*", ENV{ID_PATH}=="platform-i8042-serio-0", SYMLINK+="input/laptop-keyboard"
nano /etc/udev/rules.d/99-hotkeys.rules
SUBSYSTEM=="input", KERNEL=="event*", ENV{ID_PATH}=="platform-gpio-keys.1.auto", SYMLINK+="input/laptop-hotkeys"
Apply and verify:
udevadm control --reload-rules && udevadm trigger
ls -l /dev/input/laptop-keyboard /dev/input/laptop-hotkeys /dev/input/elantech-touchpad /dev/input/msn-touchpad
Expected output (example):
laptop-keyboard -> event3
laptop-hotkeys -> event8
elantech-touchpad -> event6
msn-touchpad -> event5
- Touchpads are exposed to the guest as virtio-input-host (so GNOME sees real touchpads with gestures).
- Keyboard + hotkeys via input-linux (evdev).
- Disable emulated USB tablet to avoid pointer conflicts.
tablet: 0
args: -object input-linux,id=kbd1,evdev=/dev/input/laptop-keyboard,grab_all=on,repeat=on -object input-linux,id=hotkeys,evdev=/dev/input/laptop-hotkeys -device virtio-input-host,id=tp_elan,evdev=/dev/input/elantech-touchpad -device virtio-input-host,id=tp_msn,evdev=/dev/input/msn-touchpad