Patchwork [2/2] Count "logo" keys as modifier keys

login
register
mail settings
Submitter Brad Jorsch
Date May 5, 2010, 4:17 a.m.
Message ID <1273033029-15622-3-git-send-email-anomie@users.sourceforge.net>
Download mbox | patch
Permalink /patch/51708/
State New
Headers show

Comments

Brad Jorsch - May 5, 2010, 4:17 a.m.
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(-)
Anthony Liguori - May 5, 2010, 7:42 p.m.
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
>

Patch

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