Opened 8 years ago

Last modified 23 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"
 
 #define CTRL_LEFT_ARROW_KEY_CODE "\033O5D"
 #define CTRL_RIGHT_ARROW_KEY_CODE "\033O5C"

Attachments (1)

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

Download all attachments as: .zip

Change History (8)

by arfonzo, 8 years ago

Attachment: VTkeymap.h.patch added

comment:1 by arfonzo, 8 years ago

Has a Patch: set

comment:2 by diver, 8 years ago

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

comment:3 by arfonzo, 8 years ago

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 by siarzhuk, 7 years ago

Owner: changed from jackburton to siarzhuk
Status: newassigned

comment:5 by siarzhuk, 5 years ago

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 by pulkomandy, 23 months ago

Patch migrated to Gerrit: https://review.haiku-os.org/#/c/84/

comment:7 by pulkomandy, 23 months ago

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