lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev linux F1 key and slang (was http://x28.deja.com/=dnc/[ST_rn=ps,


From: Klaus Weide
Subject: lynx-dev linux F1 key and slang (was http://x28.deja.com/=dnc/[ST_rn=ps,ST_m=ps]/getdoc.xp?AN=499905285&CON)
Date: Mon, 12 Jul 1999 19:26:50 -0500 (CDT)

[ I'm taking this to lynx-dev; some previous exchange can be found
  at <http://www.debian.org/Bugs/db/40/40556.html>.  I have cc'd
  the slang author because the lynx change log entry
  
  1998-05-10 (2.8.1dev.10)
  * added John Davis' keymaps/keysym patch (it really should be integrated
    wit the normal lynx.cfg file).

  indicates that a relevant change was originally from him. ]

On Mon, 12 Jul 1999, Francesco Potorti` wrote:

> Just upgraded to lynx-ssl 2.8.2.1.  On a Linux terminal, pressing F1 I get
> the prompt:
> 
>   Save D)ocument or L)ink to bookmark file or C)ancel? (d,l,c):
> 
> which is normal, because in the current definition of the linux terminal, I
> have kf1=\E[[A;.  

The \E[[ is unrecognized and thus ignored, then the following char 'A'
is seen by lynx and treated as a new key (in this case, mapped to
ADD_BOOKMARK).

> It  is normal in the sense that lynx  does not know about
> F1.  If I try in an xterm, however, it works.  This supports Klaus'
> observation that it may be slang's culprit, even if I cannot imagine why:
> the F1 definition is there in the terminfo database, both in the linux and
> in the xterm definitions.

It seems that lynx-with-slang uses only a limited set of the terminfo
capabilities.  Specifically, it doesn't use key_* capabilities.

Some vtXXX-ish escape sequences for F1 are hardwired into lynx
(setup_vtXXX_keymap in LYStrings.c), probably relevant change log entries
under 1998-09-22 (2.8.1pre.1):
  * correct keymap strings for F1 and DO_KEY - TD
  * add keymap table entries for F1, to accommodate slang which appears to 
ignore
    terminal description when keymaps are defined - TD
That's probably why it works under xterm.  But there is no hardwired
escape sequence for the linux-specific "\033[[A" for F1.  

(Actually, the sequence is recognized "by hand" in the version of
LYgetch_for() in LYStrings.c that isn't used any more with the for-slang
"keymaps/keysym patch".  That code path is for systems that don't have
keypad() functionality, and maybe as a fallback for those that have,
but slang-with-USE_KEYMAPS doesn't use it.)

Do any slang applications (that don't have the escape sequence hardcoded)
recognize the linux console F1 based on the terminfo key_f1?
If not, it looks like a limitation that comes with using slang.
If yes, lynx code should probably be updated to do the same thing as
those applications.

The F1 sequence could also be explicitly added to the vtXXX_keymap 
table in LYStrings.c.  But it looks like a bad idea to me to
continue adding system-specific non-standard escape sequences
there.  (And there's nothing vtXXX-ish about the linux key_f1).

   Klaus




reply via email to

[Prev in Thread] Current Thread [Next in Thread]