@@ -762,6 +762,9 @@ func Cmdline(cfg Config) (string, []string, error) {
762
762
// virtio-rng-pci accelerates starting up the OS, according to https://wiki.gentoo.org/wiki/QEMU/Options
763
763
args = append (args , "-device" , "virtio-rng-pci" )
764
764
765
+ // Input
766
+ input := "mouse"
767
+
765
768
// Sound
766
769
if * y .Audio .Device != "" {
767
770
id := "default"
@@ -780,24 +783,27 @@ func Cmdline(cfg Config) (string, []string, error) {
780
783
if display == "vnc" {
781
784
display += "=" + * y .Video .VNC .Display
782
785
display += ",password=on"
786
+ // use tablet to avoid double cursors
787
+ input = "tablet"
783
788
}
784
789
args = appendArgsIfNoConflict (args , "-display" , display )
785
790
}
791
+
786
792
switch * y .Arch {
787
793
case limayaml .X8664 , limayaml .RISCV64 :
788
794
args = append (args , "-device" , "virtio-vga" )
789
795
args = append (args , "-device" , "virtio-keyboard-pci" )
790
- args = append (args , "-device" , "virtio-mouse -pci" )
796
+ args = append (args , "-device" , "virtio-" + input + " -pci" )
791
797
args = append (args , "-device" , "qemu-xhci,id=usb-bus" )
792
798
case limayaml .AARCH64 , limayaml .ARMV7L :
793
799
if features .VersionGEQ7 {
794
800
args = append (args , "-device" , "virtio-gpu" )
795
801
args = append (args , "-device" , "virtio-keyboard-pci" )
796
- args = append (args , "-device" , "virtio-mouse -pci" )
802
+ args = append (args , "-device" , "virtio-" + input + " -pci" )
797
803
} else { // kernel panic with virtio and old versions of QEMU
798
804
args = append (args , "-vga" , "none" , "-device" , "ramfb" )
799
805
args = append (args , "-device" , "usb-kbd,bus=usb-bus.0" )
800
- args = append (args , "-device" , "usb-mouse ,bus=usb-bus.0" )
806
+ args = append (args , "-device" , "usb-" + input + " ,bus=usb-bus.0" )
801
807
}
802
808
args = append (args , "-device" , "qemu-xhci,id=usb-bus" )
803
809
}
0 commit comments