On Thu, 15 Feb 2001, Karim Ammouche wrote:

> I have another question : how can I add new commands to lynx ? For instance, 
> I would like to call a function when the user press ^H. Where should I 
> define the new key ? Where should I call my function ?

lynx does this by key-definitions.  They are named with LYK_ prefix, and
(usually) in a table in src/LYKeymap.c - though that can be overridden
or modified by KEYMAP commands in lynx.cfg - and executed in LYMainLoop.c
which has a switch statement for all of the known LYK_xxx definitions.
To see how it's done, I would grep on one of the LYK_xxx definitions to
find the handful of places it's used, and modify the code accordingly.

-- 
T.E.Dickey <[EMAIL PROTECTED]>
http://dickey.his.com
ftp://dickey.his.com


; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to [EMAIL PROTECTED]

Reply via email to