[Top][All Lists]

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

Re: [Lynx-dev] backspace vs. delete can't have separate function

From: Thomas Dickey
Subject: Re: [Lynx-dev] backspace vs. delete can't have separate function
Date: Mon, 28 May 2007 09:05:50 -0400 (EDT)

On Mon, 28 May 2007, Rado S wrote:


I have this in lynx.cfg:
in lynx in ssh in "XTerm(203)" (xterm -version), where delete
produces ^? and backspace produces ^H, _both_ keys act as DOWN_TWO.
What's wrong?
Even reversing the order of the 2 doesn't change the result.

I looked in Lynx.trace for GETCH lines, which show more/less the keystrokes that lynx reads.

It seems that curses is returning ^H as KEY_BACKSPACE (0x107 is 0407 for which see curses.h rather than lynx.cfg's KEYMAP), which lynx then translates into <delete> (see LYgetch_for()):

GETCH: Got 0x107.
LYReadCmdKey(0) -><delete> (0x7f)

and a literal 0x7f is returned by curses - lynx keeps that as-is.

GETCH: Got 0x7f.
LYReadCmdKey(0) -><delete> (0x7f)

BTW, what kind of codes >0xFF are those?
I know they are "function keys", but how are they translated?
How do they relate to literal chars pressed or terminfo?

it's written down in lynx.cfg (but as noted above, curses and slang
have their own codes which lynx first translates into its own):

# Keystrokes for special keys are represented by the following codes:
#         Up Arrow: 0x100

Thomas E. Dickey

reply via email to

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