SunOS 5.10 - VI Arrow keys not working


 
Thread Tools Search this Thread
# 1  
Old 04-03-2008
Data SunOS 5.10 - VI Arrow keys not working

Hi

I am working on SunOS 5.10 from remote terminal using putty.
Also
echo $TERM
xterm

In vi editor when in insert mode arrow keys are not working for cursor movement instead they print A B C and D.

Please help.

thanks
ravs
# 2  
Old 04-03-2008
Quote:
Originally Posted by ravashingravi
Hi

I am working on SunOS 5.10 from remote terminal using putty.
Also
echo $TERM
xterm

In vi editor when in insert mode arrow keys are not working for cursor movement instead they print A B C and D.

Please help.

thanks
ravs
before invoking vi give, set TERM=vt100
# 3  
Old 04-03-2008
OR

use the "h j k l " for navigation.

export EDITOR=vi also helps
# 5  
Old 11-29-2008
http://hea-www.harvard.edu/~fine/Tech/vi.html

Title contains entire bible of vi command keys
Below are extract for your solution
:map! ^? ^H
:map! ^[OA ^[ka
:map! ^[OB ^[ja
:map! ^[OC ^[la
:map! ^[OD ^[ha

Above entries you put into $HOME/.exrc file. First entry is to make DELETE work as Backspace and Remaining/Subsequent 4 entries are traversal into file using Arrow-Key. All 5 entries are applicable for "Editing" mode of vi editor.

Below are guideline to type all CONTROL characters
^? = CTRL-V + DELETE
^H = CTRL-V + BACKSPACE
^[OA = CTRL-V + UP-Arrow
^[ka = CTRL-V + ESCAPE + k + a
^[OB = CTRL-V + Down-Arrow
^[ja = CTRL-V + ESCAPE + j + a
^[OC = CTRL-V + Right-Arrow
^[la = CTRL-V + ESCAPE + l + a
^[OD = CTRL-V + Left-Arrow
^[ha = CTRL-V + ESCAPE + h + a
# 6  
Old 11-29-2008
Hi.

I don't use PuTTY much, but I was able to duplicate the problem. The solution that worked for me was to change a setting in the Features panel.

This session was from PuTTY running on a Microsoft W2K box connected to a Solaris 10 box. The version of PuTTY is:
Code:
2005-11-26:r6470

After you have logged in:
1) right click on the Title bar
2) Mouse down and select Change Settings
3) Click Features from the left side
4) Uncheck:
Disable application keypad mode
5) Click the Apply button

If this works, you may want to save the new session settings. You may be able to do this without logging in -- I didn't test that. In my situation, I have none of the features checked.

I tested the behavior by checking and unchecking the box and it seemed to cause your symptoms to appear and disappear.

The other solutions posted may also work, but this seems like an easy solution.

Best wishes ... cheers, drl
# 7  
Old 12-01-2008
Quote:
Originally Posted by encrypted
OR

use the "h j k l " for navigation.

export EDITOR=vi also helps
Ravash-

Of the responses above, this is your best option.

HTH
 

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Sendmail not working in SUNOS scriptor Solaris 3 12-19-2017 06:51 AM
Read a multiline text from a console - supporting arrow keys wenclu Shell Programming and Scripting 8 10-16-2012 01:51 AM
Arrow keys binding in AIX v5.3 - how? alex_5161 UNIX for Dummies Questions & Answers 2 12-22-2011 06:40 PM
Tux-HJKL as arrow keys dotancohen UNIX for Dummies Questions & Answers 2 09-01-2011 04:14 PM
SSH closes connection when using arrow keys stv_t UNIX for Advanced & Expert Users 0 09-17-2009 06:53 AM
problem using arrow keys in bash shell Moumou Shell Programming and Scripting 2 07-17-2009 03:14 AM
Using arrow keys in shell scripts cambridge Shell Programming and Scripting 4 05-26-2009 06:15 AM
tr -d is not working on SunOS 5.9 millan Solaris 1 05-18-2009 08:02 AM
command scrolling using arrow keys hemangi13 UNIX and Linux Applications 4 09-11-2008 12:53 PM
Using arrow keys cooldude Solaris 4 06-13-2008 11:51 AM
How to read arrow keys on really old bash? simonb Shell Programming and Scripting 1 05-01-2006 10:27 AM
how do I get my arrow keys to work for looking thru my PREVIOUS UNIX COMMANDS spotnis UNIX for Dummies Questions & Answers 11 09-14-2005 01:22 AM
arrow keys / special keys raguramtgr UNIX for Dummies Questions & Answers 3 02-20-2004 01:45 AM
vi down arrow key not working artjaniger UNIX for Dummies Questions & Answers 2 06-27-2003 11:40 AM
Trapping Arrow keys nageshrc Shell Programming and Scripting 1 11-30-2001 02:36 PM