On Mon, 28 May 2007, Rado S wrote:

Moin,

I have this in lynx.cfg:
        KEYMAP:0x08:HISTORY
        KEYMAP:0x7F:DOWN_TWO
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
http://invisible-island.net
ftp://invisible-island.net


_______________________________________________
Lynx-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lynx-dev

Reply via email to