[illumos-Developer] Terminfo handling of pg/home/etc keys
Joerg Schilling
Joerg.Schilling at fokus.fraunhofer.de
Wed Oct 20 01:47:24 PDT 2010
Guido Berhoerster <guido+illumos.org at berhoerster.name> wrote:
> > > > You'll only find "Pos1" on German keyboards, it's "Home" on my
> > > > 101 US PC keykboard.
> > > > They also generate \E[H and \E[F in my xterm, verified via
> > > > ksh93 -c 'set -o gmacs;function sc { printf "|%q|\n" "${.sh.edchar}";.sh.edchar=;};trap sc KEYBD;read -r c'
> > > >
> > >
> > > On my keyboard, output of this command after pressing Home and End keys
> > > is \EOF and \EOH
> >
> > I cannot speak for ksh93 and I don't know what this program does.....
> >
> > It seems however that ksh93 uses the terminal emulator in a different mode than
> > vi. Which mode the tty operates in depends on the init string that is part of
> > the temcap or terminfo descriptor. The tests however show that the keys
> > labelled "Home" and "End" by xev produce \EOH and \EOF in vi.
>
> That entirely depends wheter is uses the application cursor mode
> or not, in xterm you control it with the appcursorDefault X
> resource, you can also switch modes in the VT Options menu (by
> default opened through ctrl+middle click) where it is called
> "Enable Application Cursor Keys". Depending on whether it is
> enabled or not xterm either produces ANSI or application cursor
> mode escape sequences for all cursor keys. That is documented
> behavior of xterm, please see my earlier mail for a link to the
> corresponding xterm control sequences documentation.
a) You may use a non-standard default for your xterm
b) Even if you change the default state in a different way, if
it has a conforming ANSI terminal emulation, then the second
call to an editor will get the official behavior.
All I can say for now is that the vi (using the TERMINFO entry from Sun)
will see \EOH and \EOF
In addition, I can say that my editor (ved) that is TERMCAP based will also
see \EOH and \EOF even in case you use it together with the TERMINFO->TERMCAP
converted xterm entry from Anil.
Jörg
--
EMail:joerg at schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
js at cs.tu-berlin.de (uni)
joerg.schilling at fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
More information about the Developer
mailing list