DOCUMENT SP0001 V0077 Begun: 3 July 2001 Most Recent Edit: 2004/03/22 THE HUMANE ENVIRONMENT (THE) EXTERNAL TECHNICAL SPECIFICATION 1986 - 2004 INTRODUCTION This document describes in detail the operation of the text-based portions of THE. Zooming takes place within the context of the graphical representation of the text-based portion of THE. AUTHORS AND EDITORS This document began as the specifications for the Swyft portable computer, version 33, 9 July 1986, by Jef Raskin. Many have contributed directly to this newer specification and its four bears, notably Paul Baker, Jim Straus, David Alzofon, Rebecca Fureigh, Ian Patterson, Aza Raskin, Richard Karpinski, Andrew Greenberg, Douglas McKenna, Astrid Raffinpeyloz, Scott Kim, Hanhwe Kim, Neil Stockbridge, Galen Panger, Rich Morin, Trenton Henry, Matt Wilkie, Dan Strychalski, Jean Bergstrom, John Bear, Brad Lauster, Ryan Brown, Guy Parker, David Filskov, John Peters, Esteban Castro, and Jef Raskin. RECENT REVISION HISTORY NOTE ON V 67 Included in this revision are very extensive edits and corrections by David Alzofon, and a few by Jef Raskin. No major substantive changes to the spec were made, but the nomenclature is considerably cleaner and more uniform and some ambiguities have been clarified. The English has been betterfied. NOTE ON V 68 Included in this revision is a change to the method of invoking LEAP on a standard keyboard. The change makes LEAP (a) faster to invoke, (b) lowers the typing error rate, and (c) is usable on the keyboards of nearly all countries that use phonetic alphabets. Also, a Revision History has been added. NOTE ON V 69 The method of invoking LEAP as in V 68 depends on using the Command key (Mac, Linux) or the Window key (Win) to establish the command quasimode. This change did not get into V 68, but has been corrected here. NOTES ON V 70 Provided instruction and command name documents are locked, versions inserted by the user are not locked. Search and replace operations and the Skip command have been added. Many small changes here and there as usual. NOTES ON V 71 IBM keyboard model change. NOTES ON V 72 Notes are now arranged in increasing order. Spaces between examples and their (numeric) titles have been replaced with dots to avoid a problem with copying this document causing them to be replaced with blank lines. Leading dots have been added to avoid loss of leading blanks in some email circumstances. Illustrations and wordings have been corrected and clarified. (Karpinski) NOTES ON V 73 Some details of deletions and old selection manipulations have been slightly revised for clarity. The < comparisons have been replaced by <= comparisons for clarity for those less familiar with such notations. (Karpinski) NOTES ON V 74 Undo and Redo have been clarified, and many small details cleaned up. The syntax of commands that required arguments has been simplified, tabs and margins defined, and the behavior of the Deletions Document has been clarified. (Karpinski and Raskin). NOTES ON V 75 Very minor edits. Some blank lines have been deleted. Scrolling now refers to the initial and final Document characters instead of the first and last lines of the text. UNDO and REDO have been revised, but questions remain. See also FALSE PAGE CHARACTERS (Karpinski) NOTES ON V 76 Number of bears changed. Massive rewrite of and additions to the list of commands (Raskin). The PICK and SP commands are especially interesting. Many more small typographical details cleaned up, particularly with respect to special document names and special character names (e.g. so that instances of a capitalized "Document" always refer to the Document character). Fixed the post-increment bug in the insertion pseudo-code; many important and elegant edits (McKenna); comments on "smart move" commands added (McKenna, Karpinski, & Raskin). CALC and UNCALC clarified (Peters). Alternative command syntax proposed for standard keyboards (Filskov). Clarification that typing a Document character does not insert a Return, table D fixed (Castro), Name of Deletions Document standardized to "Deletions Document" (as opposed to Deletion Document) and is always capitalized. (McKenna) Leaping to ends of lines when false page characters are in use clarified (Karpinski). NOTES ON V 77 Many detail changes, especially with regards to clarifying the behavior of deletions and old selections based on another careful critique (McKenna) which required small refinements in the design (Raskin). Behavior of selection when a new selection is made clarified (Han Kim). Made explicit that during a LEAP selections are not created (Raskin). Email spec completed (Raskin). DOCUMENT MAINTENANCE Jef Raskin PROJECT SCOPE For an overall definition of The Humane Environment (abbreviated THE), see "So The Humane Environment isn't an editor, what is it?" on www.jefraskin.com. This portion of the specification details the low-level interactions that take place primarily within a document. A master document or "text" can be thought of as an unending piece of paper on which alphabetic characters and images are placed. The "low-level" interactions cover everything from entering your name in a game to writing novels. For the most part, these low-level interactions are those parts of the interface that can also be used by the visually impaired. THE -- even if limited to that part described here -- is a practical writing and programming tool. It demonstrates LEAP (tm) and some of the selection and command interface techniques described in Raskin, J. "The Humane Interface" (Addison-Wesley, 2000). The Humane Environment (THE) is intended to run on at least Windows, Linux, and Mac platforms. A separate specification will discuss the zooming user interface portion of THE. NATURAL LANGUAGE QUOTING CONVENTIONS Literals inside quotes are exact. For example, a sentence that ends with a quote, He said, "Hello, George.". would appear as shown. The first period ends the sentence inside the quote. The second period ends the overall sentence itself. This is not conventional punctuation, but it is a rule we need in order to avoid ambiguity. Another example is, To stop the movie, type "stop.". which has only one interpretation. It is clear that a period is part of the command. If we wrote, using the conventional but illogical rule, To stop the movie, type "stop." it would be unclear of just what characters the command consists. Compare that with, To stop the movie, type "stop". in which the command does not include a period. (The demonstration sentence is not part of the software specification). The reason the illogical convention is used at all is because typographers disliked the appearance of many consecutive punctuation marks. In the context of writing dialog, precision at the individual punctuation mark was not often necessary. When dealing with computers, it is. HARDWARE REQUIREMENTS This specification assumes implementation on a standard PC or Macintosh computer. The system can be used with any standard English IBM or Mac keyboard and with the keyboards of many or all other phonetic languages, however for operation with true Leap keys, a keyboard with at least two thumb-operable buttons under the space bar is required. The recommended keyboard was the IBM "Trackpoint USB Space Saver Keyboard - Black (US English)". List price $99. Model Name: 22P5150 (this number is also referred to as the "Marketing Part Number"). The keyboard-mounted mouse buttons will be referred to as Leap> and Leap<. Apparently identification number 22P5150 has been replaced with 31P8950, $99. It can be ordered at IBM.com: Products And Services: Keyboards And Mice: $5 to $15 shipping. Versions of this keyboard for other languages may be available outside of the U.S.A. Operation without a special keyboard is less efficient and takes longer to habituate to. But, even so, THE is entirely practical and more efficient than conventional editors. In this document we will refer to the keyboards without LEAP keys as "standard keyboards" and those with two keys below the space bar as "LEAP keyboards". DISPLAY OF THIS DOCUMENT This document should be displayed in a monospaced font such as Courier so that character illustrations and charts will appear correctly aligned. This version is designed to maintain its meaning even if emailed as text. OPERATING SYSTEMS The demo we are creating should eventually run under Windows 95, Linux, and Mac OS 8.5 and later, including OS X. The LEAP keyboard noted above requires OS 10.2 or later or a separate USB driver such as USB Overdrive (a shareware package). This specification does not describe the installation or use of USB Overdrive on earlier Mac operating systems. The methods that use standard keyboards will work with earlier Macintosh operating systems. As of V 68, the software is being reworked so that this paragraph will soon be obsolete. The use of the specified keyboard (detailed below) is strongly advised. It makes learning and using THE much faster and easier. BIBLIOGRAPHY It is recommended that you have read Norman, Donald, "The Design of Everyday Things" Basic Books, New York. 1988 Raskin, Jef. "The Humane Interface" Addison-Wesley, Boston. 2000 to understand the motivation and design principles underlying this specification. The Raskin book is abbreviated "THI" in this specification. NOTATION OF KEYS, KEYSTROKES, AND QUASIMODES Keys with names such as Space, Delete, Tab, and Return are written with the first letter capitalized and the following letters in lowercase. Because the up and down arrows used for key operation notation in THI are not available in ASCII, the backslash after a key name (\) indicates the named key going down, and the slash (/) after a key name indicates the named key going up. A space is placed after the slash, but not before it, except in the abbreviated notation shown below. Thus, to type a capital "A" on a normal keyboard (or even on a typewriter), you'd perform this sequence of actions: Shift\ a\ a/ Shift/ Note that individual letters always appear in lower case in this notation. We will not use "/" or "\" as characters in our examples. The act of pressing and releasing a key with no intervening actions is called "tapping" a key. Sometimes we abbreviate the notation from a\ a/ to a\/ where this abbreviation will cause no ambiguity. The act of holding Shift for as long as you wish to type capital letters is said to establish a "quasimode". It is not a mode as it vanishes as soon as you release the Shift key. For further details of the reasons why quasimodes are effective in interface design see THI pp. 55 ff., and for more details of this notation and nomenclature see THI pp. 35 ff. The key labeled "Delete", "Backspace", or "Erase" that appears (usually in the upper-right corner) on various keyboards will be called the "Del" key here. "Leap" refers to either the LEAP forward ("Leap>") key or the LEAP backward ("Leap<") key. In any single keyboard expression Leap stands for Leap> or Leap<, in every instance. For example Shift\ Leap\ Leap/ can mean either Shift\ Leap>\ Leap>/ or Shift\ Leap<\ Leap but not Shift\ Leap>\ Leap or Shift\ Leap<\ Leap>/. The action of LEAPing is written with all uppercase letters to distinguish it from the Leap keys. The variable names and notations in this specification are used only to clarify and simplify the specification; they are not suitable for or intended as program variable names, which are typically designed to be self-documenting to a greater degree than are single letters. STICKY KEYS AVOIDANCE Some systems, such as Windows and the Mac, have an accessibility package that changes their quasimodes to modes to accommodate users who cannot hold one key while typing another. This has a number of implications for this system. At very least, we have to notify users to turn off such packages before they run THE. Better, of course, is for our software to turn off or ignore such packages and then restore their use when people leave our environment. Lastly, we should consider a "sticky keys" version of our own system for use by users who need such a facility, recognizing that such an implementation will be slower and far more error prone than THE. There are no time dependencies in THE that a user has to adhere to, so that a user can operate as slowly as necessary, without fear of features timing out. There are no "double clicks" or other operations that require rapid motor control, and a mouse is not required for dealing with text. Thus THE is suitable for many users who cannot use a standard editor, even given the usual accessibility features. TIMING While we do not have timing constraints on user actions, we have some important minimum speeds with which the computer has to respond. Whenever the user is entering text, under whatever circumstances, the characters typed should appear within 50 msec of the time the key is pressed. This time is chosen so that the fastest human typist will not feel that the computer is getting behind them. When any command is issued or any process started, a response should be made within 250 msec. That is, fast enough so that the user doesn't have time to make another action in the belief that the system has gone awry. See THI for information on reaction times. If the operation cannot be completed in 250 msec, then an artificial response -- such as a transparent message saying that the system is working on the action and how long until it will take (if the system can predict accurately) -- must be generated. If the system cannot predict the delay, then (unlike many of today's systems) it should just tell the truth: "This will take a while, but I don't know just how long.". What it must not do is put up an inaccurate progress bar. LINEAR LEARNING MODEL This system is designed so that features can be learned one at a time in a certain order such that each feature is useful on its own and can be learned and made useful to the learner without having to learn other commands or features. While there are many commands in this specification, and there will be many more, the independence of the commands means that they do not have to be taken up at once, as with most software packages. As important is that a user can be very functional with a very small subset of the commands. Nonetheless, how this system is taught is critical to its success. SYSTEM SLEEP For some hardware it is advantageous to allow the system to go into a power-saving "sleep" state. To avoid this state being a mode, a press of any key should wake the system and also have the exact same action that the key does when the system is awake. To wake a system without altering the content, a tap of a quasimode key is used. For example, Shift\/ would not, when the system is awake, cause any change in the content or in the display content. Space\/ would wake the system and also would have inserted a space. STRUCTURE OF THE TEXT A character in memory is represented by a 16-bit Unicode value. The master document, or "text" is a vector of z+1 characters, notated V(0), V(1), ..., V(z). These are considered logically contiguous from the user's point of view, though they may not be contiguous in memory. A character may be an image, e.g. a photograph. This will be specified further below. The cursor, which is represented on the display by a blinking rectangle, is associated with exactly one character, V(c). 0 <= c <= z. A "block" of text is a logically contiguous group of k>=0 characters. A block of length 0 is called an "empty" block. A non-empty block of length k>0 that starts at V(n) consists of the set of k characters, V(n+0), V(n+1), ..., V(n+k-1). Any block of k characters can be represented by the interval of pointers, (n, n+k-1), where V(n) and V(n+k-1) are included in the interval. An empty block of length k=0 that starts at character V(n) in the text is thus represented by the interval (n,n-1). Several special characters are known as "boundary" characters. They are special only in their effect on the location of the character following them. They are the "Return" character, the "Page" character, and the "Document" character. Each denotes the boundary between two (possibly empty) blocks of text. In particular, they serve to break the text up into logically contiguous blocks called paragraphs, pages, and documents respectively. A higher-level "folder" character is not needed because the user can compose higher-level groupings of documents by simply creating sequences of two or more adjacent Document characters as boundary pseudo-characters to denote any higher level groupings the user might want. This has proved to work well in previous versions of this software. A "document" is defined as a possibly empty block of characters that consists of a contiguous set of characters that are not Document characters delimited at both ends by Document characters. The Document characters are not part of the document (much as the spaces that delimit most words are not part of the words, nor are the delimiting Returns part of a paragraph). A Document character causes the next character following it to appear on a new line and to print (on paper) on a new page. There is also a command (Page) that inserts a Page character. This starts a new page without the new page being the beginning of a new document. The character following a Return, Document, or Page character appears at the beginning of the line immediately below the Return, Document, or Page character. In selecting a document in which the cursor resides, it is convenient to LEAP back to a Document character, then LEAP forward to a Document character and select. You get the document plus two Document characters. When you move this, the document nature of the moved text is preserved; however if you move it adjacent to or at one end of another document (by LEAPing to a Document character prior to using the Move command) then you will have two Document characters in a row just as in moving a word you have to be concerned with adjusting spaces. This leads to some interesting interface questions discussed under the Move command. The first and last characters of the text, V(0) and V(z), are always present in the text and are permanently set to Document characters that function as boundary delimiters for both the user and the internal implementation algorithms. Neither can be deleted. Thus z>=1 is always true and the text always consists of at least 1 document. Additional boundary characters may appear anywhere within the block of characters delimited by these two permanent Document characters. The minimal state of the text consists of nothing but two Document characters, V(0) and V(z=1). For now, the Document character is typed as an accent grave (pronounced "grahv" with a short 'a' sound as in "aha"). This character was chosen as it is seldom used and can be used in text and in search patterns with a standard keyboard, being lower case. In a complete implementation, there would be a dedicated Document key and the initial state of the text would include instructional and other content. The Document character should, for development purposes, have as its appearance a horizontal dark gray bar across the text environment. A command "grave" will place an isolated accent grave that is not a Document character into the text should one be needed, and such an accent in the search pattern will match Document characters or the rare use of such an accent in isolation. Use of an accent grave on a character is neither a Document character nor the accent grave character. In localizing THE, other characters may have to be chosen for this function. The initial state of the text contains the Documentation Document, the Deletions Document (to be defined below), the Messages Document, and perhaps other material bounded by Document characters. These may be optional or empty or automatically created the first time they are needed. The Deletions Document and other such documents are recognized by an internal LEAP to them. To make them less likely to be LEAPed to accidentally, the names are spaced out L I K E T H I S. This means that a user can "spoof" the system documents. That's OK, if somebody wants to do it, that's up to them. The system will use the first instance it comes across. The number of documents in the text is equal to one less than the number of Document characters. If there is no room for more characters in memory, each character typed has no effect other than causing a warning signal to sound and an appropriate message to appear. In modern systems, which can have hundreds of megabytes of RAM and can spool off text to a non-volatile, high-capacity storage device, this is a highly unlikely event. CLEANLINESS When a user deletes any object that has associated state information, THE should clean up any saved state and/or preference files. When fully implemented, any such information should be just another document, so that there are never any auxiliary files. We should never clutter memory or mass storage. No memory leaks either. THE CURSOR The cursor is associated with exactly one character in the text. The cursor is initially on the last Document character before any of THE-supplied documents. The cursor's appearance will be a blinking transparent rectangle the height and width of the character on which it sits, and of a color defined below. It blinks at a rate of approximately three times per second with a 50% duty cycle (on and off times have equal duration). THI explains why the customary between-character cursor is not used. RESTORATION OF SYSTEM STATE The state of the system, when it has been turned off or slept and then turned on again, is whatever state it was in when it was turned off or entered into the sleep state. The saved appearance, which reflects the saved state, includes cursor position, selection markings, and all other indications of state. In other words, the way it looked when you left is exactly the way it looks when you return. Ditto for the way it worked. CURSOR AND SELECTION: EXAMPLES There are two basic conditions associated with characters. The first is the cursor. Characters not normally visible, such as Space and Return are visible when the cursor is on them, when they are selected, and when in the LEAP or Command quasimodes (to be discussed below). In this specification, the cursor is indicated by an asterisk under a character. The dots before the example title, the (1) here, and before and after the asterisk are there to preserve the spacing through various email and copying pitfalls. abCde ..... (1) ..*........ Example (1) is a five-character string with the cursor on the letter c. There is always exactly one character with a cursor: in the case where the text consists of only two Document characters (this is the minimal text), one of the Document characters has the cursor on it. This blinking cursor always shows exactly where the next character you type will appear, the place to which the cursor points is therefore also called the "insertion point". That the cursor blinks is quite important in directing the user's attention to the insertion point. In justified or centered text, the cursor may not show exactly where the next character will appear, although it will be close, as the line of text in which the cursor resides may move slightly as each character is typed. In practice this does not cause confusion. There is also a selection, which will be indicated in this specification's notation by one or more letters being capitalized. The selection is represented on the display by a colored highlight. When only one character is selected and the cursor is also on that character, we say that the cursor and selection are "collapsed" on that character. Sometimes we use the shorthand phrase that "the cursor is collapsed" to mean that both a one-character selection and the cursor are on the same single character. Thus, there is always at least one character in the text that is selected. TYPING AND ERASING: EXAMPLES Typing an x when the text is abCde ..... (1) ..*........ results in abXcde ..... (2). ...*........ The selection (X) is exactly what would be erased if you were now to tap Del. There is no forward erase in this design. By not having a forward erase, we eliminate a Hicks' law delay. Nonetheless, we might consider testing Shift Delete as forward delete as an experiment. (See THI for an explanation of Hicks' law.) Note that when you delete or erase a character, it is not lost, but put into the Deletions Document, which will be discussed below. Here is a more complete description: if the cursor and highlight were collapsed on the letter c in the string abcde, you would have abCde ..... (1) again. ..*........ On the display, a blinking cursor on an unselected character is easy to distinguish from a blinking cursor on a selected character as in the first case it blinks from the cursor color to the background color (usually white) and the selection sits alongside it, and in the second it blinks from the cursor color to the selection color. See the section COLORS below for the RGB designation of the colors. If you type x when the text is as in (1), you get abXcde ..... (2) ...*........ continuing by typing y, you obtain abxYcde ..... (5). ....*........ With the situation as in (5), a tap of the Del key gives state (2) of the text. In other words, Del exactly undoes typing. This is always true, even if the character is a Tab, Return or other non-alphanumeric character. From state (1) abCde ..... (1), ..*........ a tap of Del results in aBde ..... (3). ..*....... Separating the cursor from the selection is necessary because if you tap Del again, you clearly want to delete the letter preceding the c, so the b must be highlighted. However, if you want to restore the previous state by typing the letter c, it must appear where the D is (the D will, of course, move over). The split cursor allows explicit designation of both exactly where the next character will appear and exactly what will be deleted if you tap Del. The usual, between-character cursor is not explicit, especially when it is positioned at the end or beginning of a line. With the present cursor design, the selection can be on one line and the insertion point on the next, both clearly indicated. CREEPING AND LEAPING: EXAMPLES How LEAPing is accomplished is discussed below. It is a method of moving the cursor to a given character. Its speed advantage over the mouse or any graphic input device for pointing in text is considerable (see GOMS modeling in THI for quantitative measures). In those cases where you don't have to look for but know where you want to LEAP to, you save the visual searching (which can involve using scroll bars) time; in such cases LEAP can be easily 10 times faster (1.2 seconds instead of 12 seconds) than using a mouse. Creep, which consists of moving the cursor one character at a time, is accomplished by tapping either Leap key. With a standard keyboard, the left and right arrow keys (cursor control keys) perform this function. Starting from the situation in example (5), abxYcde ..... (5) ....*........ a LEAP left to the letter b gives us aBxycde ..... (6). .*........... A tap of Del in example (6) yields Axycde ..... (7) .*.......... indicating, as usual, that the next tap of Del would delete the a. The next letter typed would appear where the X is and the X and following letters would move out of the way. If the example were a longer text, inserting and erasing characters might cause word wrap or word unwrap to occur at the ends of lines. The cursor and single-character selection are either on the same character or, in left-to-right languages, are on adjacent characters with the selection to the left of the cursor. From this situation zAxcde ..... (4) ..*......... a creep right collapses to the right zaXcde ..... (8) ..*......... indicating that you can delete the X, or type there, as you please. Alternatively, a LEAP to the right to "x" from zAxcde ..... (8a) .*.......... would also yield state (8). LEAP to the right proceeds with its search starting on the character immediately to the right of the cursor. LEAP to the left proceeds with its search starting on the character immediately to the left of the cursor. A creep right from zaXcde ..... (8) ..*......... gives us zaxCde ..... (9). ...*........ A creep left from (9) just moves the cursor and selection and returns us to (8). Typing Z in (9) results in zaxZcde ..... (10). ....*........ We have seen what a creep right does. A creep left from (10) collapses the cursor to the left and gives us zaxZcde ..... (11). ...*......... A creep always collapses the cursor and selection. If we had LEAPed left to z from (10) the cursor and selection also end up collapsed on the Z. zaxZcde ..... (11). ...*......... DOCUMENT CHARACTERS I will use q to stand for the Document character (created by typing an accent grave) and start with the text q Abcde *.... q ..... (12) as if we had just LEAPed or crept to the A. Consider these four things that the user could do next: type erase creep (or LEAP) left to the Document character issue a command. We know what typing will do. Erase gives us Q bcde *... q ..... (13) Erasing from state (13) makes no change at all. You cannot erase the initial Document character even though it is highlighted. If it were not the initial Document character, it would behave as any other character that happened to be the full width of the display. Creeping left will have no effect, either. Typing an a from state (13) will give us q Abcde .*... q ..... (13a). LEAPing right from state (13) to the other Document character gives you q bcde Q ..... (13b) * with the cursor on the ending Document character. Note that the final Document character is highlighted; this is important for selection. If Del is now used, the Document character is not erased. More consistently, a user's mental model is that it is erased and immediately replaced, because the highlight moves back one to the E. Note that we are discussing here only the initial and final Document characters. Document characters in the midst of text behave as do any character, and can be typed and deleted freely. For example, you can combine two documents by deleting the Document character between them. Back to our example. After the LEAP to the final Document character and tapping Del we have: q bcdE q ..... (13c) * It is important that LEAPing left from state (13b) q bcde Q ..... (13b) * to the first Document character leads to (13d) Q bcde * q ..... (13d). We shall see why having the initial Document character selected is important in the section on Selection. Note that even though the highlight is on the initial Document character, the Document character cannot be erased by tapping Del (or by any other means). In the case of multiple documents in a single environment, LEAP will use the circular search discussed below. THE HUMANE QUASIMODE (for LEAP and with dedicated LEAP keys) There are two LEAP keys on such a keyboard, located centrally below the space bar. They are LEAP backward (Leap<) and LEAP forward (Leap>). The LEAP quasimode exists for as long as either LEAP key is held down. THE HUMANE QUASIMODE (for LEAP with a standard keyboard) Just as Shift\ establishes the uppercase quasimode that exists until Shift/ occurs, the LEAP quasimode on standard keyboards is created by Shift\ Space\ Space/. In other words, the quasimode is created by a press of the Shift key followed by a tap of the Space bar. and it persists as long as the Shift key is held down. The LEAP quasimode remains in effect until Shift/. In some systems, such as some of those used for inputting Chinese, Shift\ Space\ Space/ Shift/ is used for changing between modes, however THE always has at least one additional character typed while in the quasimode, allowing a system to distinguish between the Chinese mode shift and a THE quasimode. THE COMMAND QUASIMODE (for either keyboard type) The Command quasimode exists for as long as the Command key is held down. The Command key is usually the one called "command" by the manufacturers (the Apple or Windows logo keys), depending on the keyboard layout. Depending on existing operating system requirements, this choice may have to be made differently. David Filskov has suggested that Command\ LEAP\ Command/ be used to establish the command quasimode so that you are holding only the LEAP key down while typing the command. Another possibility is LEAP\ Command\ Command/ to establish the quasimode. ARGUMENTS FOR AND AGAINST HAVING TWO LEAP AND COMMAND METHODS Should we require users to obtain a LEAP keyboard and abandon the standard keyboard hack? The true Leap key interface is easier to learn and faster in performance than the standard keyboard version. True LEAP keys allow the use of upper- and lowercase letters in patterns, and can distinguish between pairs of characters on the same key, such as 2 and @. Also, we would have to implement and maintain only one version. The (slight) complexity of the standard keyboard version might prejudice newcomers against THE. On the other hand, the standard keyboard version is just software and gives most of the benefits of THE at lower expense, and allows it to run on many systems for which an appropriate keyboard is not available. As for maintaining a version that supports both, it violates monotony unless we have the software turn off the interface that is not being used (not with a user preference, but automatically by sensing whether the first few LEAPs are via one method or the other, and then disabling the one not used). The sensing can be done whenever the machine is turned on or THE invoked. In later systems, of course, THE will not be invoked as it will be the basis for other software. We will cross that happy bridge when we come to it. For now, this specification requires that both methods must be operational. In any case, LEAPing, whether invoked by one method or the other, works the same and the following descriptions apply. INDICATION, PRESELECTION, SELECTION, AND THE ANCHOR Say you have abCdefghijk ..... (14), ..*.............. and you LEAP to the h. Using an underline to indicate what will be selected (if you were to tell THE to make a selection), you have the situation abcdefgHijk ..... (15). .......*......... As soon as you LEAP, the "c" becomes an anchor, which means that it anchors or marks one end of what would be selected if you were to use the select command. As the LEAP ends on the "h", the "h" becomes the other anchor, marking the second end of what would be selected. The underlined letters, cdefgh, are the preselection, as they are what would be selected if you were to subsequently use the select command. The preselection is indicated (see THI pp. 105-106 for more information on indication, which is any method that shows, ahead of time, what will be affected by certain commands). Preselection should probably be displayed by an underline (just under where the usual text underline would go) in the selection color. It will then appear that indication expands upward to become selection. (temporarily, we are using a yellowish highlight for this). The indication highlight is visible only during the quasimode otherwise the display becomes visually cluttered and confusing. Besides, you only need to see the preselection when you are about to issue a command, and you can always establish the LEAP quasimode to see it. If you do not want to use that preselection, you can abandon the quasimode just by releasing the key that established it without having to cancel or take any other action. Selections, unlike indication, persist after the quasimode is released. As we have seen, a selection has two anchor characters (or, simply, anchors). A second anchor is established by a LEAP, and it becomes a first anchor when you perform your next LEAP, but a second anchor does not become a first anchor when you use the repeat command or any command that repeats a previous LEAP. Those commands can therefore extend or contract a selection as they move only the second anchor. Anchors may be moved by collapsing the selection to one of the anchors and using Creep. In this case the anchor collapsed to will follow the cursor. If you use the select command (s in the standard keyboard, tapping both LEAP keys at the same time in the LEAP keyboard) while in the quasimode you will select whatever was indicated: proceeding from (15) abcdefgHijk ..... (15), .......*......... you will have abCDEFGHijk ..... (16). ........*........ Note that the cursor remains on the character immediately after the selection. If, instead of abCdefghijk ..... (14), ..*.............. you had had abCdefghijk ..... (14a) ...*............. the LEAP to h would result in abcdefgHijk ..... (15a). .......*......... On the other hand, creeping to the right from state (16) abCDEFGHijk ..... (16) ........*........ can be used to prepare to make a larger selection. The creep collapses the highlight onto the i, with the cursor remaining on the i (state (17)). This allows you to type to the right of the selection (rather than in the middle of it), but that would lose the left anchor. abcdefghIjk ..... (17). ........*........ As you creep, the indication color shows that the potential selection includes the crept-to characters. Another tap of creep to the right, followed by using the select command, gives you a larger selection. abCDEFGHIJk ..... (18) ..........*...... Tapping the left arrow key (on a standard keyboard) or the LEAP< key from state (18) collapses the selection to the left. abCdefghijk ..... (19) ..*.............. . Creeping to the left from (19) results in aBcdefghijk ..... (20) .*............... , and selecting now gives you this (as would have been shown prior to selection by indication): aBCDEFGHIJk ..... (21) ..........*...... Of course, you could also creep right from (19) and move the left anchor of the potential selection to the right, and the indicated text will shrink accordingly. You can shrink the indication down to nothing and then, if you continue to creep, the indication will grow, extending to the other side. In general, when the selection encompasses more than one character, a creep to the left or right moves the cursor so that only the left or right (respectively) end of the selection is now selected. The cursor is on the highlight when collapsing to the left, and not on the highlight when collapsing to the right. Then you can continue to creep so as to put both highlight and cursor on a different character. After creeping, you may select (assuming you do not lose the anchor by typing or some other action) and you will highlight everything from the unadjusted end of the selection to the character to which you have just crept. Also, in general and at all times, the indication when made visible shows what would be selected if the select command were given. Below, we will not always mention indication but when we show what selection results, the characters selected would have been previously indicated. When LEAPing to the left when the cursor and highlight are not on the same character (in other words, this never happens immediately after a LEAP) the selection extends from the highlighted character, not from the cursor position. From abCdefghij ..... (14a) ...* a LEAP back to "a" results in Abcdefghij ..... (14b) * , with bc indicated (The cursor and highlight supersede indication). The select command then gives ABCdefghij ..... (14c) ...* It is important that the "d", on which the cursor was blinking not be included in the selection. First of all, selection should not include the character at the position at which the next character was to have appeared. Second, a LEAP over a span of (in this case) three characters should result in the same selection both forward and backward. Thirdly, if you type, say "abc" and then LEAP back to the "a", you should get only "abc" selected. Earlier we started with having LEAPed or crept to the final Document character q bcde Q ..... (13b) * and then LEAPed (it's a bit far to creep) to the initial Document character Q bcde * q ..... (13d) Selecting now gives you Q BCDE Q ..... (13e) * Namely, everything is selected. This state is useful when you want to copy a document including the adjacent Document characters. Deleting the selection results in Q q ..... (13f) * SUMMARY TABLES OF CURSOR AND UNEXTENDED HIGHLIGHT ACTION The cursor and unextended highlight can be in one of two states. Either they are both on the same character: rSt ..... (23) .* or they are split onto adjacent characters such that the highlight precedes the cursor by one character: Rst ..... (25) .* Typing and erasing operate as shown in tables A and B -- in each case starting with the indicated initial state and performing one of two operations on it (again, the periods are only to force spacings to be correct): TABLE A Initial State......Type 'x'...or...Tap Del... ....abCde..........abXcde..........aBde...... ......*...............*..............*....... ....aBcde..........abXcde..........Acde...... ......*...............*.............*........ TABLE B Initial State.....Creep Left...or...Creep Right .....abCde..........aBcde..........abcDe..... .......*.............*................*...... .....aBcde..........aBcde..........abCde..... .......*..............*...............*...... The following tables describe LEAPing and Selection, and show consecutive actions rather than alternate actions in the successive columns. TABLE C Initial State.....LEAP> to x...then...Select ...aBxde..........abXde...............aBXde.. ....*...............*....................*... ...aBdexf.........abdeXf..............aBDEXf. ....*.................*....................*. ...Abxde..........abXde...............aBXde.. ....*...............*....................*... TABLE D Initial State.....LEAP< to x...then...Select ...axBde..........aXbde...............aXBde.. ......*.............*....................*... ...xaBde..........Xabde...............XABde.. ......*............*.....................*... ...axBde..........aXbde...............aXBde.. .....*.............*.....................*... LEAPing is similar to creeping in that the selection and cursor both end up on the first character of the target. They differ in that creep (and LEAP again, to be discussed below) extend the indication whereas LEAP resets an anchor. LEAPING TO LONGER PATTERNS Say that we have this text: These theaters think that those thespians thank them ..... (30) * (This discussion will be described in terms of a Leap keyboard, but it also applies to a standard keyboard: Just replace Leap>\ with Shift\ Space\/ j\/ in each occurrence.) Typing Leap>\ t\ ................................................ (31) yields these Theaters think that those thespians thank them ..... (32) ......* Note that neither Leap> nor t have been released. If you now type t/ h\/ ................................................... (33) The cursor will not move as the pattern "th" matches the "th" in "theaters". Note that you have not released Leap> If you now type o\/ ...................................................... (34) the cursor will move to the "t" in "those": these theaters think that Those thespians thank them ..... (35) ..........................*............................... skipping over the "th"s in "think" and "that" because the first instance of "tho" occurs in "those". Leap> has still not been released (you would release it if (35) were the desired state). If, while still holding Leap> you type Del\/ .................................................... (36) this will delete the last character from the pattern (the "o") restoring the pattern to as it was after (33), and the cursor will jump back so that we are again at example (32). This demonstrates that you can correct a pattern "on the fly". It takes a while to get used to having this ability, but it is wonderful to not have to complete a search and only then find that it is in error. You can use Del\/ repeatedly to completely erase the pattern and cancel the LEAP entirely. Another way to cancel the LEAP is to just hit a bunch of keys, creating a pattern that might be "thol;jk" which doesn't match anything. Banging on the keyboard also releases some of the frustration you might have felt from not finding a match. But say you had typed the pattern "th" so far, were still holding Leap>, and were back at example 32: these Theaters think that those thespians thank them ..... (32) ......*................................................... From this situation, then, typing i\/ would move the cursor to the "t" in "think" typing e\/ would not move the cursor typing e\/ m\/ would move the cursor to the "t" in "them" typing e\/ s\/ would move the cursor to the "t" in "thespians" typing a\/ would move the cursor to the first "t" in "that" typing a\/ t\/ would also move the cursor to the first "t" in "that" typing a\/ n\/ would move the cursor to the "t" in "thank" typing e\/ a\/ t\/would not move the cursor typing e\/ a\/ Del\/ s\/ would move the cursor to the "t" in "thespians". When you release the Leap> key: Leap>/ after any of these patterns, the cursor will stay put. Starting again from example 30 These theaters think that those thespians thank them ..... (30) *......................................................... say that you wanted to move the cursor to the final (rather than the first) "t" in the word "that". You would type Leap>\ t\/ Space\/ Leap>/ Starting yet again from example 30, this time to move the cursor to the final "s" in "thespians", you would begin by typing Leap>\ s\/ Space\/ ....................................... (37). Keeping your eye on the final "s" in "thespians" you'd notice that the cursor is not there, so you keep on typing what you see there: t\/ h\/ and finally, when you type a\/ you distinguish "s tha" from the earlier "s thi" and the cursor appears where you want it. So you let go Leap>/ and you're done. SIDEBAR: To the reader who's worked through all this detail. Writing how THE works all out in detail makes LEAPing seem like a tedious procedure -- but so would writing out how you use a mouse. For example: Move your hand from the keyboard to the mouse, move the cursor up by moving the mouse forward, down by pulling the mouse toward you, and move the cursor right and left by moving the mouse in the corresponding direction. Move the cursor to the left of a letter you wish to insert at or to the right of a letter you want to delete, and then click the mouse button. Move your hand back to the keyboard and proceed. Explaining click-and-drag and so on would take up pages. When that method was invented, it sounded just as strange and complicated. Now people call using the mouse "natural" and "intuitive." When you've used LEAP with the LEAP keyboard for even a few days, going back to the mouse feels like you've had to go back to traveling long distances in a covered wagon after flying there in a jet. In practice, when you are showing someone how to use LEAP, it takes only a few seconds, and then not too long to get to the point where LEAPing feels "natural" and "intuitive". END OF SIDEBAR In practice you simply look at your target and then, while holding Leap> you type the letter you want the cursor to be on and any letters or symbols that follow it until you see the cursor land on the desired location. For example, we can put many of the lines shown above into this brief description: To move to the final "s" in "thespians" press the LEAP> key and type s tha and there you are. Letting go of the LEAP key after a LEAP is nearly automatic and does not have to be taught to most people. LEAPING TO ENDS OF LINES Say that you had this situation You say what you say i say what i see With the cursor on the first letter of the first word and you wish to LEAP to the "a" in the second occurrence of the word "say". LEAPing to "ay" would not get you there, but LEAPing to "ay" would. In THE, Return is a character just like any other. To LEAP somewhere, you type the pattern just as you would type the text. You need not learn any tricks to put a Return into a search string as you do with old-fashion legacy software (e.g. MS Word). The same is true of tabs and Document characters. INSERTING CHARACTERS BY TYPING, MORE DETAIL When the cursor is at V(c) and a character is typed, then either (0) c=0 or (1) c>0, unless the cursor is in locked text, in which case see (3), below. V(z) is the final character and zMAX is the highest value z is allowed to have, the end of the available space in the computer. (0) If c=0, set c to 1 and continue with step (1) (the initial sentinel Document character cannot be deleted or moved or replaced, so all text input must occur after it). (1) If z = zMAX, it cannot be incremented by 1 (i.e. there is no room for more characters in free memory), the character typed has no effect other than causing a warning to sound and an appropriate message to appear. Otherwise, increment z by 1 and then set V(j) to V(j-1) for j=z down to but not including j=c (note that if you do the loop forward, it won't work). Continue to step (2). (2) If step (1) successfully incremented z, place the newly typed character into V(c) and then increment c by 1. In other words, newly typed characters appear at the cursor position, and force all characters at or above that position "forwards" in the text. The cursor moves forward also, so that the next typed character appears just after the previously typed character in the text. (3) If the cursor is in locked text (explained below), and the user types, then the typing appears just after the locked text. If necessary (when the end of the locked text is not visible in the display) the position of the text with respect to the display is adjusted so that the cursor is visible. Where the cursor should appear on the display is discussed below; but to summarize the essential point here, it appears on a line at or near the vertical center of the display. AUTOREPEAT AND ROLLOVER IN TYPING Autorepeat should function as described in THI (p 185). Research as to whether this is possible on present systems will have to be undertaken. This is not essential in a first implementation where we will use standard autorepeat as provided by the underlying system. If one or more keys (other than quasimode keys such as Shift) are held down and an additional key is pressed, the effect is as if the other keys had been lifted and the last key pressed. This is called "n-key rollover" It is presently built into most keyboards or keyboard drivers, but in case we have to re-implement it, this specification is given. N-key rollover allows rapid typing without worrying about fingers lagging on keys that have already been pressed. Here is an explicit example of two-key rollover: In ordinary typing we accept, for the string "ab" either a\ b\ a/ b/ or a\ a/ b\ b/ APPEARANCE OF THE TEXT ON THE DISPLAY The text is displayed either on the entire screen or within a window dedicated to this system. A character, at least for now, is thought of as being a rectangle of pixels. It is bottom-justified to other characters in the line, with the usual word-wrap rules applying. If a picture is inserted into the text, it behaves as any other character would, except that (at least for now) it cannot be LEAPed to. In future implementations we may allow searches for a matching picture in a LEAP (by pointing to an instance of the image and using it as a pattern; other more sophisticated approaches are possible). Text in Western languages is displayed conventionally, broken up into horizontal lines. When a character being typed or inserted would cause the length of the line to exceed the width of the display area, word wrap, as with almost all word processors, is employed. One or more spaces at the end of a line (at and beyond the position at which the typing of the thinnest character would cause word wrap) are noted internally and stored, but are not shown unless the system is in the LEAP quasimode, and only one is shown (there is not room for more). Typing a Return (the key is marked Enter on some keyboards) does not cause word wrap. In left-to-right languages the character following a Return appears at the left end of the next line. To make sure that there is room for the Return character (or other normally hidden characters when visible) at the right end of a line, text cannot be set closer to the right edge of the display area than the width of the widest normally hidden character. We do this because we do not want the display to rewrap when an area is selected. A word that is longer than a line is not wrapped. Instead, it is broken at the end of the line and the excess characters are moved to the next line. The present implementation will not do hyphenation. In particular, if a word is longer than a line, it begins after the spaces following the previous word and on the same line as the previous word (unless there is no room, in which case it starts on the next line as any other word would.). For example, here is a word consisting of all qs that is longer than a line. The lines are short in this example. Here comes a long word qqq qqqqqqqqqqqqq qqq followed by other words. Spaces are shown as a special symbol (such as a dot at mid-height) when selected. If typing a character causes a word to wrap to the next line, then erasing that character causes the word to unwrap back to the previous line. The two operations, typing and deleting, are strict inverses of one another in the humane editor. (This is not always the case with typical systems, for example, typing Tab will move you to the next field, but Del will not get you back.) After a Return or a Page character has been typed, the cursor moves to the leftmost position of the next line. If a Return or any break is typed when the cursor is on the bottom line of the display, then all lines on the display are moved up two lines, the two top lines disappear from the display, and the cursor is placed at the leftmost position on the bottom line, under the break. The move up two lines is necessary because the cursor will split onto two lines as you will see when you try THE, and as described in THI). When the cursor is on a Page or Document character, its position within the symbol is at the left margin. A Tab character, when selected, is shown as a bold arrow pointing to the right (to the left in left-to-right languages). APPEARANCE OF THE CURSOR The cursor will be the rectangle of smallest width that covers the space required by the character on which it sits. It is the height of the tallest character in the current line. The cursor flashes at a rate of three times per second with a 50% duty cycle. USER NOTIFICATION (User Alerts, Messages, Warnings, Advisories) We will use transparent messages (see p 117 in THI) that disappear as soon as you continue to work or if they are no longer necessary. You can work right through them; they do not obscure the content of the display nor do they lock up the computer in a message mode as a conventional dialog box does. If a message needs a response from the user, it can say something like, "type and select your desired response, then use the 'respond' command". The best strategy is to design so that messages are not necessary. A warning message will be accompanied by a sound, perhaps a reading aloud of the message (which reading is stopped by any user action). All messages are added to the front of the Message Document when they disappear. Thus they accumulate with the most recent message first. See the discussion under Delete, below. The idea here is that, like text, messages are never lost, but can be referred to at a later time. Messages in the Message Document can be deleted, moved, etc. as with any other text. A press and release of a quasimode key (e.g. Shift\/) does not cause the message to disappear. HOW TO INVOKE LEAPING As has been discussed above, the cursor can be positioned at any character without having to move through or across intermediate characters by the technique of LEAPing. LEAPing allows users to keep their hands on the keyboard when dealing with text. LEAP unifies cursor moving (usually done with a mouse) and text searching (usually accomplished by opening a dialog box and typing in a search pattern). One mechanism supplants two and is faster than either. As noted above, dedicated LEAP keys, especially if placed below the space bar so that they can be operated by your underutilized thumbs, create an ergonomically superior interface. Assume that the selection's last (highest indexed) character is at V(i) and that somewhere in the document is a block of characters B(1), B(2), ..., B(n). I will use the notation B(j)\ B(j)/ to indicate that the key corresponding to the character B(j) is pressed and released. Typing (standard keyboard) Two keys are used to indicate whether LEAPing is to be forward or backward. To make this choice of key language independent, we use the two keys under the index and middle fingers of the right hand when it is on home row. In the US, these keys are "j" and "k". More on why these were chosen is explained below. These two keys, whatever they are labeled on the keyboard, will be notated "<" and ">" respectively in the following discussion. Thus Shift\ Space\ Space/ >\ >/ would be typed, in the U.S. as Shift\ Space\ Space/ k\ k/ and Shift\ Space\ Space/ <\ would be typed Shift\ Space\ Space/ j\ j/ These particular key sequences are very quick to operate because (a) the Shift\ Space \ Space / portion is usually typed by the left hand and the subsequent key (j or k) is tapped with the right hand; switching hands between characters is faster than same-hand typing (see any text on the ergonomics of typing) and (b) the right hand does not have to move from home row, and strong fingers are used for the operation. As game players know, the j and k keys (or whatever keys correspond to those positions on non-English keyboards) are often used as left and right cursor control keys for this reason. In the following, then, "<" and ">" do not represent the less-than and greater-than signs. Shift\ Space\ Space/ >\ >/ establishes the forward LEAP quasimode -- which is a special case of the LEAP quasimode. Another way to say this is to get into the LEAP quasimode and then type ">". Shift\ Space\ Space/ <\ <". Typing (LEAP keyboard) LEAP>\ establishes the forward LEAP quasimode. LEAP<\ establishes the backward LEAP quasimode. In the LEAP Quasimode Once either LEAP quasimode is established, it immediately causes all hidden characters to become visible. Spaces become small dots at about one x height, Returns become paragraph symbols, and Tabs become bold right-pointing arrows. In addition, the transparent text "LEAP forward" or "LEAP backward" appears on the display in large letters that may overlay but do not obscure the text because they are transparent. In the LEAP Ahead quasimode, typing B(1)\ B(1)/ where B(1) is a displayable character, causes the cursor to move to the first occurrence of B(1) in the block V(i+1), V(i+2), ..., V(z), i.e. starting with the first character after the current selection. B(1) is the "pattern" being searched for in this case. If no occurrence appears in that portion of the document, the search continues with V(1), and continues to V(i-1) -- this called "circular search". If the pattern is still not found and while the quasimode is held, the system moves to the next document, and so on, treating the entire set of documents circularly. If no instance of the pattern is found, the system gives a visual and audible indication (e.g. a screen flash and an audible signal (a descending diminished 5th) that nothing was found. If you continue adding letters to the pattern after the first signal, each letter will cause a further signal. If you delete letters from the pattern, each delete will beep until you get back to a pattern found in the text. If, however, the first character matches something in the text and the user types a second character while still in the forward LEAP quasimode B(2)\ B(2)/ Then the search restarts from V(i+1) using B(1) concatenated with B(2) as the pattern, and following the same search path. In the implementation, speed can be improved by saving a list of found occurrences of B(1), for example V(b1), and then just looking at V(b1+1) to see if it matches B(2). If B(2) matches V(b1+1), remain here, otherwise continue the search for the now longer pattern at V(b1+1). The same is done for each character added to the pattern. When a match is found, say at V(f), and the user sees that this was the desired instance and releases the Shift key, then the cursor remains at V(f). In such a case the operation is called a "successful LEAP". LEAP back is the same, except that the on-screen transparent message says "LEAP Backward", the search begins at V(i-1) and decrements its way through the current document, circling back to the end if necessary. If there are multiple documents, then after the search has proceeded through the current document it searches through the preceding document and so on to the first document, after which it wraps to the last document, and any following documents that are behind the current document. In brief, if a search for ThisPattern is desired, the user types, for LEAP ahead on a standard keyboard (recalling that "<" stands for "j" on a US keyboard or whatever character is operated by the index finger of the right hand on home row and that ">" stands for the character operated by the middle finger of the right hand on home row. Shift\ Space\ Space/ >\ >/ ThisPattern Shift/ For LEAP back Shift\/ Space\ Space/ <\ Or, on a LEAP keyboard For LEAP ahead LEAP>\ ThisPattern LEAP>/ For LEAP back LEAP<\ ThisPattern LEAP If Del is used while in a LEAP quasimode, the most recently entered character is removed from the pattern and the displayed pattern. The cursor is returned to the most recent instance of the remaining pattern in the text. Keeping pointers to previous LEAPed-to positions during the present quasimode makes this operation almost instantaneous. The patterns used in each LEAP are stored in an Old LEAPs Document. Patterns do not match text that lies across the break between the beginning and ending of text in the circular search. Note that Tabs, Returns, and any other typeable characters can be used in a LEAP pattern. With a standard keyboard, the lower case letters that must be used in patterns match either upper case or lower-case letters in the text; this includes shifted characters such as the symbols that appear above the numbers. For example if asterisk is above 8 on the keyboard, any 8 in the pattern will match both 8s and asterisks. With a LEAP keyboard, both uppercase and lowercase letters can be used in a pattern. Lowercase letters in a pattern match either uppercase or lowercase letters in the text; uppercase characters in a pattern match only uppercase letters in the text. Additionally, character pairs such as 5 and % can be distinguished whereas they are not with a standard keyboard. SIDEBAR: LEAP and its related methods are patented, and no commercial or distribution license is afforded by this description or the open-source implementation being made public. Personal or developmental use is encouraged. LEAP is a trademark. END OF SIDEBAR LEAP AGAIN On LEAP keyboards Shift\ Leap\ Leap/ repeats the last LEAP in the direction determined by which Leap key was used. FAILED LEAPS If any LEAP fails due to there being no match in the text, an audible indication should be started immediately, while the LEAP quasimode is still in effect. This is necessary so that blind users can tell that a LEAP has failed, and for section 508 compliance. The indication is two brief notes forming a descending diminished fifth, the second note having twice the duration of the first note; if thought of as eighth notes, a good tempo would be quarter note = 160. THE Deletions Document There is a single Deletions Document (DD) created by THE when the user first makes a deletion, whether by using Del to backspace over a single character in the text or as a result of deleting a selection. The Deletions Document begins with a document character, the string D E L E T I O N S D O C U M E N T and a Return and ends with E N D O F D E L E T I O N S D O C U M E N T followed by a document character. This is necessary so that the DD can contain Document characters. Other system documents follow the same convention; in all cases, the delimiting labels are locked. The characters in the markers that help delimit the DD are separated by spaces so that they can be LEAPed to, but will not be found if the strings such as "deletions" or "document" or substrings of them are used as a LEAP pattern. The general rule for systems-provided documents is that a single space is put after each character of the name (including after a space character). Each deletion from text (deletions from a LEAP pattern do not appear in the DD) is inserted just after the Return after the spaced-out name. Thus, a word deleted by repeated use of the Del key will appear in the DD its normal order. The most recent deletions appear first, with older deletions below. The DD is password-locked text. The user can copy material from it into text, and UNDO and REDO use it to restore lost text. A special command, EXPUNGE, is used to permanently remove material from the DD. Doing so, however, may limit the depth of UNDO and REDO. OLD LEAPS DOCUMENT Leap patterns are stored in the Old LEAPs Document, just as deletions are stored in the Deletions Document. CREEPING Creeping is the use of the left and right cursor control (arrow) keys on a standard keyboard -- or tapping a LEAP key if a LEAP keyboard is used -- to move the location of the cursor one character at a time. When you do a creep, an anchor is moved along with the cursor. In the descriptions of commands, below, where LEAPing is called for, to position the cursor, Creeping may also be used. If there is an extended highlight, then a creep causes the highlight to collapse in the indicated direction while the location of the more distant anchor is not affected. SCROLLING Tapping the up-arrow should appear to move the window up one line (the text scrolls down one line). The down-arrow does the opposite. These keys autorepeat for scrolling; if we implement the Bumgarner repeat for typing, we should use the same repeat mechanism here (see THI). Scrolling up, across documents, should stop when the initial Document character appears on the top line of the display and scrolling up should stop when the final Document character appears on the bottom line of the display. Thus the display is always filled with lines of the text unless the entire text does not fill the display. In whatever way we implement scrolling, its timing must be based on the real-time clock and not depend on processing speed. The speed should increase (to some upper limit) as the key continues to be held. Scrolling stops instantly when the scroll button is released. In addition, scrolling should also take place if the scroll wheel of a mouse is used. During a LEAP, the text is never scrolled unless the LEAP lands on an instance of the pattern that is not wholly visible on the display. TEXT REPOSITIONING WHEN A LEAP TARGET IS ALL OR PARTIALLY OFF-SCREEN If the found instance of the pattern is not already on the display, the text is repositioned on the display so that the cursor is vertically centered. However if the found instance is off the display and it is also near an end of the text so that centering it would leave blank space above or below the beginning or end of the text, the text is placed so that it fills the display area, with the beginning at the top of the display or the end at the bottom. SELECTION RULES, COMPOUND SELECTIONS, AND OLD SELECTIONS A simple selection is a contiguous string of characters that is marked on the display by a selection highlight. There is always at least one character selected. The selection is that character or set of characters which is erased when you tap Del (unless it is locked text). A "character" is a more general concept than an alphabetic character; an image may also be a character. A selection in general is a set of non-intersecting simple selections. It is marked on the display by the selection highlight. An extended selection is one that consists of two or more characters. When a selection has just been made, it is called the "new selection", "selection 0", or simply "the selection". When you LEAP or creep away from an extended selection (causing the cursor and highlight to collapse onto one character), selection 0 immediately becomes "selection 1" which is marked on the display by the selection 1 highlight. Sometimes "selection 1" is called the "old selection" or the "first old selection". In general, whenever the cursor collapses, selection n becomes selection n+1. n is limited only by memory resources. After the LEAP or creep, the selection has become a single character (or "collapsed"). Because it is not an extended selection, a following LEAP or creep does not create an old selection. Selections 0 through k have distinct, but increasingly less noticeable highlights; the color remains the same but the highlight becomes more pale. Selections older than the kth are not visibly marked (but commands to make them appear may be provided). For now, k = 3 but provision for higher k should be made in the software. Selection numbers can ripple the other way. For example, if selection 0 and selection 1 are joined to make a new selection 0, then selection 2 becomes selection 1, and, in general, selection n+1 becomes selection n. If you have one or more old selections and you create a new selection that has a non-empty intersection with a pre-existing selections, then those pre-existing selection(s) are no longer old selections -- they are deselected -- and their highlights disappear, all older selections that were not involved in the intersection are moved up a number of levels equal to the number of lost old selections with smaller numbers. Because to delete part of an old selection requires that you first LEAP (or creep) into it, the LEAP (or creep) creates a selection which has a non-empty intersection with that old selection; the rule above implies that the old selection becomes unselected. However, LEAPing through a selection, when the cursor lands on a selected character, but you do not release the LEAP key because the LEAP is not completed, does not cause the selection you are LEAPing through to become deselected. A selection is not created until the LEAP key is released. On the other hand Creeping (which is equivalent to completing a LEAP to an adjacent character) will cause deselection. Regions of the display where there are no characters are never highlighted with any kind of highlight. This shows unambiguously where there are space characters in the text and where the display is truly empty due to margin settings or other non-character areas. For example, only every other line of selected double-spaced text is highlighted. There is always a selection for any non-negative n (and n cannot be negative): for example, consider the SWAP command. It interchanges the contents of selection 0 and selection 1. But what if such a command is used and there were no selection 1 (there is always a selection 0)? So that selection n is always defined, we will say that the last explicit old selection is all higher order old selections as well. For example, if there is only a selection 0, then that selection serves as the selection 1, selection 2, ... and all higher numbered selections. In the case of SWAP and where there is only selection 0 and no explicit old selections, the command swaps the selection with itself, leaving nothing changed. Our software may be smart enough to just skip the task in such a case. DELETING TEXT A tap of the Del key moves the selected text to the beginning of the Deletions Document, and then (unless the deletion is a single character) inserts a separator string consisting of one Return into the Deletions Document. It is important to put newly deleted material at the beginning rather than the end of the Deletions Document for two reasons (at least). (1) The user is most likely to need a recent deletion, and (2) single character deletions due to using the Del key will assemble into readable text. If the letter "b" in the sequence "abc" is locked and the entire sequence is deleted, the result will be that "b" will remain in its original position, and "ac" will appear in the Deletions Document. A deletion of a selection contained within the Deletions Document is removed from its location in the Deletions Document and is inserted at the beginning of the Deletions Document. In other words, it behaves just like any other deletion. If the first character of the deleted selection was V(i), then after the deletion, the cursor is on V(i - 1). Delete works identically on all characters, including Tab, Return, and Page character and the Document characters, including the immovable first and last Document characters, which are copied into the Deletions Document if deleted. In effect, there are effectively an infinite number of Document characters at each end of the world, making it easy to get to either end by Leaping to a pattern consisting of many Document characters. What can be deleted must come from the characters c numbered 1 <= c <= z-1 where z points to the last character in the text, since 0 and z point to permanent Document characters. By comparison, the cursor can be pointed at the characters 0 <= c <= z, so you can type at character locations 1 <= c <= z. COMMAND INVOCATION A command starts a process applied to a selection that results in some system action. Recall that a selection may not be a simple selection. The command may use information from old selections. When a command is invoked, THE first performs a save and then executes the command. If the characters typed as a command name do not spell a legal command, then there is no effect. The effect of an intended command may be apparent visually or not, but in any case a transparent message will be presented to the user warning that the typed command does not exist or explaining why it can't be applied, but in any case there is no time or effort penalty as the transparent message vanishes when the user does any further work with the system. To invoke a command, you press and hold a Command key, and while holding it type the command. The commands are typed in lower case. The command appears in transparent text as you type, and you can use Del to make corrections. The command is executed when you release the Command key. A null command, a command that does not apply to the selection, a command that tries to insert material when there is insufficient space, or a command that does not appear on the list of commands results in a transparent message, but does nothing else. As usual, the message persists, only vanishing when the user performs any action. The vanished message appears in the Messages Document. COMMANDS THAT TAKE ARGUMENTS In general, you select what you want the command to apply to, then you select the arguments, and then you execute the command. As far as possible, commands are designed so that only one argument is needed. A typical example would be changing the font. To do this you would select the text whose font you wished to change. Then you would select text that was the name of the desired font, such as "Helvetica" Then you would execute the Font command. If there are multiple arguments, they are selected in the order specified by the design of the command. The goal of having only one argument is desirable because the order in which arguments have to be supplied can be hard to remember. There are a number of approaches to easing this problem; the order of the arguments can be hinted at in a command name (e.g. SETXY for setting some graphic detail at (x,y)) or the command can be separated into commands for each argument as in SETX and SETY. Often, the argument is typed in for one use; therefore, in general, arguments are deleted (into the Deletions Document, of course). However, if the text from which the argument is taken is locked, the command operates normally except that the argument is not deleted. ADDING COMMANDS [This section will explain how to add pre-packaged commands, not how to program a new command] COMMAND NAMES PROVISIONAL All the command names given here are provisional, and may be changed after testing. COMMAND NAME DOCUMENT and INSTRUCTION MANUAL DOCUMENT An Instruction Manual document and a Command Name document will appear at the beginning of the text area. They are locked text and are delimited by Document characters. The cursor initially appears just after the Document character that delimits the Command Name document. To find topics in these documents, the user will simply LEAP to the desired topic (no special help system is necessary!) COMMANDS NOMENCLATURE Unless specifically stated otherwise, the words preceding "COMMAND" in each of the headings of the paragraphs that describe commands are the spellings of the commands. Command names are not case-sensitive and may contain spaces and lower-case special characters. For now, we will not use uppercase characters or symbols in command names. SHOW COMMANDS COMMAND Puts a document consisting of an unlocked list of all the available commands into the text and selects it so that it can be erased easily. REMOVE COMMAND COMMAND Select the name of an existing command and use the "remove command" command. INSERT MANUAL COMMAND Inserts a document consisting of an unlocked copy of the user manual, selected so that it can be erased easily. DATE COMMAND Inserts the current date into the document in the format YYYY/MM/DD. See USDATE command. USDATE COMMAND Inserts the current date into the document in the format MM/DD/YY. Other commands with other formats can be provided. Note that we do not have a "preferences" or "date style" setting (which would be a mode), but we provide different commands. Typical users will choose and learn one (and may even discard the other commands from the system if they judge they will never use them). Atypical users may learn and use many. TIME COMMAND Inserts the current time in the format HH:MM:SS based on a 24-hour clock. As noted under USDATE Command, different formats will use different commands. S COMMAND SELECT COMMAND On standard keyboards this command is the letter S. On LEAP keyboards: press both LEAP keys simultaneously. A system will use one or the other, depending on whether a LEAP keyboard is available. Selects the text from the current cursor position (inclusive) to the cursor position that obtained prior to the most recent LEAP. Exactly what will be selected is indicated by the preselection as soon as the humane command quasimode is entered. On LEAP keyboards, this will happen when a LEAP key or the Command key is pressed. The standard keyboard "s" command is often used for "save" in present systems, but saving is fully automatic in THE, which frees the letter for our most common command (of course, THE executes a save because it does so on every command invocation). In portable computers and PDAs, we might use a nonvolatile memory card to store every character as it is typed. In standard use, you will be at or have LEAPed to one end of the desired selection. Using a LEAP keyboard, you will then LEAP to the other end, not release the LEAP key and tap the other LEAP key, thus quickly selecting the material LEAPed over. Usually you will then release the first LEAP key. xxxx RETURN COMMAND (Invoked only by tapping Return in the command quasimode) This command causes the previous command (shown in transparent text) to be executed again (that is, returned to). Repeated taps of Return (or holding down the key and letting it autorepeat) during the quasimode will cause the same command to be repeated. However, if a LEAP was the previous command, repeating the LEAP will extend, and not restart, the potential selection (as shown by a growing indication). On a standard keyboard, LEAP is a command, and can be repeated this way. On a LEAP keyboard commands are a separate quasimode, and only commands but not LEAPs, can be repeated this way. Shift\ Leap\ Leap/ is used to repeat a LEAP (with control of direction). SWAP COMMAND Switches the contents of selection 0 and selection 1, leaving the cursor where it had been in selection 1. The content of selection 1 becomes the content of selection 0 (and is left in the selected state), and what was the content of selection 0 becomes the content of selection 1. The second and higher numbered selections are unaffected. Forth aficionados will grok this command and immediately think of others that might be useful. SWAPSEL COMMAND This command swaps the ordering of selections, but does not move the selections. It marks selection 0 as selection 1 and selection 1 as selection 0 (changing the colors appropriately). The text is not changed but the cursor jumps to the end of what is now selection 0. This allows a user to, for example, find and delete or otherwise work with selection 1. A second use of SWAPSEL would restore the previous state. DROP COMMAND The "DROP" command deselects the 0th selection, selects the 1st selection, makes the 2nd selection the 1st selection and so forth. Repeated use allows you to discard recent selections and activate an old selection. MOVE COMMAND To use this command, you begin with a selection. Then you LEAP and/or Creep the cursor to a new location and invoke this command, which inserts the selection at the current cursor position as if it had been typed there (except that formatting and other attributes are preserved: this is an exact copy). The original selection is then deleted. The command does not place a copy in the Deletions Document. After the insertion, the moved selection is left selected with the cursor on the character following the selection. Some systems have a "smart insert" feature which attempts to preserve the proper "one space between words" when text is moved (via cut and paste in traditional systems). This cannot work in general, for example, when moving text into a URL or algebraic expression that should not have the spaces as provided. In other words, this automatic feature is probably impossible to design so that it is reliable and trustworthy. In THE we assume that the user is smarter than the software, and we move text exactly as commanded. If some third party wishes to create a "clever move" command that attempts to fix spacing, then such a feature will survive or not in proper Darwinian fashion. COPY COMMAND You make a selection and then LEAP. Applying the copy command will then insert a duplicate of the selection as if it had been typed at the location LEAPed to, except that all attributes, such as font and lockedness, are preserved. The copy will be left selected with the cursor on the character following the selection. Lockedness is, of course, the monster in Scotland. COPYOUT COMMAND This command places the copied material on the system clipboard from which it is available to other windows (or even its own window). Prior content of the system clipboard is discarded without notice (this practice is part of existing OS behavior, we are sad to note). See the COPYIN command. The material is not deleted from the text and is left selected so that it may be deleted or otherwise used. "C" is the letter used for this operation on most personal systems, which is why we are considering it as a possible alternative. Nonetheless, COPYOUT is a far more descriptive and memorable name. It is not used so often as to be too long to type. While it could conceivably be used to move a selection within a document (in conjunction with DELETE and COPYIN), That is not an intended use (though it is not prohibited). MOVE is faster, safer, and easier. When THE is used without an underlying alien OS, COPYOUT is not provided, which restores monotony to the system. COPYIN COMMAND This command inserts, at the cursor location, whatever is in the system clipboard. This is done as though it were typed (if text) or as a single character insertion (if graphic). The inserted material is left selected so that the user can, if desired, delete it, move it, or otherwise operate upon it. "V" is the name for this operation on most personal systems, however, that was chosen for its proximity to "C", a condition that does not obtain on all keyboards around the world. The content of the system clipboard is unaffected by this command. When THE is used without an underlying alien OS, COPYIN is not provided. TP COMMAND The "TP" (Talk with punctuation) command is essential for vision-impaired users. It can be stopped with the space bar and restarted with the Return. TP is unlike the rest of the system in this regard, however, this use of large, easily tapped keys is essential if a user is to quickly start and stop the voice. Our previous convention of using a command was too slow. This convention is operational only when the system is producing sounds that are protracted in time such as speech, music, or videos). The system speaks all punctuation with a special tone of voice to distinguish the occurrence of a comma from the word "comma". The system starts pronouncing the text starting at the cursor location. This allows a user to just LEAP somewhere and hear where they've landed without making a selection and possibly losing their place. T COMMAND This command is the same as TP, except that punctuation is not read aloud. This allows for more pleasant readings of large amounts of text and for applications where hearing the exact punctuation is not important. JOIN COMMAND AND THE BEHAVIOR OF DISCONTIGUOUS SELECTIONS Join combines selection 0 and selection 1 as selection 0. They do not have to be contiguous. Selection n+1 becomes selection n for all n > 1. While Join can be undone, there is no Unjoin command. If a discontiguous selection is moved, what appears in the place moved to (or transferred to, as with SEND) is the concatenation of the parts of the selection, in the order in which they appeared in the text. In the case of SWAP (which is the most difficult case), when both selection 0 and selection 1 are discontiguous, each discontiguous selection is concatenated into a single block of text, Selection 0 is inserted at the location of the first (nearest the beginning of the document) part of selection 1, and selection 1 is inserted at the location of the first part of selection 0. Other commands where one or the other selection is discontiguous work to the same rule. This command can be used to copy discontiguous blocks of text to the system clipboard, via the COPYOUT command. The blocks of text are concatenated. CALC COMMAND The calculate command, given a selection S that represents an evaluable expression, creates a new selection, S', that represents the result of the calculation. The selection S is moved to the Deletions Document and the selection S' is inserted in its place. For now, the expression will be in Python syntax because it is similar to standard notation and because it is easy to implement. An expression may include assignment to name its result as a variable (with Python variable name syntax) and can use variable names that were defined in a previously executed expressions. UNCALCULATE COMMAND A result is the end-product of evaluating an expression by use of the CALC command. Applied to a selection S', the "UNCALC" command first places a copy of S' in the Deletions Document. Then, for each result in the selection S', the "UNCALC" command substitutes the expression that gave rise to that result. LEAP COMMAND This command uses the selection as a LEAP search pattern. This search is precisely case-sensitive. The pattern can easily include document and Page characters. LEAPREG COMMAND This command uses the selection, in the form of a regular expression (Boolean searches with wild cards) in the text as the pattern for a LEAP. FIND CURSOR COMMAND If you have scrolled away from selection 0, this command gets you back. It positions selection 0 according to the display rules previously stated. It has been suggested that the FIND CURSOR command may not be necessary as tapping a Creep key has the same effect (though you have to remember to tap the other Creep key if you want the cursor in the same place as it was. However, use of Creep collapses the selection, which you may not want to disturb. RESPOND COMMAND When a program needs input, it sends a message and then waits until the user sends a response to the program. The user does this by selecting the response and then invoking the RESPOND command. The programmer can, of course, create other input behavior, but the user should never be forced to respond before proceeding with other tasks (because that would be modal) although the particular program that is requesting input may not be able to proceed without the input. The system should not be rendered unusable just because a program is waiting for input as now happens with many GUI dialog boxes. If there are multiple programs executing, the RESPOND command directs the input to the most recent notification before the command quasimode was entered. Again, the programmer can specify other behavior, or even supply a new command for their program so that the user can respond without having to respond to a later request for information first. The request for input should be specified by a transparent message. Executing the RESPOND command leaves the selection selected. Obtain document SP0007 from Jef Raskin for further information if you are interested in implementing this. ITALIC COMMAND Changes the font of the selected text to the corresponding italic font. REMOVE ITALIC COMMAND Removes the italic attribute from the selected text without affecting other attributes. Note that we do not use the italic command (or any other command) as a toggle. BOLD COMMAND Changes the font of the selected text to the corresponding bold font. REMOVE BOLD COMMAND Removes the bold attribute from the selected text without affecting other attributes. UNDERLINE COMMAND Changes the font of the selected text to the same font with underline. REMOVE UNDERLINE COMMAND Removes the underline attribute from the selected text without affecting other attributes. DOUBLE UNDERLINE COMMAND Changes the font of the selected text to the same font with a double underline. REMOVE DOUBLE UNDERLINE COMMAND Removes the double underline attribute from the selected text without affecting other attributes. STRIKEOUT TEXT COMMAND Changes the font of the selected text to the same font with a strikeout line. REMOVE STRIKEOUT TEXT COMMAND Removes the strikeout line attribute from the selected text without affecting other attributes. NORMAL COMMAND NORMAL removes italic and bold attributes from the selection (and possibly other attributes if they are part of the system), the color is set to black, and the font size to 12 points or 4.2 mm and the font to Courier (The THE default font and settings, whatever they turn out to be). A copy of the selection is put into the Deletions Document so that its formatting may be recovered if desired. ALL CAPS COMMAND Capitalizes every letter in the selection, whether it was capitalized or not. The original version of the selection is put into the Deletions Document. NO CAPS COMMAND Puts every letter in the selection into lower case. The original version of the selection is put into the Deletions Document. CAP EACH WORD COMMAND Capitalizes every letter in the selection that follows a space, open parenthesis, open bracket, or open brace. The original version of the selection is put into the Deletions Document. SHOW FONTS COMMAND Inserts a selected list of the available fonts. Otherwise operates as does the COMMANDS command. FONT COMMAND To put some text into a particular font (typeface) select the text, then select the name of the font, and execute this command. If the font name is not in locked text, it will be deleted. FONT SIZE COMMAND To put some text into a particular font size, select the text, then select the desired font size, and execute this command. If the font size is not in locked text, it will be deleted. The size can be an integer or fractional (e.g. 12 or 7.4) and expressed in units of points, inches, or mm by being followed by a two-letter abbreviation: pt, in, or mm. If there is no units abbreviation, then mm is assumed. SHOW FONT COLORS COMMAND Inserts a selected list of available font colors. FONT COLOR COMMAND To put some text into a particular font color, select the text, then select the desired font color, and execute this command. If the font color is not in locked text, it will be deleted. NEW FONT COLOR COMMAND A five-argument command (intended for advanced users and not to be explained in the tutorial but only in the reference manual). The arguments are font color name, r, g, b, and a; where r, g, and b define an RGB color and where a is the alpha channel (transparency). Out of range numbers are treated as 0 and a transparent error message is given. MATCHING STYLE TO SURROUNDING TEXT When a character is typed, it assumes all the text attributes that applied to the rightmost character the highlight was on just prior to typing (Leftmost in right-to-left languages). When a selection is moved or copied, each character retains the attributes it had prior to the move. The characters adjacent to its new position are not affected. COLOR CHOOSING VIA GRAPHICS A graphic color picking mechanism will be provided as we implement the graphics portion of THE. Even in a three-color, 8-bit per color space, we have 256^3 = 16,777,216 possible colors. A GID will be used to point to the desired color, zooming in if necessary to increase resolution. The action can return RGB values that can be used in a command such as the FONT COLOR command, and a means for choosing a sub-palette of colors and naming them will be provided. As is explained elsewhere, palettes are accessed by pie-menu structures. A mechanism for setting transparency will also be needed. PAPER WIDTH Select a desired paper width, and apply this command. If not used, the paper width will be set to the paper width of the printer, if that is possible. Otherwise to some convenient value (e.g. 8.5 inches in the USA). PRINT COMMAND In a single-printer system, this command prints the selection. The printed representation of the selection appears on paper as it does on the screen. Most notably, the printed representation of the beginning of the selection appears at a corresponding position on the paper, which is not necessarily the left margin. If the first characters of the selection acted on by the Print command are Document characters or Page characters, they are not sent to the printer, but the rest of the selection is. This prevents ejecting extra initial pages when you print a selected region that starts with, for example, a Document character or a Page character. If no printer is attached and the system can detect this fact, a message is given in the usual fashion. In multiple-printer systems, each printer has its own command, e.g. LASERPRINT, COLORPRINT, MKTPRINT, etc. and a command that allows setting up and naming such printer sets would be provided. By using separate commands, modality is avoided. A SHOW PRINTERS command could list all the printers available and annotate the user-relevant properties of each. In a multi-printer environment, the unaimed PRINT command is not available. We cannot set it as a default printer because that would be modal. If someone reset the default, then a person would be surprised at the result of a PRINT. I realize that some third party is likely to create a generic "PRINT" that, say, uses whatever printer was last used and claim that they have improved ease of use of THE. You will be happy with the "simplification" until the boss comes along and asks why you printed the 1400-page draft on the very expensive dye-sublimation printer. STOP PRINTING COMMAND Causes the printer to stop its action as soon as possible. If another PRINT command is issued after a STOP PRINTING command, then the remainder of the last document should not be printed, if it is possible to command the printer to do so. CONTINUE PRINTING COMMAND If the printer has been stopped, this command attempts to continue printing from where the printer left off. UNDO COMMAND The undo command undoes the last operation. Further invocations of UNDO continue to undo prior operations. Not everything is undoable, for example, Print. Attempting to undo a non-undoable command results in no operation taking place, except that the next undo will apply to the operation prior to the non-undoable operation. If undo is the first command used after a LEAP, the system is returned to the state it was in prior to the LEAP. Undo depth is unlimited, except by the limitations of physical or virtual memory. Unlike other commands such as CALC or PRINT, UNDO does not do an automatic save first. If it did, then it would have to undo the save and then undo the last action. Providing for UNDOs requires memory; if there is not enough memory to execute a command and make it undoable, then the out of memory message should be given and the operation not performed. GRANULARITY OF UNDO What exactly is the "last operation" that the UNDO command undoes, that is, what is the granularity of UNDO? UNDO undoes the effect of the last non-quasimodal keystroke or a set of keystrokes done under a single quasimode and takes you to the state the system had just before that keystroke was made or quasimode established. The state includes screen appearance, cursor location, selections and all except the contents of the Undo Document (which must be retained to permit a Redo). Say a command has just been completed; not only would UNDO undo the command, but you'd be left at the state just before you pressed the Command key, including cursor position, highlights, etc. Some operations, such as printing, cannot be undone. If there are no more actions to be undone, a message is given and the command has no effect. Of course at this point the text should be empty, except for the user manual and the UNDO/REDO document. UNDO will, by this definition, undo only one character if the last operation is the typing of a character. The ability to repeat a command by means of a single keystroke speeds undoing a sequence consisting of typed characters. Undoing of typing during a quasimode is accomplished with Del. CANCEL UNDO COMMAND This removes the ability to undo past the point where the command was invoked. This is used for security purposes, for example, to make it impossible to undo password locked text. REDO COMMAND The REDO command redoes the last UNDO, if possible. Repeated use redoes successively older undoes, to the extent possible. If there are no more UNDOs to be redone, a message is given and the command has no effect. EXPUNGE COMMAND EXPUNGE is used to remove a selection in the Deletions Document. The EXPUNGE command cannot be undone as it is meant to be a permanent erasure. EXPUNGE is the only way to remove material from the Deletions Document, as merely deleting it just moves it to the top of the Deletions Document. PAGE KEY (COMMAND) This key (on the LEAP keyboard) inserts a Page character into the text. Page characters will appear as a full width graphic across THE's display. They can be deleted, LEAPed to, and handled just as with any other character. If convention weren't an issue we would probably want to call the Return key the "Paragraph" key, completing the analogy. On standard keyboards a PAGE command inserts a page character. The tilde will be used to type and search for Page characters on standard keyboards. A command (TILDE) can be used to insert an explicit tilde into the text; this works identically to the document character and accent grave mechanism. FALSE PAGE CHARACTERS The system inserts implicit, or floating, false Page characters, represented by a graphic, such as a dashed line, that spans the display. It indicates where page boundaries will be if the document is printed (this assumes that the system knows page length, presumably by interrogating the printer). These False Page characters cannot be deleted or moved as they are not true characters. False Page characters in the text are ignored when they occur in the midst of a LEAP target. It is a great convenience to be able to LEAP from page to page, whether pseudo-page delimited or true Page character delimited. It is also convenient to be able to use a Page character in a search string to easily move to a target that includes or is near to a Page character (of either type). Thus a Page character in a LEAP pattern matches both real and false Page characters. Using -p- to represent a Page character, -f- to represent a false Page character, and this text: A sprain makes pain -f- that plainly wanes -p- when feigned. Starting with the cursor on the initial "A", a LEAP> to the pattern "n-p-" moves the cursor to the "n" in "pain". A LEAP to the pattern "n that" would move the cursor to the same place. A LEAP to "s-p-" would move the cursor to the "s" in "wanes", but a LEAP to "swhen" would not because this Page character is real. Note that to LEAP to the "n" in "pain" would require the pattern "n that" because if "painthat" had been typed originally, THE would not have split it across lines. Of course, when LEAP is invoked, the Space character would have been made visible. PAGE LENGTH COMMAND Select the desired page length (with units, as in 11", 11 in, 300 mm) and use this command to set the page length. This affects the placement of false page characters. TILDE COMMAND Necessary only with a standard keyboard. Inserts a tilde into the text (not a tilde over a letter). Typing a tilde puts a Page character into the text, which is why we need this special command. We cannot use, instead, a "PAGE" command (or a "DOCUMENT" command, see below) because then there would be no way to put a Page character or a Document character into a LEAP pattern. Page and Document characters are very often part of LEAP patterns. GRAVE COMMAND Necessary only with a standard keyboard. Inserts an accent grave into the text; not an accent over a character but just the character itself. The name of this command is a bit unfortunate as some people will pronounce it as though it was a hole to put dead things into, but the term is probably OK for now. Typing an accent grave places a Document character into the text. LOCK COMMAND All text in the selection is locked by the LOCK command. That text is locked is shown by a special highlight. Locked text may be LEAPed into and selected, but attempts to change the locked text (e.g. changing the font) has no effect besides bringing up a transparent error message that says "This text is locked, and cannot be changed without first being unlocked." and which disappears at the next keypress. Attempting to type or insert into it results in the typing or insertion appearing at the end of the locked text. This is designed to facilitate the filling in of forms. The importance of locked text cannot be overstated. Without it we cannot create forms or have documentation that cannot be accidentally erased. Locked text is mentioned in connection with a number of other commands. If a selection contains both locked and unlocked text, and Del is tapped, the unlocked text is deleted and placed in the Deletions Document. The locked text remains. In particular, this is how a form is cleared. UNLOCK COMMAND All text in the selection is unlocked by the UNLOCK command, and the special highlight is removed. PASSWORD LOCK COMMAND All text in the old selection is locked, and cannot be unlocked except by means of using the password. The zeroth selection is the password, and is expunged (does not appear in the DD) after the command is executed. To keep a user from unlocking via repeated use of the undo command, the CANCEL UNDO command should be used. PASSWORD UNLOCK COMMAND Select the text to be unlocked, then select the password needed to unlock the password locked text, and use this command. The password is expunged. ABOUT TABS The original typewriter tab stop system was based on the fixed-pitch technology of the time. Current systems tend to use a fixed distance from a margin (the left margin in left-to-right languages). However, this does not scale when the display width of text is changed. Thus we use a percentage-of-width method for both margins and tabs. When printing, the width of the paper becomes the width used in calculating tab positions. Any selection may have a set of positions associated with it by means of the various tabs commands. These positions are called tab stops. A Tab is a character of variable width that extends from the current cursor position to the next tab stop. A tab position is an integer from 0 to 99 inclusive, which represents a percentage of the width available between margins. Margins are measured as a percentage of the total width available. Left and right margins of 10 will set the margins in from the left and right respectively by 10% of the available width. Margins and tab setting values are always positive numbers. Default tab stops are set at 5, 15, 30, 45, 60, 75, and 90 percent. Tabbing beyond the last tab stop on a line moves the cursor to the beginning of the next line. SHOW TABS COMMAND Inserts and leaves selected a list of tab stops in effect at the current cursor position. A list of tab stops is a set of integers separated by spaces. See SET DECIMAL TABS command for an example. A graphic implementation will put up a graphic that displays the positions at which tabs are set by means of vertical transparent lines at the tops of which are their numerical values. This display disappears when any other command was issued. SET TABS COMMAND Creates one or more tabs which are provided by the user in the form of a selection that contains a list of one or more tab stops, separated by spaces, that form the selection. Illegal tab stop values result in a transparent message that explains this behavior (and giving the format for tab lists). The message disappears on the next keystroke as usual. To use this command, the user first selects the text to which the tabs are to apply, then the tab list, and then invokes the command. The tab values do not have to be presented in order. Duplicate values are ignored. If you wish to change some tabs but leave the others as they are, or add or subtract tabs from the list use the SHOW TABS command, edit the list, and then use the SET TABS command. SHOW DEFAULT TABS COMMAND Inserts the default tab list and selects it so that a subsequent SET TABS command will set the default tabs. SET DECIMAL TABS COMMAND Allows you to set decimal tabs. They are distinguished from ordinary tabs by having a decimal point immediately after the value. For example, if the SHOW TABS command results in 5 10 23. 56 82. Then there are ordinary tabs at 5, 10, and 56 percent of the width and decimal tabs at 23 and 82 percent of the width. The numbers are presented in ascending order. SHOW MARGINS COMMAND This returns two numbers, the locations of the left and right margins. SET MARGINS COMMAND Operates analogously to the SET TABS command. If more than two numbers are presented, the first two values are used. A transparent message tells the user that this has been done. DO COMMAND: USING THE SELECTION AS A COMMAND This command treats the selection as if it were typed while the command quasimode was in effect. This permits using a command that appears on the display without having to retype it. If the selection is not a command name, this action results in a transparent error message explaining the problem and how to fix it. The LEAP commands in text are written LEAP> and LEAP< to indicate direction. The remainder of the selection is a LEAP search pattern. This search, unlike the usual standard keyboard LEAP, is case-sensitive. The pattern can include Return, Document, Page, and other special characters. Note that this command has eliminated the need for the "leap forward" and "leap backward" commands that appeared in previous versions. COMMENTS ON THE REPLACE COMMANDS The following few commands allow automatic or semi-automatic search-and-replace operations. In each case, when all instances in the desired region have been reached, a transparent message announcing this and showing the number of changes that have been made appears. The fully automatic replace operations can continue in the background as a user proceeds to edit. The text being worked on is temporarily locked. When the operation is complete, the replacement is left selected so that the user can easily delete it. This also returns the focus to the place from which the command had been launched so that the user does not lose orientation. REPLACE COMMAND This command allows semi-automatic replacement of every instance of one item (the target) by another (the replacement). Highlight an instance of the target (e.g. a word, phrase, or other text element; later this will be generalized to graphic and other objects) and invoke the Replace command. A transparent message appears: Please select, or type and select, the replacement. The original text will be replaced by what you type as soon as your selection is made. Then the next instance of the target will be found. Press and hold Command and tap Return for each target you want to replace. Tap Space if you wish to skip the instance of the target and find the next one. Release Command when you are done. The search wraps around the current document. Even if the target is or contains a Document character which gets changed, the scope of the search is not increased because the next target (if any) is identified before the change to the previous target is made. REPLACE ALL COMMAND This command allows fully automatic replacement of every instance of one item by another within a document without allowing the user to decide on each individual replacement. It otherwise works as does the REPLACE command. S-REPLACE COMMAND This command uses the 2nd old selection as the domain covered by the Replace command. That is, you first select the region you wish to have the replacement operate on, then choose the target, and lastly apply the S-REPLACE command to the replacement. S-REPLACE ALL COMMAND Similar to the Replace All command, except that it applies to a selection as in the S-Replace command. S-REPLACE CYCLE COMMAND Same as the S-REPLACE ALL command except that it repeatedly cycles through the domain until there are no instances of the target remaining. USING REGULAR EXPRESSIONS IN DEFINING TARGETS xxx TASKS COMMAND This puts a list of currently operating tasks into the text, selected so that it can be easily deleted. A task is the result of any command such as talking or printing, or one that is waiting for a response, or any operation which takes enough time that the user has gone on to do other things with THE. The task name is the name of the command that launched it. If the same command has been used again before the first task initiated by that command has completed, then a digit is placed after the name, for example, PRINT2, PRINT3, etc. In later versions the task lists can be made humane by, for example, putting the first few lines of what is printing (or to be printed) alongside or under the items so that the user does not have to remember which was PRINT3. STOP COMMAND If a process such as those discussed in the TASKS command is ongoing and is interruptible, then this command stops the process whose name is selected, and discards any intermediate results. UNDO will restart the process. Note that pausing and restarting the T and TP commands is via the Space and Return keys. Selecting, "TP" or "T" and using the Stop command will stop the command whose name is selected so that a tap of the space bar will not restart speech. EMBEDDING PYTHON When a selection that includes both text and Python code is executed (see the Run and Compile commands) the system has to have a way to distinguish code that is embedded in text. As Python uses indenting as part of its syntax, any line in the selection that begins with two or more spaces is treated as executable (the first line of code must begin with exactly two spaces). This happens only when the run command is invoked on the selection. Any lines that begin with no spaces are treated as comments. Lines with one space will be treated as comments, but it is not recommended that this fact be exploited, as it can make it hard to tell code from comment. This convention has been chosen so that comments can be edited freely, without excessive punctuation (such as three quotes in a row), and yet will word wrap. If you think that this convention makes putting in code more labor-intensive, consider that in a well-documented program there is more (usually much more) comment than code. See Knuth's "Literate Programming" article (reprinted in his book, Literate Programming). For security, it is essential that a program cannot be executed or compiled by an external agent. That is, only the local user can select text that includes code and cause it to be executed or compiled. Certainly, some users can be tricked into allowing trouble-making software to run on their machines, but if there is no way to cause code to be executed remotely, we will have a more secure system. This is, of course, not the only step we need to take in the direction of security. RUN COMMAND A selection can be treated as a program by means of the appropriate command (e.g. runC, runSqueak, runHaskell, or runForth). If there are multiple languages, then there will be no default "RUN" command. Eventually, the system may detect the language based on the syntax, and we'd just have a RUN command. This will also work if we have only one programming language. At present, RUN executes Python. Normally, output from a program is inserted at the cursor location, though the programmer can direct it in any way the programming language and THE allows. There is no requirement that Python in particular be the implementation language. It is used as an example here because it is the language of the first implementation and is a reasonably humane language. This specification only requires that any language used in a particular implementation be accessible to users via a RUN command. COMPILE COMMAND This command is used by application and system programmers who wish to modify the humane environment itself, such as by adding commands. This can be done from within the editor and will be detailed in separate documents as it is not part of the non-programmer user interface. BOLDCODE COMMAND This command makes it easier to see the code portions of a selection. It does this by making them bold face without affecting the non-code portions. If some portions of the code are already bold, it will leave them bold. When using this convention for distinguishing code from text, it is unwise to use boldface in text that explains the code. Thus, to remove bold face from the code, use REMOVE BOLD. INDENT COMMAND When moving Python code about, it is sometimes necessary to move an entire block of code left or right while leaving ordinary text unaffected. To do this, select the text whose code is to be intended, and select the number of spaces that the code is to be moved to the right (thus, negative numbers move the code to the left). Invoking the INDENT command moves the code in the block. The least indented code will not be moved further left than two spaces to the right of the left edge (without those spaces, it no longer is code). Use of the repeat command (Return) after an INDENT command will visibly move a block of code. SEND COMMAND To send an email, you create the selection to be sent, then you select the email address or addresses (perhaps from your email address list, or you might type it). Then you execute the SEND command. The subject line is taken from the first non-empty, non-boundary-character line of the content of the email. ATTACHMENT COMMAND It is not necessary to have a separate mechanism for attachments or enclosures, which are an artifact of the file structure of standard operating systems. So that something may appear as an attachment when received by a non-THE system, you can select a portion of the material to be emailed and use the ATTACHMENT command. This will cause the selected portion (which may be graphics or sounds) to be marked as an attachment according to the standard conventions for email. When sending to another person using THE, this command is unnecessary, and if used will be ignored. SEND WITH CC COMMAND Select the text, then the main addressee(s), and then the CC addressee(s). The three selections are then treated as an outgoing email to the named parties. SEND WITH BCC COMMAND Works as SEND WITH CC command. We could have a three-argument "send with cc and bcc" command, but that seems a bit much. MARK AS QUOTE COMMAND Marks the selection as having come from an email to which you are replying. RECEIVING EMAIL Incoming email is inserted as it arrives at the beginning of the Incoming Emails document. It behaves as do the other accumulating documents. Attachments are brought into the same document. Line feeds immediately before or after Returns are ignored, but if not associated with a Return are changed into Returns. If the system runs out of room while receiving an e-mail or an attachment, a message is made available in the usual manner. SET EMAIL PASSWORD To set an email password select the email address that people will use to send email to you (such as Studebaker@cars.com) and the desired password and use this command. The password will be expunged (not deleted!) from the text for security. CHANGE EMAIL PASSWORD You can change the email passwords you need to receive mail (in most systems) by selecting the email address that people use send email to you (such as barbie@doll.com) then the old password, and finally the new password and executing this command. If the old password matches the existing password for that email address, then the password is changed to the new password. The passwords are expunged (not deleted!) from the text for security. SET EMAIL INCOMING SERVER If you are barbie@doll.com then the incoming server (the name of the system that sends mail to you) will be something like imap.doll.com You have to ask your service provider for the name of what they will call the "imap server" or the "pop server". Some service providers cannot be accessed this way and can be reached only by their own software, AOL was, at the time of writing, an example. To set the incoming server, select the name of the server and use this command. SET EMAIL OUTGOING SERVER There is a mail server that you send mail to. Again, you have to ask your service provider for this information. Often this name will begin with "smtp" for reasons known only to gnomes who live under dying trees. For example, smtp.bignetwork.net To set the outgoing server, select the name of the server and use this command. OTHER INPUT AND OUTPUT Commands that send a selection to any parallel, serial, USB, Firewire or other port should eventually be provided. Provisions should also be made to receive information from any port. We will discuss implementation. How text is communicated to a foreign system except by email has not been determined. For now, we will probably use plain text, RTF, VML, HTML, etc. (to be discussed). AUTOPAGINATE COMMAND Number all pages in the selection consecutively, resetting to 1 whenever a Document character is encountered. PAGINATE COMMAND Make a selection of the material to be paginated, then select a page number, and issue the command, pagination starts at that number. SUPPRESS VISIBLE PAGINATION COMMAND Pages entirely included in the selection will not have their page numbers appear. On the display, those page numbers will be grayed out. RESTORE VISIBLE PAGINATION COMMAND Pages entirely included in the selection have visible page numbers when printed. OTHER PRINTING-RELATED NEEDS Commands for headers, footers, pagination in Roman numerals, and other page-related material and other pagination schemes will be accommodated by commands. Possible ones might include PAGINATE LEFT, PAGINATE RIGHT, and PAGINATE ALTERNATE for putting page numbers on the left, the right, or alternating left and right. As always, these features will be applied to a selection by commands, and all should have results that will be visible on the display so that there are no hidden states, but only changed content. Page numbers will be visible on the display. Ideally, they will be inserted into the text in such a way that they can be LEAPed to, but will still be automatically moved as pagination changes. This feature needs some design attention. ALPHABETIZE COMMAND Puts the natural language words and numbers in the selection into numerical and alphabetical order. Words are defined differently for different natural languages. A starting point for a definition of words in English is this: a word begins with any alphabetic character that follows any non-alphabetic character and ends with the character before the first non-alphabetic character encountered. Numbers are defined in the same way, except that "alphabetic character" becomes "numeral" and the decimal point (a comma in Europe) and a leading minus sign, if one is present, are part of a number. Real numbers are put into ordinary numerical order; complex numbers are sorted by their real part, two complex numbers with equal real parts are ordered by their imaginary part. ALTERNATIVE COMMAND The selection becomes marked as an alternative, and is presented on the display with a distinctive marking, such as a red dotted underline. An alternative cannot overlap with another alternative. An attempt to do so results in a message. This is more a designer's than a user's command. LEAPing to an alternative results in the entire alternative becoming selected. Typing or deleting from an alternative removes the alternative attribute from that alternative. ALTERNATIVE GROUP COMMAND Each alternative in the selection is internally marked as part of a particular group of alternatives. A group of alternatives cannot overlap with another group of alternatives. An attempt to do so results in a message. The entire selection is presented on the display with the same marking as an alternative. This is more a designer's than a user's command. PICK COMMAND If any portion of an alternative is selected, use of this command causes the alternatives which have one or more selected character or item in them to lose their alternative status, the group of alternatives to which they belonged loses its alternatives status, and any alternative items that do not have a selected element and all other non-alternative material in the group is deleted. Pick is a very fast mechanism for picking an item from a list of items, something that users must do in many circumstances. For an example of its use, see the SP command. THE SPELLING DICTIONARY The "dictionary" is used primarily for the spelling command, though other uses can be found for it (such as an anagram generator). The dictionary is in fact a vocabulary list consisting of words that are to be checked for spelling. (We could make it a dictionary by adding definitions). The spelling dictionary is a document, and can be LEAPed to just as with any other document. Each entry in the system-provided word list is individually password locked. This permits the user to add additional words and yet be able to restore the original dictionary by merely selecting it and deleting (which will delete all the unlocked text). Third party vendors can provide additional words (e.g. a medical vocabulary) or alternative dictionaries. SP COMMAND This command checks spellings or, more accurately, checks to see if what seem to be words in the text appear in the dictionary. For the name of this command, we use the letters that editors use to mark a questionable spelling. To use it you make a selection and apply this command to check the spellings of the words in the selection. In the simplest version, Each word that is not in the dictionary is made into an alternative (see the ALTERNATIVE command). The user can LEAP to any word marked as an alternative (interpreting it as a potential spelling error, and either delete it (it is selected when LEAPed to) or modify it. In a more complete implementation, the system would create a set of alternatives. For example, if the string "toyd" appeared in the selection, it would be replaced by a group of alternatives such as toyd toy toad toed told toys toyed The user would LEAP to one of them, and then use the PICK command. This would pick and leave the desired alternative in place and the others would vanish. The GOMS analysis of this spelling checker shows it a distinct win over present GUI practice (which was not the case with the earlier versions of this command). ADDWORD COMMAND This command adds the selection to the dictionary, in its proper alphabetical order. The selection can be of any length (though for now we will not include spaces or between-word punctuation in a dictionary entry). When a spelling error is detected, and the suggested alternatives displayed, that display should also display a message that a word incorrectly pointed to as erroneous can be added to the dictionary with this command, relieving the user of having to remember the command when it is needed. Of course, this command is, strictly speaking, unnecessary as the user can place any desired word in the dictionary just by typing it there. A purer, if more difficult, alternative would be to use the alphabetize command after adding the word manually and not have ADDWORD at all. GRAPHICS When doing graphics, a graphic input device (mouse, tablet, etc.) is essential. The user should not have to switch back to the keyboard in order to issue graphic commands. The following commands, group, stick to page, UNSTICK from page, and stick to screen, facilitate graphics. STICK TO PAGE COMMAND This command allows the user to take a selection and make sure that it does not move with respect to the nearest previous explicit Page or Document character. A special highlight indicates stuck text. UNSTICK FROM PAGE COMMAND When unstuck, it becomes inserted at its apparent position in the text. If the selected text is not stuck, this command has no effect. STICK TO SCREEN COMMAND This command allows the user to take a selection and have it remain in a fixed position on the display (namely, where it was when selected), where it stays on top of all other material on the display. Newer selections cannot be put on top of it because they can't get on top of it. Of course it can be selected and deleted. This may be replaced with a split screen command. QUIT COMMAND For now, when we are running on various platforms where we are not the primary software (eventually the humane environment is intended be the primary software for its users), this command saves the current state of the system and terminates execution of the humane environment software. Eventually, there should be no QUIT command as there will be nothing to quit to. COLOR CHOICES These colors, chosen by continued experiment and subject to change, are given in RGB color space and in hexadecimal. Selection Colors 0 1 2 3 (and all older) selections R 00 7f bf e1 G ff ff ff ff B cc e6 f3 f9 The 0th old selection color (00 ff cc) is also the color of the non-flashing part of the cursor, which is, after all, the default selection. Indication Color (what will become selected if the select command is invoked; this is the color if we use block indication, use the selection color if we use underline) R fe 254 G f3 243 B a6 166 Cursor Color R ff G 4a B 4a KEYBOARD DIAGRAM Click for horizontal version NOTES: All key sizes based on standard 3/4" (19mm) spacing. This is a "full-size" keyboard. No autorepeat. Left and Right Leap keys mapped to f13 and f14. Blank keys at right side of second row mapped to f10, f11, and f12. "F" and "J" keys should have tactile bumps. Note that "+" is unshifted and "=" is shifted; this is the reverse of the standard keycap indication. OPEN ISSUES AND DISCUSSIONS OF ALTERNATIVES Specify beep sounds (frequency, duration) and what on the display flashes. Specify flash color alternation and timing. -- Aza How many old selections are retained, and for how long? When does the list of old selections get pruned? -- Jef The Replace-and-find command could be made easier to learn and use. but a better alternative has not yet been proposed. -- Jef Note that in the Cat a mistake was made. Forward and backward erase were automatic: immediately after a LEAP erase went forward because most people leaped to the beginning of a word they wanted to delete, otherwise it went backwards through the text. Thus LEAP had a side effect of changing erase direction. We have not copied this error. Nonetheless, it worked correctly most of the time. Can we capture the benefit without the problems? -- Jef The various messages referred to need to be specified. They will eventually have to be translated as well. -- Jef TEXTS WITH BOTH LEFT-TO-RIGHT AND RIGHT-TO-LEFT LANGUAGES Let a, b, c be letters in a left-to-right (ltr) language and x, y, z be letters in a right-to-left (rtl) language. As in the other documents, upper case will be used to show the location of the selection and an underlying asterisk the location of the cursor (and, as usual, display this in courier) Consider bCxy ..... (1) .*........ As the highlight is in the ltr portion, deletion would delete the c, leaving Bxy ..... (2) .*....... A further deletion would do what I think most would expect, and delete the b. Ignoring the question of how you type in multiple languages (see footnote below), typing the ltr letter "a" from (2) gives bAxy ..... (3) ..*....... Typing the rtl letter "z" from (2) would shift the system into rtl behavior: bZxy ..... (4) *......... At some future time, the other cases will be examined and a full spec can be produced. For now, it is too low a priority to pursue. Note that with the conventional between-character (PARC) cursor, there is an ambiguity: for example, if you tap Delete, which character will be deleted when the cursor is between a ltr and a rtl pair of characters.