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 03/10] input: add name to input_event_key_number
Date: Mon, 26 May 2014 09:51:19 +0200	[thread overview]
Message-ID: <1401090686-1095-4-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1401090686-1095-1-git-send-email-kraxel@redhat.com>

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 trace-events | 2 +-
 ui/input.c   | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/trace-events b/trace-events
index b6d289d..0870204 100644
--- a/trace-events
+++ b/trace-events
@@ -1050,7 +1050,7 @@ gd_update(int x, int y, int w, int h) "x=%d, y=%d, w=%d, h=%d"
 gd_key_event(int gdk_keycode, int qemu_keycode, const char *action) "translated GDK keycode %d to QEMU keycode %d (%s)"
 
 # ui/input.c
-input_event_key_number(int conidx, int number, bool down) "con %d, key number 0x%x, down %d"
+input_event_key_number(int conidx, int number, const char *qcode, bool down) "con %d, key number 0x%x [%s], down %d"
 input_event_key_qcode(int conidx, const char *qcode, bool down) "con %d, key qcode %s, down %d"
 input_event_btn(int conidx, const char *btn, bool down) "con %d, button %s, down %d"
 input_event_rel(int conidx, const char *axis, int value) "con %d, axis %s, value %d"
diff --git a/ui/input.c b/ui/input.c
index fc91fba..9d63035 100644
--- a/ui/input.c
+++ b/ui/input.c
@@ -94,7 +94,7 @@ static void qemu_input_transform_abs_rotate(InputEvent *evt)
 static void qemu_input_event_trace(QemuConsole *src, InputEvent *evt)
 {
     const char *name;
-    int idx = -1;
+    int qcode, idx = -1;
 
     if (src) {
         idx = qemu_console_get_index(src);
@@ -103,8 +103,10 @@ static void qemu_input_event_trace(QemuConsole *src, InputEvent *evt)
     case INPUT_EVENT_KIND_KEY:
         switch (evt->key->key->kind) {
         case KEY_VALUE_KIND_NUMBER:
+            qcode = qemu_input_key_number_to_qcode(evt->key->key->number);
+            name = QKeyCode_lookup[qcode];
             trace_input_event_key_number(idx, evt->key->key->number,
-                                         evt->key->down);
+                                         name, evt->key->down);
             break;
         case KEY_VALUE_KIND_QCODE:
             name = QKeyCode_lookup[evt->key->key->qcode];
-- 
1.8.3.1

  parent reply	other threads:[~2014-05-26  7:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-26  7:51 [Qemu-devel] [PULL 00/10] input: add event routing and multiseat support Gerd Hoffmann
2014-05-26  7:51 ` [Qemu-devel] [PULL 01/10] input (curses): mask keycodes to remove modifier bits Gerd Hoffmann
2014-05-26  7:51 ` [Qemu-devel] [PULL 02/10] input: add qemu_input_key_number_to_qcode Gerd Hoffmann
2014-05-26  7:51 ` Gerd Hoffmann [this message]
2014-05-26  7:51 ` [Qemu-devel] [PULL 04/10] input: keymap: add meta keys Gerd Hoffmann
2014-05-26  7:51 ` [Qemu-devel] [PULL 05/10] input: switch hid keyboard to new input layer api Gerd Hoffmann
2014-05-26  7:51 ` [Qemu-devel] [PULL 06/10] input: switch hid mouse and tablet to the " Gerd Hoffmann
2014-05-26  7:51 ` [Qemu-devel] [PULL 07/10] input: bind devices and input routing Gerd Hoffmann
2014-05-26  7:51 ` [Qemu-devel] [PULL 08/10] sdl: pass key event source to input layer Gerd Hoffmann
2014-05-26  7:51 ` [Qemu-devel] [PULL 09/10] usb: add input routing support for tablet and keyboard Gerd Hoffmann
2014-05-26  7:51 ` [Qemu-devel] [PULL 10/10] docs: add multiseat.txt Gerd Hoffmann

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=1401090686-1095-4-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).