qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>, Anthony Liguori <aliguori@amazon.com>
Subject: [Qemu-devel] [PULL 2/2] sdl2: keymap fixups
Date: Tue, 16 Sep 2014 08:31:37 +0200	[thread overview]
Message-ID: <1410849097-7604-3-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1410849097-7604-1-git-send-email-kraxel@redhat.com>

Make a few keys works correctly in SDL2.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 ui/sdl2-keymap.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ui/sdl2-keymap.h b/ui/sdl2-keymap.h
index 5a12f45..cbedaa4 100644
--- a/ui/sdl2-keymap.h
+++ b/ui/sdl2-keymap.h
@@ -105,9 +105,10 @@ static const int sdl2_scancode_to_qcode[SDL_NUM_SCANCODES] = {
     [SDL_SCANCODE_KP_9]              = Q_KEY_CODE_KP_9,
     [SDL_SCANCODE_KP_0]              = Q_KEY_CODE_KP_0,
     [SDL_SCANCODE_KP_PERIOD]         = Q_KEY_CODE_KP_DECIMAL,
+
+    [SDL_SCANCODE_NONUSBACKSLASH]    = Q_KEY_CODE_LESS,
+    [SDL_SCANCODE_APPLICATION]       = Q_KEY_CODE_MENU,
 #if 0
-    [SDL_SCANCODE_NONUSBACKSLASH]    = Q_KEY_CODE_NONUSBACKSLASH,
-    [SDL_SCANCODE_APPLICATION]       = Q_KEY_CODE_APPLICATION,
     [SDL_SCANCODE_POWER]             = Q_KEY_CODE_POWER,
     [SDL_SCANCODE_KP_EQUALS]         = Q_KEY_CODE_KP_EQUALS,
 
@@ -231,7 +232,7 @@ static const int sdl2_scancode_to_qcode[SDL_NUM_SCANCODES] = {
     [SDL_SCANCODE_LGUI]              = Q_KEY_CODE_META_L,
     [SDL_SCANCODE_RCTRL]             = Q_KEY_CODE_CTRL_R,
     [SDL_SCANCODE_RSHIFT]            = Q_KEY_CODE_SHIFT_R,
-    [SDL_SCANCODE_RALT]              = Q_KEY_CODE_ALTGR,
+    [SDL_SCANCODE_RALT]              = Q_KEY_CODE_ALT_R,
     [SDL_SCANCODE_RGUI]              = Q_KEY_CODE_META_R,
 #if 0
     [SDL_SCANCODE_MODE]              = Q_KEY_CODE_MODE,
-- 
1.8.3.1

  parent reply	other threads:[~2014-09-16  6:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-16  6:31 [Qemu-devel] [PULL 0/2] sdl patch queue Gerd Hoffmann
2014-09-16  6:31 ` [Qemu-devel] [PULL 1/2] sdl2: drop sdl_zoom.h Gerd Hoffmann
2014-09-16  6:31 ` Gerd Hoffmann [this message]
2014-09-16 18:38 ` [Qemu-devel] [PULL 0/2] sdl patch queue Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1410849097-7604-3-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=aliguori@amazon.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).