vte: fix application cursor keys
authorDavid Herrmann <dh.herrmann@googlemail.com>
Sat, 14 Jul 2012 17:34:04 +0000 (19:34 +0200)
committerDavid Herrmann <dh.herrmann@googlemail.com>
Sat, 14 Jul 2012 17:34:04 +0000 (19:34 +0200)
This is probably a copy/paste bug but we sent the wrong application cursor
key sequences. This is only visible in xterm-mode so nobody noticed until
now.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
src/vte.c

index 3ad7565..bb0d5a8 100644 (file)
--- a/src/vte.c
+++ b/src/vte.c
@@ -1911,19 +1911,19 @@ void kmscon_vte_handle_keyboard(struct kmscon_vte *vte,
                        return;
                case XK_Up:
                        if (vte->flags & FLAG_CURSOR_KEY_MODE)
-                               vte_write(vte, "\e[A", 3);
+                               vte_write(vte, "\eOA", 3);
                        else
                                vte_write(vte, "\e[A", 3);
                        return;
                case XK_Down:
                        if (vte->flags & FLAG_CURSOR_KEY_MODE)
-                               vte_write(vte, "\e[B", 3);
+                               vte_write(vte, "\eOB", 3);
                        else
                                vte_write(vte, "\e[B", 3);
                        return;
                case XK_Right:
                        if (vte->flags & FLAG_CURSOR_KEY_MODE)
-                               vte_write(vte, "\e[C", 3);
+                               vte_write(vte, "\eOC", 3);
                        else
                                vte_write(vte, "\e[C", 3);
                        return;