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 John,

I agree that edt_togglekp works, but binding it to the
Numlock key is a bad idea. It "works" just once. Turning
back to "application mode" is indeed possible but not easy
(i.e. by pressing the same key again).

The Numlock key is sending "\eOP", but since "\eOP" has no
binding, and "\eOp" does, it uses that.

I think it is in fact very confusing.  Why \eOp anyway ?
I wonder whether we can and should avoid this ?! If I do not
bind Numlock in jed.rc or edt.sl, I think it should do nothing.
Then its function would be closer to that on Linux where you
can not influence that key.

Thei.

On Mon, 30 Jan 2006, John E. Davis wrote:

Thei Wijnen <t.wijnen@xxxxxxxxx> wrote:
On WindowsXP:

1. jed.rc:
   () = evalfile("emacs");           % Emacs-like bindings
   setkey ("showkey", "^]");         % Ctrl-]
%   NUMLOCK_IS_GOLD = 0;
   () = evalfile("edt-john");             % EDT emulation

The default setting of NUMLOCK_IS_GOLD is 0, which means that when
using EDT emulation you do not intend to use the NumLock key as the
Gold key.  Since no Gold_Key was specified, edt.sl will use the
default key, which is F1.

Pressing ^] Numlock gives: Key "GOLD" runs the S-Lang function "edt_line".

I see what the problem is: the "application_keypad_mode" function in
edt.sl is setting NUMLOCK_IS_GOLD to a non-zero value.  It should not
do this if NUMLOCK_IS_GOLD was set to 0 when edt.sl was loaded.

So: Numlock send "\eOp" (lower case!) -> bound to edt_line
I do not understand this... Certainly wrong.

No, it is sending "\eOP", but since "\eOP" has no binding, and "\eOp"
does, it uses it.

3. jed.rc:
   () = evalfile("emacs");           % Emacs-like bindings
   setkey ("showkey", "^]");         % Ctrl-]
   NUMLOCK_IS_GOLD = 1;
   () = evalfile("edt-john");             % EDT emulation

Pressing ^] Numlock TWICE gives: Key "GOLD GOLD" runs the S-Lang function
         "edt_togglekp".
So: that is correct. So I do it and I see the message "GOLD OFF"

By running the edt_togglekp function, you have turned off the special
handling of the Numlock key.  So pressing Numlock again will have no
effect.

Doing it again has no effect (should have given "GOLD ON").
So "edt_togglekp" does not work.

It does work, but the Numlock key has been deactivated.

On a Putty terminal (or on TeraTerm) connected to a Linux host:
I can not put some line with NUMLOCK_IS_GOLD in, because that
variable is undefined. So I test:

NUMLOCK_IS_GOLD is a windows-specific jed feature.  On other systems,
jed has no way to influence the NumLock key.

4. jed.rc:
   () = evalfile("emacs");           % Emacs-like bindings
   setkey ("showkey", "^]");         % Ctrl-]
%   NUMLOCK_IS_GOLD = 0;
   () = evalfile("edt-john");             % EDT emulation

Pressing ^] Numlock TWICE gives: Key "GOLD GOLD" runs the S-Lang function
         "edt_togglekp".

Your terminal must be set up to have the Numlock key send "\eOP".

So: that is correct. So I do it and I see the message "GOLD OFF"
Doing it again has no effect (should have given "GOLD ON").
Same as above: "edt_togglekp" does not work.

It does work.  On Unix and VMS, edt_togglekp sends an escape sequence
to the terminal to turn off application keypad mode.  To turn it back
on, use M-x edt_togglekp.

On a Putty terminal (or on TeraTerm) connected to a Linux host:

5. jed.rc:
   () = evalfile("emacs");           % Emacs-like bindings
   setkey ("showkey", "^]");         % Ctrl-]
   variable Key_Gold = Key_F12;
   () = evalfile("edt-john.sl");             % EDT emulation

Pressing ^] F12 TWICE gives: Key "ESC [ 2 4 ~ ESC [ 2 4 ~" runs the S-Lang
         function "edt_togglekp".
So: that is correct. So I do it and I see the message "Numeric"
Doing it again has the right effect, I see the message "Application"

Pressing ^] Numlock gives Key "GOLD" runs the S-Lang function "edt_line".
So: Numlock send "\eOp" (lower case!) -> bound to edt_line
I do not understand this... Certainly wrong.

Again, I think the behavior is as expected:  You specified the use of
a different Gold_Key (F12) and jed works with it as expected.

So there are two kinds of problems:
A. edt_togglekp can not be executed by the Numlock key. (windows&linux)
   So do not bind this function to Numlock.

As stated above, the bug is that edt_togglekp should not modify the
NUMLOCK_IS_GOLD key if edt.sl was loaded with NUMLOCK_IS_GOLD set to 0.

B. The Numlock key starts to send something different (\eOp) once
   I define a different Key_Gold. That I do not understand.

(See the above explanation)

Thanks again for the testing and your detailed report.
--John

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