* [Qemu-devel] [PATCH 0/2] Release modifier keys (including Meta) on loss of focus
@ 2010-05-05 4:17 Brad Jorsch
2010-05-05 4:17 ` [Qemu-devel] [PATCH 1/2] Fix clearing modifiers on focus loss Brad Jorsch
2010-05-05 4:17 ` [Qemu-devel] [PATCH 2/2] Count "logo" keys as modifier keys Brad Jorsch
0 siblings, 2 replies; 4+ messages in thread
From: Brad Jorsch @ 2010-05-05 4:17 UTC (permalink / raw)
To: qemu-devel
I got tired of my guests thinking that the logo key was being constantly
held down whenever I used Meta-Tab to switch away from the qemu window.
It turns out that both the "clear modifiers on focus loss" feature in
the SDL front-end was broken and Meta (i.e. the "logo" keys) wasn't
being considered a modifier.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 1/2] Fix clearing modifiers on focus loss
2010-05-05 4:17 [Qemu-devel] [PATCH 0/2] Release modifier keys (including Meta) on loss of focus Brad Jorsch
@ 2010-05-05 4:17 ` Brad Jorsch
2010-05-05 4:17 ` [Qemu-devel] [PATCH 2/2] Count "logo" keys as modifier keys Brad Jorsch
1 sibling, 0 replies; 4+ messages in thread
From: Brad Jorsch @ 2010-05-05 4:17 UTC (permalink / raw)
To: qemu-devel
It seems there is an intention to clear all modifier keys (in the SDL
front-end) when the window loses focus, but it seems that it doesn't
work right. Let's just explicitly do it when we lose input focus.
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
---
sdl.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/sdl.c b/sdl.c
index f6fabf1..c155113 100644
--- a/sdl.c
+++ b/sdl.c
@@ -728,6 +728,9 @@ static void sdl_refresh(DisplayState *ds)
}
break;
case SDL_ACTIVEEVENT:
+ if (ev->active.state == SDL_APPINPUTFOCUS && !ev->active.gain) {
+ reset_keys();
+ }
if (gui_grab && ev->active.state == SDL_APPINPUTFOCUS &&
!ev->active.gain && !gui_fullscreen_initial_grab) {
sdl_grab_end();
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 2/2] Count "logo" keys as modifier keys
2010-05-05 4:17 [Qemu-devel] [PATCH 0/2] Release modifier keys (including Meta) on loss of focus Brad Jorsch
2010-05-05 4:17 ` [Qemu-devel] [PATCH 1/2] Fix clearing modifiers on focus loss Brad Jorsch
@ 2010-05-05 4:17 ` Brad Jorsch
2010-05-05 19:42 ` Anthony Liguori
1 sibling, 1 reply; 4+ messages in thread
From: Brad Jorsch @ 2010-05-05 4:17 UTC (permalink / raw)
To: qemu-devel
These are often mapped to Meta on Linux. And I for one use Meta-Tab as
the equivalent of Windows's Alt-Tab, so not having it marked as a
modifier leaves the guest thinking it's permanently pressed.
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
---
sdl.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/sdl.c b/sdl.c
index c155113..cc7b1bb 100644
--- a/sdl.c
+++ b/sdl.c
@@ -385,6 +385,8 @@ static void sdl_process_key(SDL_KeyboardEvent *ev)
case 0x9d: /* Right CTRL */
case 0x38: /* Left ALT */
case 0xb8: /* Right ALT */
+ case 0xdb: /* Left META */
+ case 0xdc: /* Right META */
if (ev->type == SDL_KEYUP)
modifiers_state[keycode] = 0;
else
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH 2/2] Count "logo" keys as modifier keys
2010-05-05 4:17 ` [Qemu-devel] [PATCH 2/2] Count "logo" keys as modifier keys Brad Jorsch
@ 2010-05-05 19:42 ` Anthony Liguori
0 siblings, 0 replies; 4+ messages in thread
From: Anthony Liguori @ 2010-05-05 19:42 UTC (permalink / raw)
To: Brad Jorsch; +Cc: qemu-devel
On 05/04/2010 11:17 PM, Brad Jorsch wrote:
> These are often mapped to Meta on Linux. And I for one use Meta-Tab as
> the equivalent of Windows's Alt-Tab, so not having it marked as a
> modifier leaves the guest thinking it's permanently pressed.
>
> Signed-off-by: Brad Jorsch<anomie@users.sourceforge.net>
>
Seems reasonable.
Regards,
Anthony Liguori
> ---
> sdl.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/sdl.c b/sdl.c
> index c155113..cc7b1bb 100644
> --- a/sdl.c
> +++ b/sdl.c
> @@ -385,6 +385,8 @@ static void sdl_process_key(SDL_KeyboardEvent *ev)
> case 0x9d: /* Right CTRL */
> case 0x38: /* Left ALT */
> case 0xb8: /* Right ALT */
> + case 0xdb: /* Left META */
> + case 0xdc: /* Right META */
> if (ev->type == SDL_KEYUP)
> modifiers_state[keycode] = 0;
> else
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-05-05 19:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-05 4:17 [Qemu-devel] [PATCH 0/2] Release modifier keys (including Meta) on loss of focus Brad Jorsch
2010-05-05 4:17 ` [Qemu-devel] [PATCH 1/2] Fix clearing modifiers on focus loss Brad Jorsch
2010-05-05 4:17 ` [Qemu-devel] [PATCH 2/2] Count "logo" keys as modifier keys Brad Jorsch
2010-05-05 19:42 ` Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).