qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 2/4] console: add kbd_put_string_console


From: Gerd Hoffmann
Subject: [Qemu-devel] [PULL 2/4] console: add kbd_put_string_console
Date: Mon, 2 Jun 2014 16:37:28 +0200

Signed-off-by: Gerd Hoffmann <address@hidden>
---
 include/ui/console.h | 1 +
 ui/console.c         | 9 +++++++++
 2 files changed, 10 insertions(+)

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);
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]