lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev partial message (was Re: Changing the keymap code (PATCH))


From: Ilya Zakharevich
Subject: Re: lynx-dev partial message (was Re: Changing the keymap code (PATCH))
Date: Sun, 7 Feb 1999 23:46:06 -0500

On Sun, Feb 07, 1999 at 03:59:37PM -0800, Doug Kaufman wrote:
> I wonder if someone who understands this better could write a blurb
> for the lynx users guide to explain this. The functionality of
> .lynx-keymaps seems to duplicate that of lynx.cfg (where keys are
> mapped directly to a LYK_FUNCTION). I presume the main use is so
> individual users on a multiuser system don't have to have a separate
> copy of lynx.cfg

Absolutely not.  To get a keybinding in lynx you need a two-step
process, one step in .lynx-keymap, another in LYNX_CFG.  Say, I have
this in .lynx-keymaps:

  setkey "\200s" 0x211  # C-left

and this in LYNX_CFG file:

  KEYMAP:0x211:LEFT_LINK

This actually allows me to use Control-Left in lynx to act as
LEFT_LINK.  As I explained in my other message, this is a multi-step
process: 

         a) my "keyboard" (=TTY emulator) emits "\0s" when I press C-left.  

         b) NCURSES do not know about this combination (how would I
            code this in terminfo terms?), so they translate this to "\200s".

         c) Then Lynx key-translation algorithm takes place, and maps
            it into "an abstract keypress" 0x211.

         d) *Then* an abstract keypress is translated via KEYMAP to
            LEFT_LINK "lynx-action".

This *either* should be made much-easier, *or* one need to reserve a
region in the set of "abstract keypresses" for such bindings, so that
they will not contradict to actual keycodes generated by NCURSES or
SLANG.  The problem with reserving such region is similar (but
different) to a possibility to allow additional "lynx-action"
designators, such as MOUSE_KEY and/or SAVE_DOCUMENT.

Ilya

reply via email to

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