login
Header Space

 
 

Re: A modified LESS to accept arrow keys

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
Date: Wednesday, April 14, 1993 - 6:17 pm

I tried the lesskey program that someone pointed out to me...
Wow, what a concept!  :)

Here's what I did:

I have a file called .lessrc that contains the following:

^[[B    forw-line       # down arrow
^[[A    back-line       # up arrow
^[[6~   forw-scroll     # page down
^[[5~   back-scroll     # page up
^[[1~   goto-line       # home
^[[4~   goto-end        # end 

(note:  the ^[ has to be an ESC  i.e. in vi, type "i" for input mode,
        press CTRL-v, and then press the Escape key.  I'm not sure if
        putting the '^' character and then the '[' character works.)

After you have this file, enter:
        lesskey .lessrc
and the file ~/.less will be created with the key sequences.
Now less recognizes your new key sequences.

-Anthony

-- 
Anthony Hall                              _   _   Unix System Administrator
aehall@seattleu.edu                      /_/ /_/ Physician Micro Systems, Inc.
                                        _   _   2033 6th Ave Suite 707          
                                       /_/ /_/ Seattle, WA 98122  206-441-8490
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: A modified LESS to accept arrow keys, root-bound, (Wed Apr 14, 6:17 pm)
speck-geostationary