Bug 1612823

Summary: [RFE] Add support for QEMU's input-linux
Product: [Community] Virtualization Tools Reporter: Martin Kletzander <mkletzan>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: libvirt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Martin Kletzander 2018-08-06 11:15:14 UTC
QEMU has support for input-linux which redirects input from specific host devices to the guest.  The same input devices can be used for both host and guest (toggled by a key-combination, IIUC it is currently hardcoded to both Control keys pressed at the same time) and there is no need for special drivers in the guest.

Initial support was added in:

  https://git.qemu.org/?p=qemu.git;a=commit;h=e0d2bd5195fdc032c8da566027a35a97aaa0394b

Follow-up adding "grab-all" to toggle switching all input devices on hotkey (e.g. also switching mouse when switching keyboard):

  http://git.qemu.org/?p=qemu.git;a=commit;h=46d921bebe4d0767a343ac81469ded6230e2defb

Follow-up adding the ability to enable repeat (default is off - linux does repeat in SW and even on Windows repeat=on can cause problems with some games):

  http://git.qemu.org/?p=qemu.git;a=commit;h=a6ccabd6769b9d6e5bbc3f23bf8da58db032f3a1

Switch to `-object` in the command line:

  http://git.qemu.org/?p=qemu.git;a=commit;h=0e066b2cc50de4b4d5ef3c9b5a39eddc3f98d060

Example of usage:

  -object input-linux,id=il-kbd1,evdev=/dev/input/by-id/usb-Microsoft_Microsoft®_Nano_Transceiver_v2.0-event-kbd,grab-all=on
  -object input-linux,id=il-mouse1,evdev=/dev/input/by-id/usb-Microsoft_Microsoft®_Nano_Transceiver_v2.0-if01-event-mouse