From 59a337c1e47f4a17839a1e4e78873bc7deebef15 Mon Sep 17 00:00:00 2001 From: bellard Date: Thu, 17 Aug 2006 10:42:46 +0000 Subject: [PATCH] reset key modifiers when switching console (aka savevm keyboard bug) --- sdl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdl.c b/sdl.c index 38d75536..00f57464 100644 --- a/sdl.c +++ b/sdl.c @@ -394,6 +394,8 @@ static void sdl_refresh(DisplayState *ds) gui_keysym = 1; break; case 0x02 ... 0x0a: /* '1' to '9' keys */ + /* Reset the modifiers sent to the current console */ + reset_keys(); console_select(keycode - 0x02); if (!is_graphic_console()) { /* display grab if going to a text console */ @@ -468,7 +470,7 @@ static void sdl_refresh(DisplayState *ds) } } } - if (is_graphic_console()) + if (is_graphic_console() && !gui_keysym) sdl_process_key(&ev->key); break; case SDL_QUIT: -- 2.39.5