Skip to content

Commit

Permalink
console: add kbd_put_string_console
Browse files Browse the repository at this point in the history
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
  • Loading branch information
kraxel committed Jun 2, 2014
1 parent 50ef467 commit bdef972
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/ui/console.h
Expand Up @@ -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 */
Expand Down
9 changes: 9 additions & 0 deletions ui/console.c
Expand Up @@ -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);
Expand Down

0 comments on commit bdef972

Please sign in to comment.