Unix/Linux Go Back    


UNIX for Dummies Questions & Answers This forum is closed for new posts. Please post beginner questions to learn unix and learn linux in this forum UNIX for Beginners Questions & Answers

SunOS 5.10 - VI Arrow keys not working

UNIX for Dummies Questions & Answers


 
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 04-03-2008
ravashingravi ravashingravi is offline
Registered User
 
Join Date: Apr 2008
Last Activity: 3 June 2008, 11:34 PM EDT
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
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
Sponsored Links
    #2  
Old Unix and Linux 04-03-2008
puneet's Unix or Linux Image
puneet puneet is offline
Registered User
 
Join Date: Jan 2008
Last Activity: 16 March 2009, 1:51 AM EDT
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by ravashingravi View Post
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
Sponsored Links
    #3  
Old Unix and Linux 04-03-2008
encrypted's Unix or Linux Image
encrypted encrypted is offline Forum Advisor  
Registered User
 
Join Date: Feb 2004
Last Activity: 19 November 2015, 4:17 AM EST
Location: Oslo, Norway
Posts: 220
Thanks: 0
Thanked 1 Time in 1 Post
OR

use the "h j k l " for navigation.

export EDITOR=vi also helps
    #4  
Old Unix and Linux 04-03-2008
ravashingravi ravashingravi is offline
Registered User
 
Join Date: Apr 2008
Last Activity: 3 June 2008, 11:34 PM EDT
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Problem still exists

Hi

I tried both

set TERM=vt100
and export EDITOR

but nothing is working

Thanks and regards
Ravs
Sponsored Links
    #5  
Old Unix and Linux 11-29-2008
sumitpandya sumitpandya is offline
Registered User
 
Join Date: Mar 2006
Last Activity: 10 April 2014, 6:20 AM EDT
Location: Ahmedabad
Posts: 137
Thanks: 0
Thanked 0 Times in 0 Posts
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
Sponsored Links
    #6  
Old Unix and Linux 11-29-2008
drl's Unix or Linux Image
drl drl is offline Forum Advisor  
Registered Voter
 
Join Date: Apr 2007
Last Activity: 28 July 2017, 10:15 AM EDT
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 2,140
Thanks: 211
Thanked 392 Times in 340 Posts
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
Sponsored Links
    #7  
Old Unix and Linux 12-01-2008
bluescreen bluescreen is offline
Registered User
 
Join Date: Jun 2008
Last Activity: 1 February 2013, 2:00 PM EST
Location: Virginia
Posts: 262
Thanks: 8
Thanked 34 Times in 31 Posts
Quote:
Originally Posted by encrypted View Post
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
Sponsored Links
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
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
Using arrow keys cooldude Solaris 4 06-13-2008 11:51 AM
arrow keys / special keys raguramtgr UNIX for Dummies Questions & Answers 3 02-20-2004 01:45 AM
Trapping Arrow keys nageshrc Shell Programming and Scripting 1 11-30-2001 02:36 PM



All times are GMT -4. The time now is 10:47 AM.