- Subject: Re: gold key for edt mode
- From: "G. Milde" <g.milde@xxxxxx>
- Date: Tue, 31 Jan 2006 11:49:52 +0100
On 30.01.06, John E. Davis wrote:
> Thei Wijnen <t.wijnen@xxxxxxxxx> wrote:
> >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.
...
> 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.
Not really what you expect from a toggle (and as uninitated user I would
consider the key a toggle, not the function).
Is there a chance to enhance teh edt_togglekp function to keep the
binding of <NumLock NumLock> for both modes (which string is sent by
NumLock in non-application mode)?
If not, I would prefer this function not to be bound to <NumLock NumLock> by
default.
> >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.
NUMLOCK_IS_GOLD is actually a "custom_variable" (see Help>Describe
Function: custom_variable). You should use
variable NUMLOCK_IS_GOLD = 0; % or 1;
in your jed.rc file. However, as
> NUMLOCK_IS_GOLD is a windows-specific jed feature.
I suppose there is no effect on other systems.
> On other systems, jed has no way to influence the NumLock key.
Oh, I just read that
> By running the edt_togglekp function, you have turned off the special
> handling of the Numlock key.
so IMHO at least on terminals that send "\eOP" when the NumLock key is
pressed some indirect change is possible.
On xjed, x_set_keysym() can be used to change the associated strings to
the keypad keys that have different keysyms for "NumLock" vs. "Standard"
mode. This way NumLock could be used to toggle the modes without itself
beeing recognized by xjed.
Actually, I favour the more genric configuration of the GOLD key
emulation via setting Key_Gold. However, for backwards compatibility it
could be nice to have something like
#ifdef IBMPC_SYSTEM
custom_variable("NUMLOCK_IS_GOLD", 1);
#else
custom_variable("NUMLOCK_IS_GOLD", 0);
#endif
if (NUMLOCK_IS_GOLD)
custom_variable("Key_Gold", "\eOP");
else
custom_variable("Key_Gold", Key_F1); % backwards compatible
% custom_variable("Key_Gold", Key_KP_7); % user frienldy
so existing configuration files would continue to work as before.
Personally, I would prefer the follwing (untested) version, (still
honouring NUMLOCK_IS_GOLD if it exists but introducing a new default with
cross-platform consistency):
if (andelse{is_defined("NUMLOCK_IS_GOLD")}
{@__get_reference("NUMLOCK_IS_GOLD"))
custom_variable("Key_Gold", "\eOP");
else
custom_variable("Key_Gold", Key_KP_7); % user frienldy
On 30.01.06, Thei Wijnen wrote:
> On Mon, 30 Jan 2006, John E. Davis wrote:
> >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.
This is a side effect of the very nice feature that if I bind e.g.
Ctrl-D D ("^DD") to some function but not "^Dd", pressing Ctrl-D d will
call this function too (which is what I expect).
> Why \eOp anyway ?
This is Key_KP_0 on my xjed.
> 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.
I favour some feedback as e.g
if (Key_Gold != "\eOP")
setkey("vmessage(\"Key_Gold is bound to \\\\"%s\\\\"\", Key_Gold)", "\eOP");
(with verror(), it would have the sideeffect of aborting a kbd command
and (depending on your configuration) ringing a bell).
Thanks
Günter
--
g.milde@xxxxxx
--------------------------
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]