Commit bdef9724 authored by Gerd Hoffmann's avatar Gerd Hoffmann
Browse files

console: add kbd_put_string_console



Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent 50ef4679
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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 */
+9 −0
Original line number Diff line number Diff line
@@ -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);