<div dir="ltr">Hi Gerd,<div><br></div><div>A couple of options I have been wondering about.<br><div><br></div><div>1)</div><div>Is it possible to have an option that would enable running a program on the host on switching, IE when both CRTL keys are pressed. It would run on the host regardless if it was on the guest machine when the keys pressed.</div><div>An option like 'onswitchexecute=/usr/bin/monitorswitch'</div><div><br></div><div>Something like that. I have a small program that switches the monitor input via I2C direct (if interested: <a href="http://pastebin.com/6Hd0pafF">http://pastebin.com/6Hd0pafF</a>). The program would need to be modified a little bit to not use a variable input. but to somehow detect what it's currently at and then switch to the opposite -- shouldn't be too hard.</div></div><div><br></div><div>2)</div><div>This would be useful for number idea one.</div><div>Instead of both CTRL keys, could the hotkey be something like CTRL+SHIFT+ALT+1 for the host, and then each guest would set an option of 2 through 9. Since this is really only good for dedicated graphics cards, the most I've heard of is 7 in one machine and that was a crazy build. A normal person would have two cards, namely MS Windows Gaming Rig and GNU/Linux. However, some may want three, which is very doable on most systems. So, CTRL+SHIFT+ALT+2 or +3 to get to the other systems.</div><div><br></div><div>It can connect into point one, as the cheap and dirty monitor switcher code takes an input and my monitor has three inputs, so a person could write code to switch anything to anything. The option could have a variable string that when called by your Input patches, would replace the variable place holder with the machine being called, IE:</div><div>'execonswitch=/usr/bin/monitorswitch %COMPNUM'</div><div>Or something like that.</div><div><br></div><div>Hope you like the ideas.</div><div>Jon</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 18 January 2016 at 14:13, Gerd Hoffmann <span dir="ltr"><<a href="mailto:kraxel@redhat.com" target="_blank">kraxel@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mo, 2016-01-18 at 11:47 +0000, Jonathan Scruggs wrote:<br>
> Hi Gerd,<br>
><br>
> Would there be a way to add repeating keys back in that doesn't cause<br>
> issues? Maybe slow down the repeat cycle? Or is this strictly a issue<br>
> with how the actual event drivers or the buffers work and would need<br>
> changing to that on the host side?<br>
<br>
</span>I don't know ...<br>
<span class=""><br>
> In my mind it seams fairly straightforward in just forwarding these<br>
> events to the VM.<br>
<br>
</span>I assumed that as well, it was there initially and only removed after it<br>
turned out to cause problems.<br>
<br>
I've added a patch to the git branch bringing it back, but guarded with<br>
a new config option (repeat={on,off}) and turned off by default.<br>
<span class=""><br>
> Would it be different if the keyboard was using the PS/2 versus the<br>
> USB interface on the guest? I have a USB controller added for the<br>
> guest but the keyboard and mouse are on PS/2 interfaces.<br>
<br>
</span>Worth testing.  Just add "-device usb-kbd" to the qemu command line and<br>
see what happens ...<br>
<span class=""><br>
> A second thought. What if you made the keyboard and mouse USB only,<br>
> then on the guest, make sure the USB controller is using Message<br>
> Signal-Based interrupts. On Windows, the controller was set to the old<br>
> style Line-Based. The slow downs could be caused by a lake in speed<br>
> with he interrupts and USB polling speed.<br>
<br>
</span>In case windows is new enough to have xhci support (win8+) you can try<br>
using a xhci hostadapter, which supports MSI (uhci and ehci don't), then<br>
hook up the usb keyboard to it.<br>
<br>
"-device nec-usb-xhci,id=xhci -device usb-kbd,bus=xhci.0"<br>
<br>
cheers,<br>
  Gerd<br>
<br>
</blockquote></div><br></div>