KeyboardTiogaDoc.tioga
Last edited by Spreitzer, April 27, 1985 2:22:32 pm PST
KeyboardTioga
CEDAR 5.2 — FOR INTERNAL XEROX USE ONLY
KeyboardTioga
Spreitzer
© Copyright 1985 Xerox Corporation. All rights reserved.
KeyboardTioga allows to user to do with the keyboard some Tioga selection operations normally done with the mouse. It also provides a richer set of selection grains.
Keywords: Tioga, Editor, Mouse, Keyboard, Button, Branch, Node, Line, Word, Subword, Character, Select, PendingDelete, Delete, Caret, Point
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

For Internal Xerox Use Only
1. User Interface
The Operation
KeyboardTioga provides one operation, which takes three arguments that combine (reasonably) orthogonally. Through different combinations, a lot of useful operations can be achieved (e.g., CaretOnly; delete/move forward/backward one character, word, subword, line; MakePendingDelete; MakeNotPendingDelete). The operation is

        | branch |
        | node | caretOnly
from here to begin of | line | select
from here to end of | word | select pending delete
for enclosing | subword | delete
        | character |
        | current selection |
"Here" means where the caret was before the operation was invoked. When the first argument is "from here to end of", the operation moves the caret to the end of the indicated range of characters. Similarly for "from here to begin of". Branch, node, word, character, and current selection are all as in Tioga. A "line" is a (possibly empty) sequence of characters between nodebreaks or newlines. The "subword" concept is meant to deal with our naming convention for compound names --- it picks out the component names. The selection will always be a point or range of characters, as far as Tioga is concerned (as opposed to, say, words, nodes or branches).
Some of the combinations are interpreted with some creativity, in order that this operation be more intuitive and useful. Here are some of the more creative interpretations (see if you can get by without reading them):
When the second argument is "current selection", the affected range of characters is always the current selection (regardless of whether you think the first argument says otherwise).
When the caret is between words, the interpretation of "for enclosing word" is somewhat open: does it mean the preceeding word or the following word? The actual interpretation depends on the rest of the selection (assuming it's more than a point selection): it means the following word if the selection includes the following one, and the preceeding word if the selection includes the preceeding one. Similarly for the other levels of selection.
For levels that cannot consist of empty sequences of characters (i.e., word, subword, and character), the strict interpretation of "from here to end of", when invoked with the caret a few nodebreaks away from the first character, means to include those nodebreaks. The actual interpretation does not include them. Similarly for "from here to begin of".
For levels that can consist of empty sequences of characters (i.e., branch, node, and line), the strict interpretation of "from here to end of", when invoked with the caret at the end of such a level, means the empty range of characters at the end. The actual interpretation is "from the beginning of the next to the end of the next". Similarly for "from here to begin of".
The strict interpretation of "line delete" would not delete the trailing carriage return, if any. The actual interpretation deletes it.
The encoding in keystrokes
Unfortunately, there are no very good holes (big enough) in the current Tioga command encoding. The author is not particularly happy with his current choice of encoding for KeyboardTioga commands --- better ideas are solicited. At the time of this writing, the encoding for KeyboardTioga commands is as follows.
The KeyboardTioga operation is invoked by a three-to-five key chord. It always includes a Control key (left or right (a.k.a. Swat)) and the Keyboard key (previously known as Next, or middle spare; amazingly, this key is labelled "Keyboard" on Dandelions). It also always includes a key that indicates the last argument (select [[pending] delete] / caretOnly). Each of the other two is a logical shift key that gives one of the other arguments. The encodings of the arguments is based more on positional mnemonics than textual, although there are some textual ones. Here is the encoding of the arguments:
First
A: from here to begin of
Z: from here to end of
No key: for enclosing
Second
E: branch
D: node
C: line
W: word
S: subword
X: character
No key: current selection
Third
P: caretOnly
[: select
]: select pending delete
←: delete
Unfortunately, this encoding collides slightly with the standard Tioga command encoding. The collision is with the Tioga Next commands. Their standard encoding is striking Keyboard (known to Tioga as Next), possibly with control or shift keys held down. KeyboardTioga changes this encoding to be striking Keyboard while holding down Looks and also possibly control or shift keys.
Fortunately, the encoding is only a matter of TIPpery --- it's easy to experiment with other (hopefully better) encodings.
2. Installation
In order to use KeyboardTioga, you have KeyboardTioga.BCD running, as well as layer KeyboardTioga.TIP in front of the standard Tioga TIP tables. They are both exported by KeyboardTioga.DF.
To layer KeyboardTioga.TIP in front of the standard Tioga TIP tables, make your user profile entry for TiogaTIP say:
TiogaTIP: KeyboardTioga.TIP Default
Additionally, you must get Tioga to reload its cache of TIP tables. This is done whenever you do a full boot. Tioga also has a command to do it; the standard encoding of this command is Control-!.