gnif / LookingGlass

An extremely low latency KVMFR (KVM FrameRelay) implementation for guests with VGA PCI Passthrough.
GNU General Public License v2.0
4.75k stars 261 forks source link

[Feature Request] Pass through controller inputs to VM #1093

Closed Cm4nXD closed 1 year ago

Cm4nXD commented 1 year ago

I’m not sure if this is possible in the way I’m thinking or even if it’s within the scope of this project, but it would be a great additional feature in addition to the spice server for keyboard and mouse. Currently the only way to use a controller inside the VM while using looking glass is to pass through the usb device or a Bluetooth dongle. However most controllers can only be paired with one Bluetooth device at a time, and for my setup which is a Linux gaming living room console with steamOS, having to mess with controller pairing or wired pass through controllers to play my games only available through the Microsoft store on windows (Halo Wars 2) is a hassle. Currently I have scripts that launch the game, and open games inside the virtual machine using ssh, and then open looking glass from the same launch script in steam. But it falls short when I need to repair the controller or swap controllers. I know alternatives like moonlight exists, but the latency and crispness of the video feed is unparalleled with looking glass. I’m assuming that moonlight captures the host controller inputs and forwards them over the network, so shouldn’t that be hypothetically possible straight to the VM?

gnif commented 1 year ago

Sorry but this is not supported by the SPICE protocol which we use for input. You are limited to solutions outside of LG with QEMU directly.

alexankitty commented 1 year ago

@Cm4nXD To help ease up the burden, I would recommend looking into dual boot pairing and making sure your keys are consistent between linux and windows. That should at least make it a little more seamless. Some resources: https://github.com/x2es/bt-dualboot https://wiki.archlinux.org/title/Bluetooth#Dual_boot_pairing