2

I have been away from Solaris for the last 5 years. I am use to use pageup and pagedown rather than b and f.

Anyone know a simple way to make this work? My shell is /bin/tcsh ( Im QA so I cannot change this. ) if it matters

Brian G
  • 375
  • 2
  • 5
  • 19

1 Answers1

6

You can do it using the lesskey feature:

$ cat >/tmp/lk <<%
\e[6~ forw-screen
\e[5~ back-screen
%

$ lesskey /tmp/lk

and you are set.

jlliagre
  • 8,691
  • 16
  • 36
  • But still, isn't it a bug in less that `PgUp` is treated as `PgDn`? This phenomenon also happens in `xterm` with the `sunKeyboard` resource true (or "Main Option" -> "Sun Function-Keys" enabled). – Jens Apr 28 '11 at 15:19
  • I wouldn't call it a bug because as far as I know, the page up and down keys aren't documented to do anything specific in the less documentation. It is then an undefined behavior and a coincidence if PgUp and PgDn are doing the same thing. – jlliagre Apr 29 '11 at 14:06