[Top][All Lists]

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

Re: lynx-dev Key remapping problem

From: Doug Kaufman
Subject: Re: lynx-dev Key remapping problem
Date: Fri, 27 Nov 1998 02:26:04 -0800 (PST)

On Thu, 26 Nov 1998, Ilya Zakharevich wrote:

> I'm somehow lost wrt key remapping in lynx.  Looking through the
> source of LYKeymap.c, I get an impression that keymap[] goes up to
> 0x293 or some such.
> However, a pair
>   setkey "^[^[" 0x81
> works, but
>   setkey "^[^[" 0x210
> does not.  Moreover, I cannot make this work on PC:
>   setkey "\000s" 0x81
> The ideal would be to document something like: the region 0x120..0x160
> is reserved for user-defined keys, and make sure they work.  
> A possibility to remap PC keys would not hurt too  ;-).

I will try to answer this, since I submitted the patch that revised
the keymapping code, allowing keymapping of special keys with the
DJGPP and Windows ports. The code that gets in the way of your second
mapping is in LYStrings.c, lines 1205-1209. The limits on the keys
that can be remapped were changed for the DJGPP and Windows ports to
0x293, but were left for other platforms at the previous value of
0x10e. (The value of DO_NOTHING in LYStrings.h). Mapping tables to
be used for the DOS and Windows ports are in the files djgpp.key,
slang.key, and pdcurses.key in the docs subdirectory of the lynx
distribution. Default key mapping can be found in the keymap[] array
in LYKeymap.c If you have a platform which maps keys above 0x10e,
just change the line in LYStrings to allow the mappings. If there is
a general ability or desire to do these mappings on other platforms,
it would be simple to change DO_NOTHING in LYStrings.h and LYKeymap.c
to 0x294 and expand the keymap[] array by one element. Then all these
keys could be mapped on any platform that supports it. You would have
to watch for surprise mappings, because of the handling of PDCurses.
Since there is no define in the lynx code for PDCurses, it is seen as
"(defined(_WINDOWS) || defined(__DJGPP__)) && !defined USE_SLANG", and
has default mappings for it in the higher keys in keymap[].

Please write back if this doesn't answer the question in a
satisfactory manner. Also, what platform are you using? Why the need
to use keys above 0x10e?
Doug Kaufman
Internet: address@hidden (preferred)

reply via email to

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