[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: XPL early programming decision - whether to RC loop or custom .kbd



≪ Ah! End of wondering! Boy, am I glad I asked. RC loops
it is. ≫

If you want to discard whatever action the user has
assigned to a given key and substitute your own, don't
use . Use  in conjunction with . 
captures the first character or function call assigned to
a key and discards the rest; if you direct  to a
Save/Get () of the pressed
key to branch to different parts of your program, or to
disable the keystroke altogether. Below, for instance,
the program responds to Escape or Enter but nothing else:

==1>;*;
==28!==104>;*;


Note that pressing Escape or Enter above has no effect
other than eliciting the message "You pressed this key".

In contrast,  captures the first character or
function assigned to a key, but *allows any subsequent
characters or functions in the key assignment to execute*
-- unless you loop around and continue to capture them
(something  doesn't allow).  is appropriate when
you want to capture and *give effect to* the user's
assigned key assignments. When you want to suppress them
and substitute your own actions, use .

--
Carl Distefano
cld@xxxxxxxx
http://users.datarealm.com/xywwweb/