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

Dual-action (Windows-XyWrite) HoMe and End keys



Something for a lazy summer afternoon:

For a long time, I've been torn about what to do with my Home and
End keys. On the one hand, using Home or End to move the cursor to
the top of the screen (func HM) or the bottom (func BS) -- the old
XyWrite default -- is a deeply-engrained habit. On the other, the
Windows convention of Home/End to move to the beginning or end of
the current line has also become second nature -- so much so that I
often reach for these keys in XyWrite, forgetting that the behavior
is different. But if I change my Home and End key assignments to
func LB and LE (or EL and ER), I inevitably regret it for all the
times that I still want Home to move HoMe and End to bottom of
screen. I've been vacillating about this for years.

Awhile back I came up with a solution: dual-action keys. Tap Home
once and it moves the cursor to the beginning of the line, tap the
same key again to move the cursor to top of screen. Similarly, tap
End once or twice to move to end of line or bottom of screen.

It works well for me; you may like to give it a try. If so, you'll
need to do two things: add a new frame to U2, and modify the KBD
file as described below. Here's the frame; issue DECODE to
decode it, then DeFine it and issue ADD2U2 to add it to U2:

XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5LB-HM,LE-BS}} Dual-action (Windows-XyWrite) HoMe and End{032}
keys [CLD rev.7/22/06][cr|lf]{002}{<}SX01,{<}VA$FR{>}{>}{<}SX
02,{<}VA@01-2{>}{>}{<}SX01,{<}VA@01-1{>}{>}{<}SX03,{<}VA$KC{>
}{>}[BX_]func {<}PV01{>}[Q2_]{<}SX01,{<}RC{>}{>}{<}IF{<}VA$KC
{>}=={<}PV03{>}{>}{<}SX01,"[BX_]"+"func "+{<}IS02{>}+"[Q2_]"{
{062}}{<}EI{>}{<}PV01{>}{002}[cr|lf][cr|lf]
-nd
XPLeNCODE

Next, CAll your KBD file, and modify TABLE= and TABLE=CAPS (or the
equivalent if you've renamed your CAPS table), as follows:

;;71=HM
71=NOJM(,2,.,L,B,-,H,M,)
and/or
;;92=HM
92=NOJM(,2,.,L,B,-,H,M,)

and

;;79=BS
79=NOJM(,2,.,L,E,-,B,S,)
and/or
;;96=BS
96=NOJM(,2,.,L,E,-,B,S,)

SAve and re-LOAD the KBD file, and you're done. BTW, this will work
with any keys that have the HM and BS assignments, not just Home and
End.

Comments, queries, quibbles, complaints?

--
Carl Distefano
cld@xxxxxxxx