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

Re: Windows cursor behaviour



** Reply to message from "B. Gillessen"  on Wed, 18 Dec
2002 16:56:40 +0100

Benedikt:

> Has someone tried to imitate the cursor behaviour of
> MS Word/Windows under XyWrite?

> i. e.
> Ctrl+Left=previous word,
> Ctrl+Shift+Left=include last word into defined text (or start
>  definition at cursor position and include anything up to the
>  begin of the word)
> ...

> Some of these functions can be easily emulated with "plain"
> function calls,

Func PW PreviousWord for Ctrl-Left

> but some others need a more sophisticated XPL programming

Not very sophisticated. I'm not sure that you can emulate M$Word
behavior exactly because, for example, in Word how would you
select a multi-word block of text, and then place your cursor in
the middle of it (as you easily can in XyWrite) without de-
selecting the text block? I can't (but I'm not proficient in
Word, so maybe there's a way). Also, it strikes me as totally
irrational that, if put your cursor in the middle of a word and
select it (double LMB), and then hit Ctrl-Shift-Left, the cursor
jumps to the beginning of the word BUT you lose your selection
entirely! That's silly, and can't be the intent of this
keystroke. Unless I'm missing something.

Here's the basic functionality (import this msg into XyWrite,
then "DECODE" to convert to true executable XPL):

XPLeNCODE v2.0
b-gin [UNTITLED]
{<}IF{<}VA$DF{>}>0{>}[DB_]{<}EI{>}{<}SX01,{<}CP{>}{>}[DM_][PW
_][NW_]{<}IF{<}CP{>}>={<}PV01{>}{>}[PW_]{<}EI{>}[DF_][cr|lf][
cr|lf]Transformed into a U2 frame, it would look like this:[c
r|lf][cr|lf]{{;5csl}} Emulate M$Word Ctrl-Shift-Left RJH 12/
19/02[cr|lf]{002}{<}IF{<}VA$DF{>}>0{>}[DB_]{<}EI{>}{<}SX01,{<
}CP{>}{>}[DM_][PW_][NW_]{<}IF{<}CP{>}>={<}PV01{>}{>}[PW_]{<}E
I{>}[DF_]{002}[cr|lf][cr|lf]Then you'd assign it to a KBDfile
 key:[cr|lf][cr|lf]nn=QHJM2,.,c,s,l,Q2[cr|lf][cr|lf]*OR* you{032}
could avoid U2 by calling XMACRO from the KBD file (but XMACR
O can feel sluggish if you don't have a fast machine):[cr|lf]
[cr|lf]nn=NOXHJM,(,2,.,P,r,s,K,b,d,A,r,g,),X,M, ,[,I,F,[,V,A,
$,D,F,],>,0,],CO,D,B,[,E,I,],[,S,X,0,1,CO,[,C,P,],],CO,D,M,P,
W,N,W,[,I,F,[,C,P,],>,=,[,P,V,0,1,],],CO,P,W,[,E,I,],CO,D,F,N
O[cr|lf]
-nd

Let me know if this works for you, and if the emulation is
accurate. (This machine uses Word 2002 under WXP.)
XPLeNCODE

-----------------------------
Robert Holmgren
holmgren@xxxxxxxx
-----------------------------