console: add kbd_put_string_console

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Gerd Hoffmann 2014-05-27 09:32:36 +02:00
parent 50ef467923
commit bdef972474
2 changed files with 10 additions and 0 deletions

View File

@ -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 */

View File

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