Thei Wijnen wrote:
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" Doing it again has no effect (should have given "GOLD ON"). So "edt_togglekp" does not work.
Wjed can send only one code for each key. So if we want to use NUM_LOCK as the GOLD key, we would have to rebind all KP keys in edt_togglekp and leave NUMLOCK_IS_GOLD = 1. Here is ano outline of the idea. When wjed is in keypad mode, \eOP should be bound to a function like define eat_numlock() { % message ("GOLD") % wait for 1 sec % if user pressed NumLock again % edt_togglekp % else % push back keypress } when wjed is in application mode, NumLock is bound as it should be for EDT mode. define edt_togglekp() { Edt_Application_Mode = not Edt_Application_Mode; #ifdef IBMPC_SYSTEM if ( not NUMLOCK_IS_GOLD or not Edt_Application_Mode) { % bind KP keys to default values } if (NUMLOCK_IS_GOLD and not Edt_Application_Mode) { % bind NumLock to eat_numlock } if (NUMLOCK_IS_GOLD and Edt_Application_Mode) { % bind KP keys to EDT mode values % bind NumLock NumLock to edt_togglekp } #endif } Marko -------------------------- To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with the word "unsubscribe" in the message body. Need help? Email <jed-users-owner@xxxxxxxxxxx>.