From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38824) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrTMu-0005UI-1h for qemu-devel@nongnu.org; Mon, 02 Jun 2014 10:37:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WrTMm-0000ZG-Ap for qemu-devel@nongnu.org; Mon, 02 Jun 2014 10:37:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43141) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrTMm-0000Z3-2q for qemu-devel@nongnu.org; Mon, 02 Jun 2014 10:37:36 -0400 From: Gerd Hoffmann Date: Mon, 2 Jun 2014 16:37:28 +0200 Message-Id: <1401719850-16998-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1401719850-16998-1-git-send-email-kraxel@redhat.com> References: <1401719850-16998-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 2/4] console: add kbd_put_string_console List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Anthony Liguori Signed-off-by: Gerd Hoffmann --- 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