* Re: Help! The [PageUp] and [PageDown] keys don't work!
1996-06-13 4:00 Help! The [PageUp] and [PageDown] keys don't work! David Phan
@ 1996-06-13 4:00 ` Donn Cave
1996-06-14 4:00 ` Paul David Fardy
1996-06-16 4:00 ` Hendrik S. Roepcke
2 siblings, 0 replies; 4+ messages in thread
From: Donn Cave @ 1996-06-13 4:00 UTC (permalink / raw)
In article <4pp7pf$q3e@alpha.comsource.net>, dphan@alpha.comsource.net
(David Phan) wrote:
| Help! I am a newbie to xterm. For some reason, the [PageUp]
| and [PageDown] keys don't work when I am editing files with
| vi or PICO. It works fine when I switched to DECterm.
| I am using Software Version: DEC OSF/1 Version 3.1,
| DECwindows Motif Version 1.2.
|
| For your information, the environment variables in the
| xterm session are listed below:
Vi and pico respond to character sequences sent by the
terminal emulator. I don't know what DECterm sends on
a PageUp, but the funny thing is, I can't think of anything
that would make any sense in both vi and pico - their
escape sequences are very different.
Anyway, terminal emulators don't find out what escape
sequences they're supposed to send by looking in termcap,
but xterm does have an X11 "resource" that you can use
to modify keys, VT100.Translations.
*.VT100.Translations: #override \n\
<Key>Prior: scroll-back(1,page) \n\
<Key>Next: scroll-forw(1,page)
Put that in a file, read it with xrdb -merge, and PageUp will
go back one page on the scroll bars. To know that, I had to
read the xterm man page to find its actions and resources,
and I had to use xev to find the X11 name for the key
that on my keyboard had "Page Up" written on it.
I don't think that's what you want - it would be hopelessly
confusing to use the scroll bar while editing in vi or pico.
If you can figure out what escape sequence to use, replace
``scroll-back(1,page)'' with ``string("\033[A")'' or whatever -
\033 is the Escape character.
Good luck, this is about the most complicated thing to
customize, so afterwards you'll know everything there is to know.
Donn Cave, University Computing Services, University of Washington
donn@u.washington.edu
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Help! The [PageUp] and [PageDown] keys don't work!
1996-06-13 4:00 Help! The [PageUp] and [PageDown] keys don't work! David Phan
1996-06-13 4:00 ` Donn Cave
@ 1996-06-14 4:00 ` Paul David Fardy
1996-06-16 4:00 ` Hendrik S. Roepcke
2 siblings, 0 replies; 4+ messages in thread
From: Paul David Fardy @ 1996-06-14 4:00 UTC (permalink / raw)
Re: termcap info.
There are two databases on terminals: the System V flavoured terminfo
and the older termcap. It appears that, under Digital UNIX, vi uses
the terminfo database, so you'll have to modify the system terminfo
database or build your own.
--
dphan@alpha.comsource.net (David Phan) writes:
>Help! I am a newbie to xterm. For some reason, the [PageUp]
>and [PageDown] keys don't work when I am editing files with
>vi or PICO. It works fine when I switched to DECterm.
DECterm uses the vt200 terminfo entry which includes the following
definitions.
kdo=\E[29~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, khlp=\E[28~,
Add these (at least knp and kpp) to the xterm entry in your xterm
terminfo source file, /usr/lib/terminfo/xterm.ti. Then run tic
(terminfo compile) on the xterm.ti file. If your updating the system
terminfo database, remember to "chmod -R a+rX /usr/lib/terminfo/x"
after you tic, else others may not be able to access the database.
The terminfo database consists of binary files stored in a shallow
directory tree, one file per termtype: the vt100 entry is
$TERMINFO/v/vt100, xterm is $TERMINFO/x/xterm--see a pattern? :-)
TERMINFO would be an environment variable specifying the path to your
terminfo database; the default path, /usr/lib/terminfo, is used if you
have no TERMINFO variable set.
--
Re: vi's mapping of npage to ^F, etc.
This automapping is not documented in the ex or vi man pages and
it doesn't appear possible to remap these keys. You can map the
function keys, though. I map the keys to change the shiftwidth
and autoindent options.
map #1 :set ts=8 sw=4^M
map #2 :set ts=5 sw=5^M
map #3 :set noai^M
map #4 :set ai^M
I usually work in states 2 and 4, but I switch to 1 and 3 when working
with tab aligned files or when I cut and paste from one xterm to
another. Those are literal carriage returns that I put in my .exrc.
Each #<digit> in the map must be matched by a kf<digit> in your terminfo
entry.
Paul Fardy
--
Paul David Fardy | pdf@morgan.ucs.mun.ca
Computing and Communications | pdf@InfoNET.st-johns.nf.ca
Memorial University of Newfoundland |
St. John's, NF A1C 5S7 |
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Help! The [PageUp] and [PageDown] keys don't work!
1996-06-13 4:00 Help! The [PageUp] and [PageDown] keys don't work! David Phan
1996-06-13 4:00 ` Donn Cave
1996-06-14 4:00 ` Paul David Fardy
@ 1996-06-16 4:00 ` Hendrik S. Roepcke
2 siblings, 0 replies; 4+ messages in thread
From: Hendrik S. Roepcke @ 1996-06-16 4:00 UTC (permalink / raw)
dphan@alpha.comsource.net (David Phan) writes:
>Help! I am a newbie to xterm. For some reason, the [PageUp]
>and [PageDown] keys don't work when I am editing files with
>vi or PICO. It works fine when I switched to DECterm.
>I am using Software Version: DEC OSF/1 Version 3.1,
>DECwindows Motif Version 1.2.
how about:
man -k tset
man -k <your shell>
man stty
man resize
Hendrik
PS: Yes, csh is not working in the manner of the manpages..
--
Panther in the Jungle __..--''``\--....___ _..,_
-BELIEVE AND DECEIVE- _.-' .-/"; ` ``<._ ``-+'~=.
http://www.ang-physik _.-' _..--.'_ \ `(^) )
.uni-kiel.de/~hendrik ((..-' (< _ ;_..__ ; `'
^ permalink raw reply [flat|nested] 4+ messages in thread