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 12.10.05, Marko Mahnic wrote:
> G. Milde wrote:
> >
> >Marko, could you add PC key definitions to x-keydefs.sl instead?
> >(and upload to the jedmodes CVS?)
 
> (I thought the X in x-kedefs was for XWindows).

So did I (initially). This is why I said 

   we could "re-brand" x-keydefs as "eXtended key definitions" ...

 
> 1.
> The TODO is inside an #ifdef and the problem persist. Since I use
> FLJED and wjed for testing, the library is shared between
> two distinct systems, so if I precompile x-keydefs, it will
> work only for one system.

Do you really have success with this setup? (Long time ago I decided that
it is not worth the hazzle to share the jed library between DOS and Linux
(too many occurences of #ifdef <some OS> ...)

However, if you do this, it should be possible so it should be supported.
(Or you do not precompile as long as you test and move to distinct
libraries afterwards.)

 
> This problem could be fixed if we had a function in SLang that
> would tell us if a preprocessor symbol is defined:
> 
>   if (is_symbol_defined("FLTK")) () = evalfile ("fl-keydefs");
    ...
    
The current workaround (suggested by John) is to look for some special
function, e.g. in keydefs.sl

   private variable Is_Xjed = is_defined ("x_server_vendor");
   
   private define setkey_via_terminfo (tc, def)
   {
      if (Is_Xjed)
        return def;
   ...

The same scheme works for testing the SLang or JED version. It can be
fooled, however, by the existence of a library version emulating the
"indicator function".

> This way:
>   - keydefs.sl would only be a few lines long
>   - every system would have the keys defined separately
>   - if different system would be using the same library, there
>     would be no conflicts and every system would load just what
>     it needs and nothing more.

Alternatively, a non-precompiled configuration file could load the right
flavour of keydefs-* which in turn provides("keydefs"). This way we do
not need a "dispatcher" keydefs.sl.

> 2.
> I have prepared a set of macros to generate xkeys.c and XX-keydefs.sl
> from a comma separated file (exported from Open Document spreadsheet
> where I manage all the keysyms for fljed).

Why do the keystrings differ between xjed and fljed?

> Some time back I sent John some code that would enable jed to
> x_set_keysym(X, ...) for an arbitrary X (0x0000 - 0xffff). I
> am using this code in FLTK and I am able to remap keys
> such as Ctrl-M that conflicts with Return (John suggested
> that it would be best for Return to output "^M", so we
> have to remap Ctrl-M).

% On 28 May 2003 John wrote to jed-users:
% I will fix it in the next release.  When I wrote the code, there were
% no such keysyms below 0xFF00.

So I still hope...

 
> 3.
> Because the files are autogenerated it is a hard work to
> add just the differences into x-keydefs.

I see.

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]