Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EZ05x-0002xd-To for qemu-devel@nongnu.org; Mon, 07 Nov 2005 01:03:05 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EZ05w-0002vv-5b for qemu-devel@nongnu.org; Mon, 07 Nov 2005 01:03:05 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EZ05v-0002vi-Rx for qemu-devel@nongnu.org; Mon, 07 Nov 2005 01:03:03 -0500 Received: from [128.8.10.163] (helo=po1.wam.umd.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EZ05v-0000YW-IN for qemu-devel@nongnu.org; Mon, 07 Nov 2005 01:03:03 -0500 Date: Mon, 7 Nov 2005 01:02:46 -0500 From: "Jim C. Brown" Subject: Re: [Qemu-devel] user definable hotkeys to send instructions to the host OS? Message-ID: <20051107060246.GB26645@jbrown.mylinuxbox.org> References: <200511062217.40088.phil@supstitches.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200511062217.40088.phil@supstitches.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Phil Rasch Cc: qemu-devel@nongnu.org On Sun, Nov 06, 2005 at 10:17:39PM -0700, Phil Rasch wrote: > I would like to be able to program a hotkey that would allow me to shift from > a fullscreen qemu session to another workspace or X display with access to > the host OS. I think I can construct the instructions (to X or gdm/kdm etc) > to instruct the window manager to do what I want, but the problem is that > qemu seems to grab all the keystrokes and not pass anything to the host OS. > All my attempts seem to be intercepted by qemu, and not passed to the OS. > Of course. qemu grabs the keyboard. It wouldn't be accurate emulation otherwise. > Can anybody suggest a way to do what I want, or is it going to take some > hacking on the source? If so, can you suggest the starting point? If people > think it would be useful to others I would be happy to try to provide a > patch. > My -no-sdl-grab patch essentially did this, since it prevented SDL from grabbing the mouse (and in the process, I believe keyboard grabs were blocked as well, if memory serves me correctly). If you want the mouse to be grabbed, but not the keyboard, then you will need to edit the SDL source code or run qemu under a different graphics toolkit like GTK. If you just want the hotkey, but don't mind anything else being grabbed, you can get away with hacking sdl.c so that for a particular hotkey combination, a message is sent (maybe it somehow sends a keystroke to another X process, maybe it runs a command on the host, maybe it does something else). > Thanks in advance for your advice. > > Phil -- Infinite complexity begets infinite beauty. Infinite precision begets infinite perfection.