[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev Overriding the keymap
From: |
John E. Davis |
Subject: |
Re: lynx-dev Overriding the keymap |
Date: |
Fri, 24 Apr 1998 17:26:59 -0400 |
On Fri, 24 Apr 1998 12:10:27 -0400, Kristin McNally <address@hidden> said:
>When you change a keymap in the lynx.cfg file, ie - KEYMAP:g:DO_NOTHING,
>how does this change in lynx.cfg override the keymap[ ] and force the
>'g' key to do nothing?
When lynx reads a key, it calls LYgetch. This returns what I call a
keysym. It the current implementation, the `g' key on your keyboard
will cause LYgetch to return the keysym 0x67 ('g'). To determine the
action that keysym 0x67 invokes, lynx uses the `keymap' array, e.g.,
`action = keymap [0x67]'. If in your lynx.cfg file, you set
`KEYMAP:g:DO_NOTHING' then you are telling lynx to associate the
action `DO_NOTHING' with the 'g' or 0x67 keysym, e.g.,
`keymap[0x67]=DO_NOTHING'. So, keymap[0x67] will result in
DO_NOTHING. Unfortunately, this will cause havoc when you are in an
editing field where ou would like the `g' key to simply insert itself.
For that reason, lynx uses a different map called `EditBinding' to map
the keysym to editing actions. Apparantly you cannot customize these
bindings.
--John