[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] (savevm and loadvm) appropriate order of events
From: |
Johannes Schindelin |
Subject: |
Re: [Qemu-devel] (savevm and loadvm) appropriate order of events |
Date: |
Wed, 26 Oct 2005 17:03:30 +0200 (CEST) |
Hi,
On Wed, 26 Oct 2005, Henrik Nordstrom wrote:
> On Tue, 25 Oct 2005, Vesselin Peev wrote:
>
> > Yes, it does, thanks. Saves a finger stretch and one hitting one more key
> > :).
> > Also, one could hit them in any order, and any number of keys between them.
>
> Someone probably should wip together a patch to sent Ctrl and Alt keyup
> events to the guest when using the magic hotkey combinations (and to not
> send it immediately after switching back to the guest via the magic
> hotkeys)... but to get around this you can run the monitor on stdio and
> switch to it using your host window manager...
Ask, and it will be given you:
---
[PATCH] Release Alt & Ctrl when savevm'ing
This patch puts the keyup events for Alt&Ctrl into the keyboard queue
just before saving the state.
---
hw/pckbd.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
applies-to: f81b679dc9d656021f798cfe0422399a46f6b12a
6d4f72c3ddcea23ba905a874de4d4a79da9c4ca3
diff --git a/hw/pckbd.c b/hw/pckbd.c
index 8ef462c..15b27ac 100644
--- a/hw/pckbd.c
+++ b/hw/pckbd.c
@@ -732,7 +732,11 @@ static void kbd_reset(void *opaque)
static void kbd_save(QEMUFile* f, void* opaque)
{
KBDState *s = (KBDState*)opaque;
-
+
+ /* release alt, ctrl */
+ kbd_put_keycode(0x38|0x80); /* alt */
+ kbd_put_keycode(0x1d|0x80); /* ctrl */
+
qemu_put_8s(f, &s->write_cmd);
qemu_put_8s(f, &s->status);
qemu_put_8s(f, &s->mode);
---
0.99.8.GIT