jed-users mailing list

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

Re: xjed and keypad, pc-select-mode


On Tue, 20 Aug 2002 21:44:28 +0200 wrote Nicolas Burrus <neslist@xxxxxxx>:

 
> I think we should get keycode directly from /usr/include/X11/keysymdef.h, so 
> that we would be more standard and compatible. So we would have XK_XXX 
> defined and usable. Any idea to do it by a simple way ?

My idea would be to create a xkeydefs.sl file for the Key-combinations that
work only under X-Win.

Take keysymdef.h and modify it in jed (with regular expression replacement
or rectangle commands) from

#define XK_BackSpace                0xFF08        /* back space, back char */

to

static variable XK_BackSpace =                0xFF08        % back space, back char

and so on, for all keysyms that are supported by jed. John E. D. wrote:

   > Look in /usr/include/X11/keysymdef.h.  The file on my system lists
   > nearly 1500 keysyms.  Xjed supports keysyms in the range 0xFF00 to
   > 0xFFFF.


The next step would be to define strings for all the supported key-combis.
The problem is, that I don't know of any standard for a terminal emulation
that defines strings for all of them :-(

> > Looking at keydefs and the undocumented x_set_keysym feature,
> > I suppose something like
> >
> >   variable Key_Ctrl_Shift_Home        = "\e[1%";
> >
> > might be a better choice. I don't know about a good one for Left, Right,
> > Up, Down, though.
> 
> I don't know, I'll check it.


The last step would be to bind the keysyms to the strings.

   x_set_keysym (Int_Type keysym, Int_Type shift, String_Type str)

All in all a pretty long file...

After this, the user only had to do

  require("x-keydefs")
  
in order to bind something to Key_Shift_Enter and the like.

My dream solution would be to have a function, that does the required steps
automatically, so I could do for example

#ifdef XWINDOWS
x_definekey("<Shift><Enter>", "open_fold");
#endif


Guenter 

--
G.Milde at physik.tu-dresden.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>.


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