KeyboardTioga.TIP
Copyright Ó 1990, 1992 by Xerox Corporation. All rights reserved.
Last Edited by: Spreitzer, June 4, 1986 4:35:34 pm PDT
Last tweaked by Mike Spreitzer on December 20, 1990 10:23 am PST
OPTIONS Fast;
[DEF,SHIFT,(LeftShift Down | RightShift Down)]
[DEF,CTRL,(Ctrl Down)]
[DEF,KBD1,Next]
[DEF,KBD2,ModeSwitch]
[DEF,KbdDown,(
[KBD2] Down => SELECT ENABLE FROM
[KBD1] Up => ~1;
ENDCASE;
[KBD1] Down => SELECT ENABLE FROM
[KBD2] Up => ~1;
ENDCASE)]
[DEF,KbdUp,(
[KBD2] Up WHILE [KBD1] Up ~1;
[KBD1] Up WHILE [KBD2] Up ~1)]
[DEF,WhileKbd,WHILE ([KBD2] Down | [KBD1] Down)]
[DEF,IfShift,(SELECT ENABLE FROM
[SHIFT] => ~1;
ENDCASE => ~2)]
[DEF,IfCtrl,(SELECT ENABLE FROM
[CTRL] => ~1;
ENDCASE => ~2)]
SELECT TRIGGER FROM -- top level trigger select
Free up shift keys
[KbdDown,KbdNull];
[DEF,FreeKey,(~1 Down [WhileKbd] => KbdIgnore)]
[FreeKey,BS];
[FreeKey,Space];
Recode `next'isms
[DEF,Nextisms,([IfCtrl,
[IfShift,{ ~1 IntermediateUser CtrlPrevPlaceholder },{ ~1 IntermediateUser CtrlNextPlaceholder }],
[IfShift,{ ~1 IntermediateUser PreviousPlaceholder },{ ~1 IntermediateUser NextPlaceholder }]])]
N Down [WhileKbd] => [Nextisms,KbdNotNull];
[KbdUp, WHILE EmptyKbdNext WHILE NullKbd => [Nextisms,]];
Selections
[DEF,SelStuff,(SELECT ENABLE FROM
BS Down => {KbdBegin ~1 KbdSelect};
Space Down => {KbdAll ~1 KbdSelect};
ENDCASE => {KbdEnd ~1 KbdSelect})]
E Down [WhileKbd] => [SelStuff,KbdBranch];
D Down [WhileKbd] => [SelStuff,KbdNode];
C Down [WhileKbd] => [SelStuff,KbdLine];
V Down [WhileKbd] => [SelStuff,KbdCompound];
W Down [WhileKbd] => [SelStuff,KbdWord];
S Down [WhileKbd] => [SelStuff,KbdSubWord];
X Down [WhileKbd] => [SelStuff,KbdChar];
Ops
DEL Down [WhileKbd] => KbdNotNull;
A Down [WhileKbd] => {KbdNotNull CaretBefore};
Z Down [WhileKbd] => {KbdNotNull CaretAfter};
Period Down [WhileKbd] => {KbdNotNull MakePointSelection};
I Down [WhileKbd] => {KbdNotNull KbdInvertPendingDelete};
J Down [WhileKbd] => {KbdNotNull NormalizeToStart};
M Down [WhileKbd] => {KbdNotNull MakePointSelection SetMesaLooks};
P Down [WhileKbd] => {KbdNotNull PrevPlace};
G Down [WhileKbd] => [IfCtrl,
{MakePointSelection CaretAfter KbdAll KbdCompound KbdSelect FindAnyDefCtl},
{MakePointSelection CaretAfter KbdAll KbdCompound KbdSelect FindAnyDef}];
[DEF,FindCase,([IfShift,{KbdNotNull ~1},{KbdNotNull ~2}])]
[DEF,FindStuff,(~1 Down [WhileKbd] => SELECT ENABLE FROM
BS Down => [FindCase,FindPrev~2Caseless,FindPrev~2];
Space Down => [FindCase,FindAny~2Caseless,FindAny~2];
ENDCASE => [FindCase,FindNext~2Caseless,FindNext~2])]
[FindStuff,F,];
[FindStuff,W,Word];
[FindStuff,D,Def];
ENDCASE...