From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnQjh-00059H-Ix for qemu-devel@nongnu.org; Thu, 22 May 2014 07:00:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnQjb-0007So-Fq for qemu-devel@nongnu.org; Thu, 22 May 2014 07:00:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11709) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnQjb-0007Si-6g for qemu-devel@nongnu.org; Thu, 22 May 2014 07:00:27 -0400 From: Gerd Hoffmann Date: Thu, 22 May 2014 13:00:06 +0200 Message-Id: <1400756406-22617-4-git-send-email-kraxel@redhat.com> In-Reply-To: <1400756406-22617-1-git-send-email-kraxel@redhat.com> References: <1400756406-22617-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 3/3] console: add kbd_put_keysym_console List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Anthony Liguori So you can send keysyms to a specific (text terminal) console. Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 1 + ui/console.c | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index 8a86617..b513e20 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -81,6 +81,7 @@ void do_mouse_set(Monitor *mon, const QDict *qdict); #define QEMU_KEY_CTRL_PAGEUP 0xe406 #define QEMU_KEY_CTRL_PAGEDOWN 0xe407 +void kbd_put_keysym_console(QemuConsole *s, int keysym); void kbd_put_keysym(int keysym); /* consoles */ diff --git a/ui/console.c b/ui/console.c index f6ce0ef..75ec3af 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1056,13 +1056,11 @@ static void kbd_send_chars(void *opaque) } /* called when an ascii key is pressed */ -void kbd_put_keysym(int keysym) +void kbd_put_keysym_console(QemuConsole *s, int keysym) { - QemuConsole *s; uint8_t buf[16], *q; int c; - s = active_console; if (!s || (s->console_type == GRAPHIC_CONSOLE)) return; @@ -1111,6 +1109,11 @@ void kbd_put_keysym(int keysym) } } +void kbd_put_keysym(int keysym) +{ + kbd_put_keysym_console(active_console, keysym); +} + static void text_console_invalidate(void *opaque) { QemuConsole *s = (QemuConsole *) opaque; -- 1.8.3.1