[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 5/5] console: add kbd_put_keysym_console
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 5/5] console: add kbd_put_keysym_console |
Date: |
Mon, 26 May 2014 10:39:30 +0200 |
So you can send keysyms to a specific (text terminal) console.
Signed-off-by: Gerd Hoffmann <address@hidden>
---
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
- [Qemu-devel] [PULL 0/5] console: text terminal updates, Gerd Hoffmann, 2014/05/26
- [Qemu-devel] [PULL 3/5] console: update text terminal surface unconditionally, Gerd Hoffmann, 2014/05/26
- [Qemu-devel] [PULL 1/5] console: Abort on property access errors, Gerd Hoffmann, 2014/05/26
- [Qemu-devel] [PULL 4/5] console: rework text terminal cursor logic, Gerd Hoffmann, 2014/05/26
- [Qemu-devel] [PULL 5/5] console: add kbd_put_keysym_console,
Gerd Hoffmann <=
- [Qemu-devel] [PULL 2/5] console: nicer initial screen, Gerd Hoffmann, 2014/05/26
- Re: [Qemu-devel] [PULL 0/5] console: text terminal updates, Peter Maydell, 2014/05/28