Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 May 95 11:33:31 MDT
From:      terry@cs.weber.edu (Terry Lambert)
To:        nox@jelal.hb.north.de (Juergen Lock)
Cc:        ache@freefall.cdrom.com, freebsd-bugs@freefall.cdrom.com
Subject:   Re: Changed information for PR misc/409
Message-ID:  <9505261733.AA27266@cs.weber.edu>
In-Reply-To: <9505252012.AA00108@jelal.hb.north.de> from "Juergen Lock" at May 25, 95 10:12:34 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> > Look at the 'K' capabilities in the termcap database.
> 
>  for digits? (and + - * / enter?)  looks like there are none in 2.0R,
> at least not in the manpage.

This is why I suggested the SCO, Informix, and TERM termcaps.  They
are common extensions.

> > You notice that the ks/ke have \E[?1h and \E[?1l ? These are actually
> > the codes for "application" mode, not keypad mode, and their effect
> > is on the cursor keys, not the keypad keys -- hard to believe that
> > they are supposed to be there.
> 
>  hmm.  this is getting intresting...  if i throw them out (ks=\E=:ke=\E>)
> then vi's and elvis cursor keys don't work anymore! (bash's still do)

That's because the values have been matched to the application mode
start/end in the termcap -- nothing mysterious there.

> > The correct place to patch would be vi/bash/elvis, since the ks/ke are
> > well documented and used.
> 
>  looks like vi and elvis actually use the ks/ke to get the cursor
> keys right and the non-working keypad is just a side effect of this... :/

Right.  I think use of the ks/ke for the application keypad when the
keypad is not the only means of getting cursor key sequences is probably
in error.

TERM uses this (as does Informix and the SCO console) to differentiate
between keypad and non keypad keys.  TERM needs to do this to emulate
going in and out of keypad mode on the emulated VTxxx series terminals;
SCO and Informix use it for different reasons.

>  looks so.  and for the time being i just put this in .exrc:
> 
> :map! ^[Op 0
> :map! ^[Oq 1
> :map! ^[Or 2
> :map! ^[Os 3
> :map! ^[Ot 4
> :map! ^[Ou 5
> :map! ^[Ov 6
> :map! ^[Ow 7
> :map! ^[Ox 8
> :map! ^[Oy 9
> :map! ^[Oj *
> :map! ^[Ok +
> :map! ^[Om -
> :map! ^[On .
> :map! ^[Oo /
> :map! ^[OM ^M

Yah.  This is a common workaround to the problem, though it's quite
terminal specific and the resulting digits are not usable in all modes
of control within vi.  8-(.

>  i think there is some confusion somewhere as to what the ks/ke strings
> really should do...

Me too.


					Terry Lambert
					terry@cs.weber.edu
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9505261733.AA27266>