qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>, Anthony Liguori <aliguori@amazon.com>
Subject: [Qemu-devel] [PULL 2/4] console: add kbd_put_string_console
Date: Mon,  2 Jun 2014 16:37:28 +0200	[thread overview]
Message-ID: <1401719850-16998-3-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1401719850-16998-1-git-send-email-kraxel@redhat.com>

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 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

  parent reply	other threads:[~2014-06-02 14:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-02 14:37 [Qemu-devel] [PULL 0/4] sdl2: add support for text consoles Gerd Hoffmann
2014-06-02 14:37 ` [Qemu-devel] [PULL 1/4] console: add kbd_put_qcode_console Gerd Hoffmann
2014-06-02 14:37 ` Gerd Hoffmann [this message]
2014-06-02 14:37 ` [Qemu-devel] [PULL 3/4] sdl2: make Ctrl-Alt-<nr> hotkeys show and hide windows Gerd Hoffmann
2014-06-02 14:37 ` [Qemu-devel] [PULL 4/4] sdl2: textinput + terminal Gerd Hoffmann
2014-06-02 16:06 ` [Qemu-devel] [PULL 0/4] sdl2: add support for text consoles Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1401719850-16998-3-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=aliguori@amazon.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).