jed-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: Brief and keydefs


On 11.10.05, Marko Mahnic wrote:
> Hi,
> 
> I updated the brief.sl mode to better emulate BRIEF.
> After looking at x-keydefs.sl and kp_keyefs.sl I saw
> that you are using Key_X_Return in x- and Key_X_Enter
> in kp_.

Thanks for pointing this out.

Actually, kp_keydefs.sl is obsoleted by x-keydefs.sl, but I forgot to
update brief.sl (as I do not use it personally).

Version 1.5 fixes this (just uploaded to Jedmodes CVS).


> In brief.sl I added custom_variable("Key_Ctrl_Return", "^J")
> because in the default keydefs.sl it is not defined. 

> It would be better to modify keydefs.sl to define as many keys as
> possible for all systems.

Seconded. However this is up to John to decide.

John, 

  1. do you think it is ok to add variables to keydefs:

       Key_Escape, Key_Alt, Key_*_Return, Key_*_Tab, Key_KP_*

  2. would it be ok to bind some keys in xjed via
  
       private variable set_keysym_p = __get_reference("x_set_keysym");

       if (is_defined("x_server_vendor"))
       {
          % DEL (see also .jedrc for this topic)
          % (on my system it did not distinguish modifiers)
          @set_keysym_p(0xFFFF,  0,   Key_Del); 
          @set_keysym_p(0xFFFF , '$', Key_Shift_Del); 
          @set_keysym_p(0xFFFF , '^', Key_Ctrl_Del);
          
          ...



Until then, we could "re-brand" x-keydefs as "eXtended key
definitions" and add fltk and IBMPC sections there. Modes that require
e.g. keypad bindings or Ctrl-Tab will then require("x-keydefs")
regardless of the jed flavour.

I did the first steps in x-keydefs.sl version 1.4:

 * (re) use the definitions in standard keydefs.sl, 
 * let x-keydefs work on "non-X" jed versions

Just uploaded to Sourceforge, so it will soon appear under
http://jedmodes.sf.net/mode/x-keydefs/

Here are some implications on the startup time:

% Times for evaluating preparsed keydefs files (AMD K6 400):
% 
% 0.009998 s:  keydefs (265 lines of code)
% 0.012646 s:  gkeydefs a short variant of keydefs (171 lines of code)
% 0.016417 s:  x-keydefs 1.3 (replicating the standard keydefs)
% 0.004182 s:  x-keydefs 1.4 (keydefs already loaded)
% 0.013777 s:  x-keydefs 1.4 + keydefs
% 
% * upgrading to x-keydefs version 1.4
% 
%   - saves  0.003 s if the standard keydefs is not already loaded
%   - saves  0.012 s if the standard keydefs is already loaded
%
% * loading extended key definitions
% 
%   - adds 0.004 s startup time



> --------- keydefs.sl
...
> #elifdef XWINDOWS
...

This will give problems: On Unix, jed and xjed use the same preparsed keydefs
file (fljed as well, I suppose)!

 
> I will prepare pc-keydefs.sl and post it here (or add it to jedomdes).

Marko, could you add PC key definitions to x-keydefs.sl instead?
(and upload to the jedmodes CVS?)

Watch for 
% TODO: add the IBMPC definitions here
 

> I also added #ifndef FLTK because all the keys known to FLTK
> will be defined in fl-keydefs.sl

If fl-keydefs.sl is mandatory for fljed (i.e. read in at every startup in
an early stage), it should suffice to write there
  
  provides("keydefs");
  provides("x-keydefs"); 

> Wouldn't it be better to name the files
>   keydefs-x.sl
>   keydefs-pc.sl
>   ...
> This way the files would stick together when sorted in filelist.

With just one x-keydefs.sl, this problem vanishes IMHO.

Thanks, 

Guenter


-- 
G.Milde web.de

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2005 date index] [2005 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]