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>.