aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 4ad16c9e14..edbaa9b475 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 b99312c014..2ce55a69d0 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);