Opened 7 years ago

Last modified 14 months ago

#8482 assigned bug

ANSI arrows not working

Reported by: arfonzo Owned by: nobody
Priority: normal Milestone: R1
Component: Applications/Terminal Version: R1/Development
Keywords: ANSI Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description (last modified by diver)

Arrows not working when using ANSI terminal. It sends a "OA" for up, "OB" for down, rather than "[A", etc. For example, when connecting to an ANSI BBS, the full screen editor would send these keys and act strangely, rather than move the cursor.

I have tested the following changes, which seem to work for me:

--- ../terminal/VTkeymap.h      2012-04-18 16:15:37.931921920 +0100
+++ VTkeymap.h  2012-04-19 17:30:45.776208384 +0100
@@ -63,11 +63,10 @@
 #define PAGE_UP_KEY 0x21
 #define PAGE_DOWN_KEY 0x36
-#define LEFT_ARROW_KEY_CODE "\033OD"
-#define RIGHT_ARROW_KEY_CODE "\033OC"
-#define UP_ARROW_KEY_CODE "\033OA"
-#define DOWN_ARROW_KEY_CODE "\033OB"
+#define LEFT_ARROW_KEY_CODE "\033[D"
+#define RIGHT_ARROW_KEY_CODE "\033[C"
+#define UP_ARROW_KEY_CODE "\033[A"
+#define DOWN_ARROW_KEY_CODE "\033[B"

Attachments (1)

VTkeymap.h.patch (585 bytes) - added by arfonzo 7 years ago.

Download all attachments as: .zip

Change History (8)

Changed 7 years ago by arfonzo

Attachment: VTkeymap.h.patch added

comment:1 Changed 7 years ago by arfonzo

Has a Patch: set

comment:2 Changed 7 years ago by diver

Description: modified (diff)
Version: R1/alpha3R1/Development

comment:3 Changed 7 years ago by arfonzo

The patch included does not work by itself--while it fixes the ANSI expected behavior (such as calling BBSes), the local shell's arrows do not work.

For example, using 'less filename', and up/down no longer shifts the view up/down a row.

comment:4 Changed 6 years ago by siarzhuk

Owner: changed from jackburton to siarzhuk
Status: newassigned

comment:5 Changed 4 years ago by siarzhuk

Owner: changed from siarzhuk to nobody

A pair of tickets that are left since I was fond of Terminal improvements. I'm not sure I can finalize them in the nearest future.

comment:6 Changed 14 months ago by pulkomandy

Patch migrated to Gerrit:

comment:7 Changed 14 months ago by pulkomandy

Has a Patch: unset
Note: See TracTickets for help on using tickets.