1 diff -urp elinks-0.12pre5.orig/src/terminal/kbd.c elinks-0.12pre5/src/terminal/kbd.c
2 --- elinks-0.12pre5.orig/src/terminal/kbd.c 2009-07-07 14:23:17.000000000 +0200
3 +++ elinks-0.12pre5/src/terminal/kbd.c 2011-06-06 02:29:58.000000000 +0200
4 @@ -765,6 +765,11 @@ decode_terminal_escape_sequence(struct i
8 + if (itrm->in.queue.len == 2 && itrm->in.queue.data[1] == ASCII_ESC) {
10 + set_kbd_interlink_event(ev, kbd.key, kbd.modifier);
13 if (itrm->in.queue.len < 3) return -1;
15 if (itrm->in.queue.data[2] == '[') {
16 @@ -1108,8 +1113,7 @@ process_queue(struct itrm *itrm)
17 * beginning of e.g. ESC ESC 0x5B 0x41,
18 * which we should parse as Esc Up. */
19 if (itrm->in.queue.len < 3) {
20 - /* Need more data to figure it out. */
22 + el = decode_terminal_escape_sequence(itrm, &ev);
23 } else if (itrm->in.queue.data[2] == 0x5B
24 || itrm->in.queue.data[2] == 0x4F) {
25 /* The first ESC appears to be followed