summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2014-05-27 09:32:36 +0200
committerGerd Hoffmann <kraxel@redhat.com>2014-06-02 16:28:58 +0200
commitbdef97247477955c26806f0eccb0fce9c1ecbeee (patch)
tree43d499b9f6aaf0e8cd665816b8e978f6320ea361
parent50ef4679232369b531d5265ebe92550f98a75ea6 (diff)
downloadhqemu-bdef97247477955c26806f0eccb0fce9c1ecbeee.zip
hqemu-bdef97247477955c26806f0eccb0fce9c1ecbeee.tar.gz
console: add kbd_put_string_console
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r--include/ui/console.h1
-rw-r--r--ui/console.c9
2 files changed, 10 insertions, 0 deletions
diff --git a/include/ui/console.h b/include/ui/console.h
index 4ad16c9..edbaa9b 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -83,6 +83,7 @@ void do_mouse_set(Monitor *mon, const QDict *qdict);
void kbd_put_keysym_console(QemuConsole *s, int keysym);
bool kbd_put_qcode_console(QemuConsole *s, int qcode);
+void kbd_put_string_console(QemuConsole *s, const char *str, int len);
void kbd_put_keysym(int keysym);
/* consoles */
diff --git a/ui/console.c b/ui/console.c
index b99312c..2ce55a6 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1133,6 +1133,15 @@ bool kbd_put_qcode_console(QemuConsole *s, int qcode)
return true;
}
+void kbd_put_string_console(QemuConsole *s, const char *str, int len)
+{
+ int i;
+
+ for (i = 0; i < len && str[i]; i++) {
+ kbd_put_keysym_console(s, str[i]);
+ }
+}
+
void kbd_put_keysym(int keysym)
{
kbd_put_keysym_console(active_console, keysym);
OpenPOWER on IntegriCloud