[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 4/6] ui/gtk: Fix non-working DELETE key
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 4/6] ui/gtk: Fix non-working DELETE key |
Date: |
Fri, 28 Oct 2016 14:11:36 +0200 |
From: Thomas Huth <address@hidden>
GTK generates key events for the delete key with key->string[0] = 0x7f
... but this does not work right with the readline_handle_byte()
function in util/readline.c, since this treats the keycode 127 as
backspace. So let's add a special case for the GTK delete key to make
this key behave right in the monitor interface of the GTK ui.
Buglink: https://bugs.launchpad.net/qemu/+bug/1619438
Signed-off-by: Thomas Huth <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>
---
ui/gtk.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ui/gtk.c b/ui/gtk.c
index dd13982..ca737c4 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1070,7 +1070,9 @@ static gboolean gd_text_key_down(GtkWidget *widget,
VirtualConsole *vc = opaque;
QemuConsole *con = vc->gfx.dcl.con;
- if (key->length) {
+ if (key->keyval == GDK_KEY_Delete) {
+ kbd_put_qcode_console(con, Q_KEY_CODE_DELETE);
+ } else if (key->length) {
kbd_put_string_console(con, key->string, key->length);
} else {
int num = gd_map_keycode(vc->s, gtk_widget_get_display(widget),
--
1.8.3.1
- [Qemu-devel] [PULL 0/6] ui patch queue., Gerd Hoffmann, 2016/10/28
- [Qemu-devel] [PULL 3/6] gtk: fix compilation warning with gtk 3.22.2, Gerd Hoffmann, 2016/10/28
- [Qemu-devel] [PULL 6/6] curses: Use cursesw instead of curses, Gerd Hoffmann, 2016/10/28
- [Qemu-devel] [PULL 2/6] Defer BrlAPI tty acquisition to when guest starts using device, Gerd Hoffmann, 2016/10/28
- [Qemu-devel] [PULL 5/6] curses: fix left/right arrow translation, Gerd Hoffmann, 2016/10/28
- [Qemu-devel] [PULL 1/6] Add dots keypresses support to the baum braille device, Gerd Hoffmann, 2016/10/28
- [Qemu-devel] [PULL 4/6] ui/gtk: Fix non-working DELETE key,
Gerd Hoffmann <=
- Re: [Qemu-devel] [PULL 0/6] ui patch queue., Peter Maydell, 2016/10/28