[haiku-bugs] [Haiku] #8482: ANSI arrows not working

  • From: "arfonzo" <trac@xxxxxxxxxxxx>
  • Date: Thu, 19 Apr 2012 16:36:05 -0000

#8482: ANSI arrows not working
-----------------------------------+--------------------------
 Reporter:  arfonzo                |        Owner:  jackburton
     Type:  bug                    |       Status:  new
 Priority:  normal                 |    Milestone:  R1
Component:  Applications/Terminal  |      Version:  R1/alpha3
 Keywords:  ANSI                   |   Blocked By:
 Blocking:                         |  Has a Patch:  0
 Platform:  All                    |
-----------------------------------+--------------------------
 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"

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/8482>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: