jed-users mailing list

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

Re: gold key for edt mode


Hi Guenter,

I have some comments on your reply:
1. x-keydefs for / * - and +
  If I put the following in jed.rc these keys work as in jed-EDT.
#ifdef XWINDOWS
  require("x-keydefs");
  x_set_keysym(0xFFAA, 0, Key_KP_Multiply);
  x_set_keysym(0xFFAB, 0, Key_KP_Add);
  x_set_keysym(0xFFAD, 0, Key_KP_Subtract);
  x_set_keysym(0xFFAF, 0, Key_KP_Divide);
#endif
I changed xkeys.c to achieve the same and still wonder whether this
can be done in the next code release.


2. The standard edt.sl contains some of the smartscroll code
(on cursor keys only) and that leads to unexected jumps of
the screen/cursor when other keys bring you to the screen border.
That is why a added my extra code.
By the way there is a simple way of turning this feature off
by making the variable  EDT_Scroll_Begin public.
Then in jed.rc you can set it to 0 to get "no smartscroll".

Providing a smartscroll.sl is another option we could work on
but then I would like to remove the partial solution from edt.sl.

3. Binding Numlock to "toggle_kp" is a bad idea. I reported before
that even on Windows toggling does not work: the keypad toggles to
"Numeric" but you can not toggle back using the Numlock key.
In fact toggling the keypad has different effect on a console
terminal on Linux, a KDE-terminal on Linux, Xjed, etc.
When you run a terminal emulator (like TeraTerm or Putty) it
is different again...
That is why I opt for a different Gold key (even on Windows)
and then KP_7 seems a good choice.

4. You might want to bind Numlock to Gold as well but my choice
would be (and as implemented in my edt.sl) to chose for binding
Numlock to "kbd_quit" or "do nothing".

Testing your other Gold key suggestions again on different systems
is a lot of work and I have to delay that until later to night.

         Thei.

+-------+-------+-------+-------+-------+-------+-------+-------+---+

On Mon, 30 Jan 2006, G. Milde wrote:

On 29.01.06, Thei Wijnen wrote:
Hi,

On Windows there is "no problem" with the Numlock key, but when
I want to use JED on Linux there is a lot of trouble with
the Numlock key. In fact it may be best if we try to avoid
it completely in the future.

I see the point that a user that works on both, WinDOS and Unix would like
to have consistent keybindings -- and as NumLock is problematic with
X-Windows, prefers to have a "Gold-Emulation" in any case.

Key_KP_7 seems like a good candidate for the "Ersatz-Gold-Key" and is
already used so in another `Unix edt editor`__.

__ http://www.atl.lmco.com/projects/csim/gui/edt/edt.html

However, it looks like John does not like to give up the "NumLock is
Gold" as a default in edt.sl (for the benefit of backwards compatibility
and for those using edt on wjed or a Unix console|terminal only).

Thei, could you try to use Johns test edt.sl with x-keydefs.sl from
http://jedmodes.sf.net/mode/x-keydefs/ and in jed.rc (or .jedrc):

 require("x-keydefs");  % this also solves the Key_KP_Add etc. problems
 Key_Gold = Key_KP_7;
 require("edt.sl");

and propose the minimal changes needed to let Johns edt.sl work with this
settings?

From your mail I conclude that there are 2 major problems:

The additions I put in have to do with the fact that if you pick a
different key for Gold, then Numlock starts to do strange things.
For instance it apears to be bound to "edt_line" as a result of
the fact that its generates \eOp in stead of \eOP.

What would be the desired behaviour of Key_NumLock if Key_Gold is set to
a different key (say Key_KP_7)?

 * Work as Key_Gold as well, if possible
 * Toggle the keypad mode (aka Key_Gold Key-Gold)
 * Do nothing

Does the setting of the variable NUMLOCK_IS_GOLD influence the behaviour?
(Try with
  variable NUMLOCK_IS_GOLD=0;
or
  variable NUMLOCK_IS_GOLD=1;
in jed.rc)

(John, would it be possible|helpfull to set NUMLOCK_IS_GOLD to
  Key_Gold == "\eOP"
?)


I can not use a Gold key that is being bound later in edt.sl
(second setkey is not allowed).

(Actually, a second setkey is allowed, if the first is setting exactly
the same string, as
 setkey("bob", "^A");
 setkey("bol", "^A");

but not if the string is already used as *substring* in another
definition as in

 Key_Gold = Key_KP_7;
 setkey("bob", Key_Gold + "A");
 setkey("bol", Key_KP_7);

-> We need a provision to allow the use of Key_KP_7 as Gold, either

 * use the try: ... syntax to skip the Key_KP_7 setting in edt.sl if
   Key_KP_7 == Key_Gold.
 * the "traditional" way -- redirection of an ersatz key to key-Gold,
   in jed.rc (after loading edt.sl as

    require("edt.sl");
    setkey(" \eOP", Key_KP_7);



By the way, I forgot to mention in my previous mail that I use my
version of menus.sl, also to avoid second setkey actions when
the menus are turned on.

Would the standard menus.sl work if you use a jed.rc with outcommented

 %   enable_menu_keys ();

?


Then I put in the symbolic keynames when binding keys.

I hope this change will go into the new "standard" etd.sl.


The third set of changes deals with having advanced scrolling near
the screen edges. This used to work only on the cursor keys and
now I have it also on all other keys that do cursor movements.

IMO, this is a feature that should work independent of the emulation, i.e.

 * not all useres of edt.sl will like it
 * some users of other emulations will like it

and therefore might be better put into a separate file, say
"smartscroll.sl" and evaluated with

 require("smartscroll");

in jed.rc.


Concerning xkeys for / * - :  In xjed they appear always as
/ * - and are inserted as text in your file.

As Marko already mentioned, require("x-keydefs") is the cure for xjed.

Guenter


--
Milde ife.et.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>.


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


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