提交 3f9a6e85 编写于 作者: G Gerd Hoffmann

console: add kbd_put_keysym_console

So you can send keysyms to a specific (text terminal) console.
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 aea7947c
...@@ -81,6 +81,7 @@ void do_mouse_set(Monitor *mon, const QDict *qdict); ...@@ -81,6 +81,7 @@ void do_mouse_set(Monitor *mon, const QDict *qdict);
#define QEMU_KEY_CTRL_PAGEUP 0xe406 #define QEMU_KEY_CTRL_PAGEUP 0xe406
#define QEMU_KEY_CTRL_PAGEDOWN 0xe407 #define QEMU_KEY_CTRL_PAGEDOWN 0xe407
void kbd_put_keysym_console(QemuConsole *s, int keysym);
void kbd_put_keysym(int keysym); void kbd_put_keysym(int keysym);
/* consoles */ /* consoles */
......
...@@ -1056,13 +1056,11 @@ static void kbd_send_chars(void *opaque) ...@@ -1056,13 +1056,11 @@ static void kbd_send_chars(void *opaque)
} }
/* called when an ascii key is pressed */ /* called when an ascii key is pressed */
void kbd_put_keysym(int keysym) void kbd_put_keysym_console(QemuConsole *s, int keysym)
{ {
QemuConsole *s;
uint8_t buf[16], *q; uint8_t buf[16], *q;
int c; int c;
s = active_console;
if (!s || (s->console_type == GRAPHIC_CONSOLE)) if (!s || (s->console_type == GRAPHIC_CONSOLE))
return; return;
...@@ -1111,6 +1109,11 @@ void kbd_put_keysym(int keysym) ...@@ -1111,6 +1109,11 @@ void kbd_put_keysym(int keysym)
} }
} }
void kbd_put_keysym(int keysym)
{
kbd_put_keysym_console(active_console, keysym);
}
static void text_console_invalidate(void *opaque) static void text_console_invalidate(void *opaque)
{ {
QemuConsole *s = (QemuConsole *) opaque; QemuConsole *s = (QemuConsole *) opaque;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册