summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2016-03-04 11:25:14 +0100
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:49:13 -0600
commitcb8fb8c3d9c1503bb8198c9c59c58f2439ebc72d (patch)
treed678ea181d3d0f035ef38ebea34bc1a1485d6ad0 /include
parent624f40f4868c19a6d147f2d71b0fdf4a8481c8a4 (diff)
downloadhqemu-cb8fb8c3d9c1503bb8198c9c59c58f2439ebc72d.zip
hqemu-cb8fb8c3d9c1503bb8198c9c59c58f2439ebc72d.tar.gz
input: linux evdev support
This patch adds support for reading input events directly from linux evdev devices and forward them to the guest. Unlike virtio-input-host which simply passes on all events to the guest without looking at them this will interpret the events and feed them into the qemu input subsystem. Therefore this is limited to what the qemu input subsystem and the emulated input devices are able to handle. Also there is no support for absolute coordinates (tablet/touchscreen). So we are talking here about basic mouse and keyboard support. The advantage is that it'll work without virtio-input drivers in the guest, the events are delivered to the usual ps/2 or usb input devices (depending on what the machine happens to have). And for keyboards qemu is able to switch the keyboard between guest and host on hotkey. The hotkey is hard-coded for now (both control keys), initialy the guest owns the keyboard. Probably most useful when assigning vga devices with vfio and using a physical monitor instead of vnc/spice/gtk as guest display. Usage: Add '-input-linux /dev/input/event<nr>' to the qemu command line. Note that udev has rules which populate /dev/input/by-{id,path} with static names, which might be more convinient to use. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1457087116-4379-2-git-send-email-kraxel@redhat.com
Diffstat (limited to 'include')
-rw-r--r--include/ui/input.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/ui/input.h b/include/ui/input.h
index d06a12d..102d8a3 100644
--- a/include/ui/input.h
+++ b/include/ui/input.h
@@ -65,4 +65,6 @@ void qemu_input_check_mode_change(void);
void qemu_add_mouse_mode_change_notifier(Notifier *notify);
void qemu_remove_mouse_mode_change_notifier(Notifier *notify);
+int input_linux_init(void *opaque, QemuOpts *opts, Error **errp);
+
#endif /* INPUT_H */
OpenPOWER on IntegriCloud