DOCUMENT SP0001 V0084A Most Recent Edit: 2004/11/11 EXTERNAL TECHNICAL SPECIFICATION: TEXT TABLE OF TARGETS (what used to be called a Table of Contents; use Leap or your Find command to access the desired topic by using the entry below, including the asterisk, as a target of the search). *INTRODUCTION *AUTHORS AND EDITORS *REVISION HISTORY *DOCUMENT MAINTENANCE *DISPLAY OF THIS DOCUMENT *PROJECT SCOPE *NATURAL LANGUAGE QUOTING CONVENTIONS *HARDWARE REQUIREMENTS *OPERATING SYSTEMS UNDER WHICH THIS SOFTWARE WILL WORK *RECOMMENDED READINGS *NOTATION OF KEYS, KEYSTROKES, AND QUASIMODES *STICKY KEYS AND AIDS FOR THE HANDICAPPED *RESPONSE TIME REQUIREMENTS *THE LINEAR LEARNING MODEL *SYSTEM SLEEP *INTERNAL STRUCTURE OF THE TEXT *CLEANLINESS *RESTORATION OF SYSTEM STATE *CHARACTERS *THE CURSOR *SELECTIONS *CONVENTIONS FOR THE CURSOR AND SELECTION HIGHLIGHTS *TYPING AND ERASING *TEXTS CONTAINING BOTH LEFT-TO-RIGHT AND RIGHT-TO-LEFT LANGUAGES *LEAP AND CREEP *DOCUMENT CHARACTERS *THE Leap QUASIMODE (for Leap keyboards) *THE Leap QUASIMODE (for standard keyboards) *THE COMMAND QUASIMODE *HAVING TWO Leap AND COMMAND METHODS IS TEMPORARY *INDICATION, PRESELECTION, SELECTION, AND THE ANCHORS *SUMMARY OF CURSOR AND UNEXTENDED HIGHLIGHT ACTION *LEAPING TO LONGER PATTERNS *LEAPING TO ENDS OF LINES *INSERTING CHARACTERS BY TYPING, MORE DETAIL *AUTOREPEAT AND ROLLOVER IN TYPING *APPEARANCE OF THE TEXT ON THE DISPLAY *APPEARANCE OF THE CURSOR *USER NOTIFICATION *HOW TO INVOKE LEAPING *NONCOMMERCIAL USE OF LEAP *LEAP AGAIN *FAILED LEAPS *DELETIONS AREA *OLD LEAPS DOCUMENT *SCROLLING *TEXT REPOSITIONING WHEN A LEAP TARGET IS ALL OR PARTIALLY OFF-SCREEN *SELECTION RULES, COMPOUND SELECTIONS, AND OLD SELECTIONS *SELECTION CREATION *DELETING TEXT *COMMAND MANAGEMENT *COMMAND INVOCATION *REPEATING THE MOST RECENT COMMAND *COMMAND NAME CONFLICTS *COMMAND NAMES *UNDO COMMAND *REDO COMMAND *EXPUNGE COMMAND *PAGE KEY *FALSE PAGE CHARACTERS *PAGE LENGTH COMMAND *TILDE COMMAND *GRAVE COMMAND *LOCK COMMAND AND INPUT FIELDS *UNLOCK COMMAND *PASSWORD LOCK COMMAND *PASSWORD UNLOCK COMMAND *ABOUT TABS AND MARGINS A list of tab and margin control commands appears in the text of this section. *DO COMMAND: USING THE SELECTION AS A COMMAND *ABOUT THE REPLACE COMMANDS *REPLACE COMMAND *REPLACE ALL COMMAND *TASKS COMMAND *STOP COMMAND *RESUME COMMAND *REPLY COMMAND *RUN COMMAND *BOLDCODE COMMAND *REMOVE BOLDCODE COMMAND *INDENT COMMAND *ADDING COMMANDS TO THE SYSTEM *SEND COMMAND A list of the email-related commands appear in the text of this section. *PAGINATION AND THE AUTOPAGINATE COMMAND *PAGINATE COMMAND *SUPPRESS VISIBLE PAGINATION COMMAND *RESTORE VISIBLE PAGINATION COMMAND *SPELLCHECKING *ADDWORD COMMAND *STICK TO PAGE COMMAND *UNSTICK FROM PAGE COMMAND *SPLIT SCREEN COMMAND *UNSPLIT SCREEN COMMAND *QUIT COMMAND *GRAPHIC INPUT DEVICE *LEAPBAR *INTRODUCTION This document describes in detail the operation of the text-based portions of the humane environment. Zooming takes place within the context of the graphical representation of the text-based portion of the humane environment and is described in a separate document, SP0021. *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 in its various incarnations, 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, Arthur Abraham, and Jef Raskin. *REVISION HISTORY The revisions are listed from the most recent to older ones. NOTES ON V82 Reflect the name change of our software to RCHI. Definition of scrolling made consistent. A number of subtle fixes by Filskov entered. NOTES ON V81 "Lshift" and "Rshift" names introduced and interface to standard keyboard extensively revised. Many, many improvements in English and clarity (David Alzofon is back on the job). The Command quasimode key for standard keyboards has been changed to the Caps Lock key. The treatment of long words (words longer than a line in length) has been revised. Select has been made a command. NOTES ON V80 Changed from underline to overbar to indicate preselection, so that this document will transmit through any email system (A. Abraham). Metadata section added (J. Raskin). Mention of LeapBar(tm) added. Sections have been rearranged so that, more so than in previous versions, terms are defined before they are used. "Leap" is now spelled with only the initial letter capitalized. Commands have been added (such as "Metadata"). The overall organization has been completely revamped. NOTES ON V 79 Clarified the definition of SWAP. Added the CLONE command. NOTES ON V 78 How multiple-argument commands operate has been overhauled. These notes on versions have been arranged with most recent ones first. Clarified Filskov's question about what Leap>\ Leap<\ Leap/ would do (and similar cases; in this case it is simply a forward Leap to v. Definition of Deletions area clarified so that Document characters can be contained in it. Cap Each Word command fixed (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, Email spec completed (Raskin). 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 Deletion Document standardized to "Deletions area" (as opposed to Deletion Document) and is always capitalized. (McKenna) Leaping to ends of lines when false Page characters are in use clarified (Karpinski). 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 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 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 area has been clarified (Karpinski and Raskin). 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 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 71 IBM keyboard model change. 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 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 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. NOTEs 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. *DOCUMENT MAINTENANCE Jef Raskin *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 readability even if emailed as text. *PROJECT SCOPE For an overall definition of The Humane Environment, see "So The Humane Environment isn't an editor, what is it?" on www.jefraskin.com. This software was first called THE; briefly renamed A'ali'i; and it is now the Raskin Center's Humane Interface, abbreviated RCHI, and pronounced "Archy") 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. This system -- 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). This software is intended to run on at least Windows, Linux, and Mac platforms. A separate specification, SP0021, will discuss the graphical and zooming user interface portion of this system. *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. (These demonstration sentences are 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. The system can be used with any standard English IBM or Mac keyboard and with the keyboards of many other phonetic languages. This interface is best with a "Leap keyboard" which is one where there are at least four thumb-operable buttons under the space bar. These may be built into the keyboard or added in the form of a LeapBar (tm). Without dedicated Leap keys, the keyboard is called a "standard keyboard" Operation with a standard keyboard is less efficient and takes longer to habituate to. But, even so, this system is entirely practical and more efficient than conventional editors. *OPERATING SYSTEMS UNDER WHICH THIS SOFTWARE WILL WORK The demo we are creating should eventually run under Windows 95 and later Windows versions, Linux, and Mac OS 8.5 and later. It is desirable to accommodate earlier platforms as these can provide inexpensive yet usable systems for those unable to obtain the latest equipment and system software. *RECOMMENDED READINGS To understand the motivation, nomenclature, and design principles underlying this specification, it is recommended that you have read Norman, Donald. “The Design of Everyday Things”. New York: Basic Books, 1988. Raskin, Jef. “The Humane Interface”. Boston: Addison-Wesley, 2000. 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. When it is important to distinguish which Shift key is being discussed, we use Lshift and Rshift as the names of the shift keys. 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. For a number of letters typed, e.g. to Leap to "Hawaii" we can write Leap\ Leap/ 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, because 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 used for character-by-character, backspace erasing during ordinary typing will be called the “Del” key here. On most keyboards, this key is found in the upper right corner and is labeled "Delete", "Backspace", or "Erase". "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. Similarly, Shift can stand for Lshift or Rshift. For example Shift\ r\ r/ can mean either Lshift\ r\ r/ or Rshift\ r\ r/ The variable names and notations in this specification are used only to clarify and simplify the specification; they are neither suitable for nor intended to be used as program variable names, which are typically designed to be self-documenting to a greater degree than are single letters. *STICKY KEYS AND AIDS FOR THE HANDICAPPED 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 this system. 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. There are no time dependencies in this system 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 this interface is suitable for many users who cannot use a standard editor, even given the usual accessibility features. *RESPONSE TIME REQUIREMENTS 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 too far 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. *THE 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 most do not have to be taken up as parts of interrelated sets, as with most software packages. A user can be 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 cause the system to wake up and also have the exact same action that the key does when the system is awake. To wake up 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. On the other hand, Space\/ would wake the system and would also -- just as it would if the system were already awake -- insert a space. *INTERNAL STRUCTURE OF THE TEXT A character in memory is represented by a 16-bit Unicode value. The master document, or "text" is a vector (an array) 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 "Space", "Return", "Page" and "Document" characters. They serve to break the text visually into logically contiguous blocks called words, 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 boundary 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. This and the following generally apply to pages, paragraphs, and words as well, with a few obvious exceptions dictated by the customs of language. 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 that immediately follows the Return, Document, or Page character. The first and last characters of the text, V(0) and V(z), are always present in the text and are permanently set to be 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 because 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 will 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 this system, other characters may have to be chosen for this function. Use of a proper keyboard or the LeapBar eliminates this "hack" by providing a dedicated Document key. The initial state of the text contains the Documentation area, the Deletions area (to be defined below), the Messages area, and perhaps other areas. These may be optional or empty or automatically created the first time they are needed. The Deletions area 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 where every character is followed by a space. Note that the space and the last character are followed by spaces). This means that a user can "spoof" the system documents. That's OK, if somebody wants to do it, that's up to them. By mentioning it in the manual, we will diminish the attractiveness of playing this trick. The system will use the first instance it comes across -- or perhaps when it finds a duplicate typed in, it can recognize it and do something subtle, such as remove the last space so that the spoof fails. The Deletions may contain document characters. To indicate the end, the collection of deletions is terminated with the string E N D O F D E L E T I O N S A Leap to D E L E T I O N S (there is a space after the S) and perhaps a Leap Again (in the case that the end of the Deletions area was found first) will find the accumulated deletions. 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 A user should never be responsible for cleaning up the system, whether it is leftover debris from internal operations, fragmentation of the file structure, garbage collection, or whatever. Computer resources belong to users, not to developers. *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 and worked when you left is exactly the way it looks and will work when you return. THI presents the many advantages that this rule confers on the user. *CHARACTERS A character is an arbitrarily complex graphic with both a width and a height, nominally occupying a rectangle. *THE CURSOR The cursor is associated with exactly one character in the text. The cursor is initially on the last Document character before the user introduction text. 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. There is always exactly one character with a cursor: in the case where the text consists of only two Document characters (this is the theoretical minimal text), one of the Document characters has the cursor on it. The 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. Any number of characters may be part of a set of characters called a "selection." That a character is part of a selection is indicated graphically by a distinctive highlight on that character. *CONVENTIONS FOR THE CURSOR AND SELECTION HIGHLIGHTS In this and some subsequent sections we will picture characters as letters in an ordinary alphabet. Characters not normally visible, such as Space and Return, are made visible when (a) the cursor is on them, (b) when they are selected, and (c) when the system is in the Leap or Command quasimodes. In this specification's examples, the blinking cursor is indicated by an asterisk under a character. The dots in these examples are there to preserve the spacing through various email and copying pitfalls. Some of the examples are numbered, with the numbers in parentheses, for ease of reference. The numbers are not part of the example strings. abCde...... (0) ..*........ Example (0) is a five-character string with the cursor on the letter c. Selections will be indicated in this specification's notation by one or more letters being capitalized, as with the c in (0). 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. Therefore there is always at least one character in the text that is selected. *TYPING AND ERASING 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 the need to choose a strategy for deletion: not having to choose aids in habituation. Nonetheless, we might consider testing Shift Delete as forward delete as an experiment. (See THI for an explanation of Hicks' law, which quantifies the delays caused by having to make decisions.) Note that when you delete or erase a character, it is not lost, but put into the Deletions area, 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 this two-part cursor design, the selection can be on one line and the insertion point on the next, with both clearly indicated. In standard text editors, typing when there is a selection causes deletion of the selection. This side effect (introduced to save one keystroke, the one needed to delete the selection) sometimes causes inadvertent loss of text. It is a common cause of complaint, and is an example of an unfortunate choice of minimizing keystroke count without considering the problems it might cause. In this interface, typing does not cause deletion; it always adds to the content. Only deliberate deletion causes removing text. The one extra keystroke that is required to explicitly delete is less costly than the worry caused by the usual convention, and is definitely less costly than losing text. This decision is one of those that contributes to the general feeling of reliability of and trust in this interface. *TEXTS CONTAINING 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. 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) *......... 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? The two-part cursor eliminates the problem. *LEAP AND CREEP Leap is a method of moving the cursor from its current position to a chosen character in the text. Its speed advantage over the mouse or any graphic input device for pointing in text is considerable, as GOMS modeling and testing show. In those cases where you don't have to look for but know where you want to Leap to, you save the visual searching time (which can involve using scroll bars); in such cases Leap can be 10 times faster (1.2 seconds instead of 12 seconds) than using a mouse. (Please see THI p. 135 ff. for a discussion of the cognitive aspects of Leap.) Creep is faster than Leap for very small moves and consists of moving the cursor one character at a time. If there is an extended highlight, then a Creep causes the highlight to collapse in the indicated direction. Creeping is accomplished on a Leap keyboard by tapping either Leap key. With a standard keyboard, the left and right arrow keys (cursor control keys) perform this function. The up and down cursor control keys act as a Leap backward and forward, respectively, to a pattern consisting of a single Return. Starting from the situation in example (5), abxYcde ..... (5) ....*........ a Leap left to the letter b (accomplished by Leap<\ b\ b/ Leap 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 deleting 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 on a standard keyboard, but having a dedicated key on a Leap keyboard) and start with three lines of 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 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 character 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 other characters, 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). *THE LEAP QUASIMODE (for Leap keyboards) There are two Leap keys on a Leap keyboard, located 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 LEAP QUASIMODE (for standard keyboards) 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 either Shift key followed by a tap of the Space bar. and it persists as long as that Shift key is held down. The Leap quasimode remains in effect until Shift/. In some systems, such as some of those used for typing Chinese characters on an English-language keyboard, Shift\ Space\ Space/ Shift/ is used for changing between modes, however this interface always has at least one additional character typed while in the quasimode, allowing a system to distinguish between the Chinese mode shift and our quasimode. *THE COMMAND QUASIMODE On a standard keyboard, the Command quasimode exists for as long as the Caps Lock key is held down. This key is chosen because its normal function is modal and therefore it should not be used in its standard fashion. But, more important, because it is placed where it can be held nearly as easily as the left Shift key. Many modern keyboards no longer have a key marked "Command" having instead a graphic. We will use the notation Command\ or Command/ to indicate what used to be the Caps Lock key going down or up. Leap keyboards have a key dedicated to this quasimode. On a Leap keyboard there are dedicated command keys just outside the Leap keys, positioned, like the Leap keys, on the row below the space bar. *HAVING TWO Leap AND COMMAND METHODS IS TEMPORARY The true Leap key interface is easier to learn and faster in performance than the standard keyboard version. The relative complexity of the standard keyboard version might prejudice newcomers against this interface. On the other hand, the standard keyboard version is just software, gives most of the benefits at lower expense, and allows this system to run on many platforms for which an appropriate keyboard or LeapBar (described elsewhere in this document) 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 Leaps are via one method or the other, and then disabling the one not used). The sensing can be done whenever the software is invoked. In later systems this software will underlie other software and will not be an application. We will cross that happy bridge when we come to it. Until Leap keyboards or LeapBars become available, this specification requires that both methods must be operational. The following descriptions apply whether Leaping is invoked by one method or the other. *INDICATION, PRESELECTION, SELECTION, AND THE ANCHORS Say that you have abCdefghijk ..... (14), ..*.............. and you Leap to the h. We use an overbar to indicate what will be selected if you were to use the select command at this point: ______ abcdefgHijk ..... (15). .......*......... As soon as you Leap away from it, 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 overbarred letters shown above -- cdefgh -- are the preselection, which marks what would be selected if you were to subsequently use the Select command. On a display, and at the appropriate times, the preselection is marked by a distinctive but not prominent highlight color. The preselection is then said to be “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). The indication highlight is visible only during the Leap quasimode; otherwise the display becomes visually cluttered and confusing. Besides, you need to see the preselection only when you have established a new pair of anchors. You can always establish the Leap quasimode to see it. Preselections are evanescent and have no meaning in the system itself, they are only an aid to your knowing where the anchors are and what lies between them. Indications disappear when there is no Leap or Command quasimode in effect. Indication also appears briefly when a Creep key is depressed. When the Select command is used, the indication becomes the selection, and the indication highlight is transformed into the selection highlight, which has a stronger visual appearance. Selections, unlike indication, persist after the user exits the quasimode. 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 because they move only the second anchor. Anchors may be moved by collapsing the selection to either one of the anchors and using Creep. In this case the anchor collapsed to will follow the cursor. The location of the more distant anchor is not affected If you use the Select command (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 ______ 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 the right anchor for 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 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 character at 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 (in a ltr language). Then you can continue to creep so as to move both highlight and cursor onto 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 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 Creeped 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 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. They 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.. ....*...............*....................*... ...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, using its method of invoking a Leap) 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, because 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 if you are used to the conventional Find dialog box (though it will be familiar to users of Emacs), 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 these examples. Writing this 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 either type (for insertion) or use the Backspace (possibly marked Delete) key if you wish to delete characters. Explaining click-and-drag in detail would take up pages (and it did when I was writing the specification for the Macintosh). When that method was invented, it sounded just as strange and complicated as Leap might sound now. As this specification is being written, 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 thereafter it's not too long to get to the point where Leaping feels "natural" and "intuitive". I make no apology, however, for presenting this material in detail and with precision. Inexact and unclear specifications lead to misunderstandings and misbehaving software. The only way that you have a chance of making software that runs with a minimum of bugs or conceptual coding errors is by having a detailed specification to test it against. END OF SIDEBAR When using Leap in practice you simply look at your target and then, while in the Leap quasimode, 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. You do not have to transfer your gaze (perhaps repeatedly) between the current cursor location and your target as is required in using a mouse, which is another reason that Leap tends to be very fast and feel comfortable to use. 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 By treating Returns, Page, Document and other (what used to be called "special") characters no differently than other characters, text handling is made far simpler than in conventional software where these become special cases that have to be learned (and programmed!) separately. Users who start with the interface presented here have no problem whatever learning it and are surprised at how illogical and complex conventional software is when they encounter it. However, a few users accustomed to conventional systems with their many special cases find our simplicity unfamiliar, and it is necessary to explain this simple technique, as we shall now do. Say that you had this text you say what you say i say what i see With the cursor on the first letter of the first word. 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 this software, 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-fashioned and crude-by-comparison legacy software (e.g. MS Word). The same is true of Tab, Page, and Document characters. 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 thereby select 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. See the Move command. *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 repeat the essential point here, it appears on a line at or up to one text line above the vertical center of the display. 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). *AUTOREPEAT AND ROLLOVER IN TYPING Autorepeat should function as described in THI (p. 185). 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). 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 initially causes word wrap (unless it begins at the left margin). For example, here is a word consisting of all qs that is longer than a line. The lines are short in this example. Say that you have typed Here comes a long word qq and the next character you type is another "q". This is the result Here comes a long word qqq because the third q forces word wrap. Now you continue to type qs, until the word just flows onto successive lines as necessary. Here comes a long word qqqqqqqqqqqq qqq followed by other words. 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) to be made 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 or while a quasimode that causes them to be displayed is in effect. Spaces are shown as a special symbol (such as a dot at mid-height) when selected or while a quasimode that requires their display is in effect. 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 this editor. (This is not always the case with typical systems, for example, typing Tab will move you to the next field in most systems, 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 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, and down in top to bottom languages, etc.). *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 This section covers User Alerts, Messages, Warnings, and Advisories. We will use transparent messages (see p. 117 in THI; note the border that makes the message easier to distinguish from other information on the display) that disappear as soon as you continue to work, when a quasimode during which they were generated is released, or when they are no longer necessary, whichever occurs first. Continuing to work can be something as simple as typing Shift\ .The key idea is that 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 does a conventional dialog box. 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. In any case, the user must not be constrained to respond before proceeding to do something else. A warning message will be accompanied by a bell sound followed with a delay (to be set by experiment, but initially 1.5 seconds) followed by a reading aloud of the message (when we have text-to-voice routines available). The reading is stopped by any user action. All messages are added to the front of the Messages area 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 Messages area can be deleted, moved, etc. as with any other text. *HOW TO INVOKE LEAPING The cursor can be positioned immediately 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 in other current systems), text searching (usually accomplished by opening a dialog box and typing in a search pattern), and examining a data base. In this system, 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. Leaping (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 Forward 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 is desired, the user types, on a Leap keyboard For Leap ahead Leap>\ Leap>/ For Leap back Leap<\ 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. 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. This is not pure, but it has tested well. Leaping (standard keyboard) Shift\ Space\ Space/ establishes our Leap quasimode and causes the display of otherwise invisible indication and non-printing characters. This was chosen because there is no meaning to Shift\ Space\ in conventional typing. Lshift\ Space\ Space/ establishes the Leap backward quasimode. Rshift is used for Leap forward. Lshift\ Space\ Space/ Lshift/ is a Leap backward in the text to the nearest instance of the pattern in the text in that direction. Substituting Rshift for Lshift will do the same for leap forward in the tex Say that you wish to Leap to an instance of a pattern with uppercase characters; say that the pattern is aBc then (assuming you are to the left of the instance of the pattern) you would Leap by typing as follows: Rshift\ Space\ Space/ a \ a/ Lshift\ b\ b/ Lshift/ c\ c/ Rshift/ Operation of Leap with a standard keyboard is, otherwise, the same as that with a Leap keyboard as already described. A simple use of a Shift key to obtain upper-case characters does not show any indicators and behaves identically to present keyboard usage, as it must. *NONCOMMERCIAL USE OF LEAP 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. We wish to encourage personal or developmental use and to license at reasonable rates. "Leap" is a trademark. In a parallel with the creative commons copyright, we wish to permit non-commercial use of our patents with only a nominal cost (e.g. $1 per year for noncompetitive, noncommercial use); we are working on the legal language to make this possible without impeding our ability to receive compensation from those who use Jef Raskin's intellectual property gainfully. *LEAP AGAIN On Leap keyboards Shift\ Leap\ Leap/ repeats the last Leap in the direction determined by which Leap key was used. On Standard keyboards Command\ Return\ // repeats the last Leap or Command, depending on which was more recent. *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. *DELETIONS AREA There is a single set of Deletions area is created 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 area begins with a Document character, the string D E L E T I O N S (which has a space after every letter including a trailing space after the final S) and a Return, and ends with E N D O F D E L E T I O N S followed by a Return and a Document character. The Deletions area 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 Deletions area 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 Deletions area) 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 Deletions area in its normal order. The most recent deletions appear first, with older deletions below. The Deletions area is password-locked text. The user can copy material from it into text, and UNDO and REDO may use it to restore lost text. A special command, EXPUNGE, is used to permanently remove material from the Deletions area. Doing so, however, may limit the depth of UNDO and REDO by removing text that would be required to execute these commands. *OLD LEAPS DOCUMENT Leap patterns are stored in the Old Leaps Document, just as deletions are stored in the Deletions area. *SCROLLING This is replaced by Leaping to a convenient character and repeating it. Thus the cursor never goes off-screen, and the first anchor is preserved. Autorepeat is useful here. *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 (or, if necessary due to there being no line at the center of the display, then one line higher). 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 which had 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 correctly 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. *SELECTION CREATION On Leap keyboards, this is done by a press of both Leap keys simultaneously. On standard keyboards it is Command\ s\ //. A system will use one or the other, but not both, depending on whether a Leap keyboard is available. This operation 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 here, which frees the letter for our most common command. An automatic save is done on each release of the space bar. In portable computers and PDAs, we might use a nonvolatile memory card to store every character as it is typed. It is important to remember that these commands take effect upon the release of the keys. Thus, for example, Leap<\ Leap>\ Leap is the same as Leap>\ and the display will show, at that point, that you are in the Leap forward quasimode. In typical 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 press the other Leap key, releasing them both. This quickly selects the material Leaped over. *DELETING TEXT A tap of the Del key moves the selected text to the beginning of the Deletions area, and then (unless the deletion is a single character) inserts a separator string consisting of one Return into the Deletions area. It is important to put newly deleted material at the beginning rather than the end of the Deletions area 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 area. A deletion of a selection contained within the Deletions area requires that the Deletions area be unlocked. In general, this is not a user action. But if it were done, the selection is removed from its location in the Deletions area and is inserted at the beginning of the Deletions area. In other words, it behaves just like any other deletion. See Expunge. 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 area 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 MANAGEMENT Aside from cursor motion, typing, making selections, and the other base operations that are used in creating the arguments for commands, everything in this system is done with commands. There will be dozens of commands initially, and the number will soon explode into the hundreds and thousands (there are over 1000 commands in Microsoft Office, and it doesn't handle as wide a range of tasks as this system ultimately will). Therefore, much of the usability of this system will depend on the organization and quality of the built-in and external user-level documentation. Good lists of commands and clever indices (made by humans with the appropriate skills) will be essential. With present GUIs, a user has to search through menus and make many guesses in order to learn how to use the system. A help system becomes yet another system to learn, and they are too often unproductive, even downright frustrating to use. In this system, Leap will be a major navigational tool for finding help (later, zooming will be another), and the documentation will be ordinary (if locked) text so that no additional learning is required. Creating and maintaining the built-in documentation is essential for the success of the product. We will have to have way of saying that a command and its documentation meet this system's standards. Commands or command sets from third parties that do not meet our standards cannot be prevented, it is just that they will not be certified. There will have to be a small charge for certification, and we may have to offer documentation services (at a reasonable price) to help developers whose language skills are not as good as their programming skills. A Tutorial document and a Reference document will appear at the beginning of the text area. They are locked text and are delimited by Document characters. Users may choose to copy them so that they can have a version incorporating their own annotations. Third-party command vendors may supply their own documentation or may apply to have it included in an update from the first-party vendor (us, at first). Commands, whenever possible, should come in pairs, one of which is the inverse of the other. Some, such as SWAP, are their own inverses. Others, such as one that sends email, may not have an inverse. *COMMAND INVOCATION A command starts a process applied to a possibly empty set of selections that results in some system action. Keep in mind that any selection in the set may not be a simple selection. When more than one selection is needed, old selections are involved. When a command is invoked, this system 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 on the text; a transparent message, that lasts as long as the command quasimode is in effect, repeats what was typed and explains that it is not a legal command, and that the tutorial or reference sections can be consulted. The effect of a legal command may be apparent visually or not, but in the event that there was no effect at all, a transparent message will be presented to the user 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 remaining, or a command that does not appear on the list of commands -- to name a few examples of commands that cannot be effected -- results in a transparent message, but does nothing else. As usual, the message persists until the user performs any action. The vanished message, as with all messages, appears in the Messages Document. When a message is deleted from the Messages area, it goes into the Deletions area. An example of a command that does not require choosing selections is the Time command, which inserts the current local time at the cursor location. A command that acts on a selection is invoked by making the selection and then invoking the command. To use a command that requires multiple selections you first select what you want the command to apply to, then you select any selections (commonly called "arguments") that affect the command, and then you execute the command. 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. This can be augmented with a transparent message (with the usual transparent message rules) that shows what should be selected next. In some commands there are multiple selections that can be used in any order, such as Swap. In such cases we do not usually refer to any of the selections as arguments. Often, the argument is typed in for one use only; therefore, where it make sense to do so, arguments are deleted (into the Deletions area, of course). If the text from which the argument is taken is locked, the command operates normally except that the argument is not deleted. In many cases, the result of a command is left selected so that you can delete it without having to reselect it. Whatever the behavior is in regards to deletions or selection state after execution is specified in the command definition. At present we are using the Caps Lock key as the Command key. *REPEATING THE MOST RECENT COMMAND Tapping Return immediately after entering the command quasimode causes the previous command (shown in transparent text as soon as you enter the quasimode) 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). If there was no previous command, then Return in the Command quasimode does nothing. *COMMAND NAME CONFLICTS For now, the most recently added command of a given name is the one that is used. We will have to consider a number of possibilities for the public release. Some of them are (1) certification by a name assignment group (as is done with URLs), (2) automatic renaming of a second instance of a name (e.g.,] Plumb might become Plumb1), (3) user renaming of newly added commands. *COMMAND NAMES 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 special characters. Command names given in this document are provisional, and are subject to revision based on testing. Here are the names of some of the commands described below (these are not in the main table of targets). *TIMEZONE COMMAND *DATE COMMAND *USDATE COMMAND *TIME COMMAND *GMTTIME COMMAND *SWAP COMMAND *JOIN COMMAND AND THE BEHAVIOR OF DISCONTIGUOUS SELECTIONS *SWAPSEL COMMAND *DROP COMMAND *MOVE COMMAND *COPY COMMAND *CLONE COMMAND *METADATA COMMAND *COPYOUT COMMAND *COPYIN COMMAND *TP COMMAND *T COMMAND *CALC COMMAND *UNCALC COMMAND *LEAP COMMAND *REGLEAP COMMAND *HYPERLEAP COMMAND *SORTUP COMMAND *SORTDOWN COMMAND *ENCRYPT COMMAND *DECRYPT COMMAND *TEXT TO HTML COMMAND *HTML TO TEXT COMMAND *TEXT ATTRIBUTES AND RELATED COMMANDS *PAPER WIDTH COMMAND *PRINT COMMAND *STOP PRINTING COMMAND *CONTINUE PRINTING COMMAND *UNDO COMMAND The Undo command undoes the last operation. Further invocations of Undo continue to undo prior operations. Not everything is undoable; for example, Undo and Print are not undoable. 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 is given and the operation not performed. What exactly is the "last operation" that the UNDO command undoes, that is, what is the granularity of Undo? Informally, Undo tries to undo the last gesture. However, the scope of a gesture is constant neither between users nor over a user's experience with a system. Undo undoes the effect of the last non-quasimodal keystroke or a set of keystrokes done under a single quasimode (other than Shift, so that a sequence of capital letters are not undone as a unit) 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. Undo works across the machine being turned off or other interruption. *REDO COMMAND The Redo command redoes the last Undo, if possible. Or, to put it another way, Redo undoes the last Undo. 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 area. 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 area, as merely deleting text from the Deletions area moves it to the top of the Deletions area. *TIMEZONE COMMAND You select the desired time zone, which is either an integer representing time difference from Zulu time, or is a time zone designator for example EDT, CST, PST, etc. Using this command will set the local time zone. This is a good candidate for a third-party, map-based replacement. If not set, the time zone is GMT. *DATE COMMAND Inserts the current date, at your local time zone, 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 local time in the format HH:MM:SS based on a 24-hour clock. As noted under USDATE command, different formats will use different commands. Local time is determined in the Timezone command. *GMTTIME COMMAND Inserts the current GMT time in the format HH:MM:SS based on a 24-hour clock. *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. Swap works as if it operates by deleting selection 0 as deletion is normally defined and leaving an unseen "zero marker" at the location the cursor would be after such a deletion. It then can be thought of as executing a standard deletion of selection 1, leaving a "one marker" at the location the cursor would be after such a deletion. It then inserts selection 1 as if it had been put at the zero marker from its location in the Deletions area by a standard MOVE command, and similarly for selection 0 at the one marker. Swap leaves nothing in the Deletions area; this paragraph does not specify how Swap is implemented, only how it apparently works in terms of well-defined operations. *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, the system behavior is as if each discontiguous selection were first 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 a number of discontiguous blocks of text simultaneously to the system clipboard, via the Copyout command. The blocks of text are concatenated. *SWAPSEL COMMAND This command swaps the ordering of the 0th and 1st 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. The Move command then inserts the selection at the current cursor position as if it had been typed there (except that formatting and other text attributes are preserved: this is an exact duplicate). The original selection is then removed. The command does not place a copy in the Deletions area. 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 this system 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. When a selection is moved, each character retains the attributes it had prior to the move. The characters adjacent to its new position are not affected. *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. If you make a selection, do not Leap, and apply the Copy command, then the copy is placed concatenated to the original (to its right in left-to-right languages). The copy becomes the selection 0, while the original becomes selection 1. When a selection is copied, each character retains the attributes it had prior to the move. The characters adjacent to its new position are not affected. *CLONE COMMAND The CLONE command is similar to the COPY command, except that all clones of the same object are affected when any one of them is changed, whereas copies are new objects that are not linked in any way to their originals. If a text is abcde and it is selected (the cursor may now be moved by a Leap, as with COPY; in this example, it is not moved) and the CLONE command is issued, you get abcdeabcde If you now Leap back to the second "c" and change it to "x", you get abxdeabxde Content may be added to a clone, and content may be deleted from a clone, but all objects in any instance of a clone must remain contiguous. Any attempt to separate a clone into discontiguous parts will result in a no-op and a message. Furthermore, you cannot make a clone of part of a clone or of material which is part clone and part non-clone. Clones must be and must remain contiguous blocks of text. When the Leap quasimode is in effect, clone boundaries will be marked with a special bracket that is not a character. A clone and its fellow clones are called a "clone set". If a clone is moved so that it becomes part of another clone, then the first clone is no longer part of its clone set. An object cannot be part of two different clone sets. Similar restrictions (in the geometric domain) will apply to clones in the ZUI. Clones are islands. You cannot clone a discontiguous selection. But even with a contiguous selection and an adjacent piece of text you can get somewhat odd behavior. Here is an example: Let ice cream be a clone (an ice cream clone? :-) and say that the words (not a clone or part of a clone) cone. Now, including the space and punctuation, are adjacent to it so that the text reads ice cream cone. Now, I will use a vertical line to show the extent of the clone ice cream| cone. Now, (0) You select " cream" and then select " cone" and use the SWAP command. We watch the Swap in slow motion. First " cream" is deleted. This leaves ice| cone. Now, The next thing that Swap does is to delete " cone", leaving ice|. Now, That's two legal deletions. Then it inserts the second deletion (" cone") where the first deletion (" cream") came from. Where is that? Between the letter "e" of "ice" and the border of the clone. For the purpose of establishing an insertion point, we imagine that the border (symbolized by “|”) acts as a character. ice cone|. Now, and finally, Swap puts the first deletion (" cream") where the second (" cone") came from ice cone| cream. Now, (1) where "ice cream" in the clone has become "ice cone". However, another instance of (0) ice cream| cone. Now, where "ice cream" is a clone of the "ice cream" you were editing would become ice cone| cone. Now, (2) Note that lines (1) and (2) are, perhaps unexpectedly, not the same, though the cloning was correct. The clones are the same, but their environments were made different. This may be unexpected, but it is correct. Applying an attribute to part or all of one clone applies that attribute (including locked text) to all in the clone set. If technically feasible, we should implement cloning with different copies at different points on a network, so that group editing is facilitated. We will probably need a rule that says when a cursor is moved into one member of a clone set, the other members are locked and any attempt to change or use them gets a "This text is in use by " message. If two or more people start using it at an interval shorter than the transmission delay, then the one with the earlier time stamp gets to make the modification, and any modifications made by the later person might be put in the Deletions area, from which it can be later manually applied to the clone, if it still makes sense to do so. *METADATA COMMAND When applied to a selection, inserts the metadata and leaves it highlighted. The metadata text contains at least the following: the earliest date and time that any portion of the selection was created; the most recent date and time any portion of the selection was modified; the size of the selection (character count, word count, memory usage in bytes, and picture count), presence of locked text. *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. Copyout is not undoable because we cannot guarantee the behavior of the external system and do not want to risk interfering with its use of whatever facility it uses. When this system 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 this system 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 proved 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. *CALC COMMAND Given a selection S that represents an evaluable expression, application of the Calculate command creates a new selection, S', that represents the result of the calculation. The selection S is moved to the Deletions area and the selection S' is inserted in its place. For now, the expression will be in Python expression 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. It is assumed that mathematical functions equivalent to (or identical to) those provided by importing the Python math library are available. Later we may introduce other tools (such as string expressions). The result of executing a Calc command appears in a rectangular box. When put into rows and columns, these boxes act (and look) much like a spreadsheet. The width of the box is controlled by its content, and includes the width of any tab setting that is applied to it. *UNCALC 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 area. Then, for each result in the selection S', the Uncalc command substitutes the expression that gave rise to that result. Example: if the original text was The sum is 3+4 and the product is 3*4. And the "3+4" was selected and the Calc command applied to it and then the "3*4" was selected and the Calc command applied to it, the text would become The sum is 7 and the product is 12. If this entire text were selected and Uncalc command applied, the original text would be restored. The box around results indicates that there is an expression behind them. Results in a calculated box are calculate-locked (behave like password-locked text) and you uncalculate the box (or all the boxes in the selection) to work on them. *RECALCULATE COMMAND This command works on a selection that contains many expressions that had been uncalculated and thus were boxed. It also recalculates any other boxed calculations. It recalculates them all and you see the results in all the boxes in the selection. UnCalc should work on a selection that might contain many calculation results and it would uncalculate them all. In either state, Leap works to what shows in the text. Results in a calculated box are calculate-locked (behave like password-locked text) and you uncalculate the box (or all the boxes in the selection) to work on them. *LEAP COMMAND This command uses the selection as a Leap search pattern. This search is precisely case-sensitive. The pattern can, obviously, include such things as Document and Page characters. *REGLEAP 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. We can use the Google syntax, or perhaps the Unix syntax; this is not a beginner's command. *HYPERLEAP COMMAND Treat the selection as a URL. Instant browsing. *SORTUP COMMAND Material, in columns (separated by tabs) is first selected. Then the cursor is placed in a column in the selection (which has now become selection 1), and this command is used, all rows in selection 1 are sorted in lexicographical order using the indicated column as the key. A column can be its own key, which is just an ordinary sort of that column. When material is not in columns, then the selection is sorted in place by words and numbers: vibrate baby 42 monsoon -4.2 4.2 if selected and Sortup was used would become -4.2 4.2 42 baby monsoon vibrate Lexicographical order is 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. Quaternions... (just kidding) *SORTDOWN COMMAND When material is in columns (separated by tabs) and the cursor is in a column in selection 1, and this command is used, all rows in selection 1 are sorted in reverse lexicographical order using the indicated column as the key. *ENCRYPT COMMAND The selection is encrypted. Auxiliary commands to set a key may be needed. The selection is encrypted, with the (presumably unreadable) encrypted version then appearing in its place. The plain text is not placed in the Deletions area (or anywhere else). It can be recovered only by the Decrypt command. To send an encrypted document, you merely select the encrypted text and use the Send command. *DECRYPT COMMAND The selection is decrypted. The user might have to enter a key or other information via another command (as yet unspecified). For complex keys, the user might use a USB "thumb drive" or some such device in which to store the key electronically for security. *TEXT TO HTML COMMAND This changes the selection, in place, from text to HTML. *HTML TO TEXT COMMAND This changes the selection, in place, from HTML to text. Attention to URLs, images, JavaScript and other material in the HTML will have to be attended to properly. *TEXT ATTRIBUTES AND RELATED COMMANDS This is a set of commands that all work in essentially the same manner: you select some text, and then issue the command. The name of the command reflects the attribute. They do not toggle as in most editors (see "The Trouble With Toggles" on our web site) so there are inverse commands that remove only the named attribute and do not affect other attributes; for example, we will have an Italic command and a Remove Italic command. The command names will include: italic, remove italic, bold, remove bold, underline, remove underline, double underline, remove double underline, strikeout, remove strikeout, and so forth. A list is given below. All text attributes can be removed at once, leading to the default font and size, with the Normal command. For now, the color is set to black, the font size to 12 points or 4.2 mm, and the font to Courier (the default font and settings, whatever they turn out to be). A copy of the selection is put into the Deletions area so that its formatting may be recovered if desired. There are also text altering commands that cannot be undone with another text command because they lose information. Therefore, when any of this set of commands are used, a copy of the text is put into the Deletions area before the modification is made. These commands include: All Caps, which capitalizes every letter in the selection, whether it was capitalized or not. No Caps, which puts every letter in the selection into lower case. Cap Each Word, which capitalizes every letter in the selection that follows a space, quotes, or other punctuation that precedes the beginning of a word. Some text attributes require an argument. For example, the 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. Another is Font Size. 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 pt is assumed. To put some text into a particular font color, select the text, then select the desired font color and execute Font Color. If the selection is not a font color, then the selection is treated as text and the most recently set color is used. If the font color is not in locked text, it will be deleted. Font colors will include black, white, red, yellow, green, blue, magenta, brown, orange, and cyan. RGB Font Color will require selection of the text and three arguments, which will be numbers from 000 to 255. A graphic color picking mechanism may be provided as we implement the graphics portion of this system. 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. Summary list of attribute commands Italic Remove Italic Bold Remove Bold Underline Remove Underline Superscript Remove Superscript Subscript Remove Subscript Double Underline Remove Double Underline Strikeout Remove Strikeout Normal All Caps No Caps Cap Each Word Font Font Color RGB Font Color *PAPER WIDTH COMMAND 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 this system. They will be happy with the "simplification" until the boss comes along and asks why you printed the 1400-page text 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. *PAGE KEY This dedicated key (on the Leap keyboard) inserts a Page character into the text. Page characters appear as a full width graphic across this system'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 tilde (Shift of the accent grave character) is 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 command. *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, this system 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 (it's pronounced "grahv", not "grave"). Typing an accent grave places a Document character into the text. See the Tilde command. *LOCK COMMAND AND INPUT FIELDSjjjj All text in the selection is locked by the Lock command. That text is locked is shown by a special highlight which appears when in the Leap, Creep, or Command quasimondes. Locked text may be Leaped into, selected, and copied but attempts to change the locked text (e.g. changing the font, deleting a portion) 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 key press. Attempting to type or insert into locked text (i.e. when the blinking cursor is in it) results in the typing or insertion appearing at the end of the locked text. The locked text attribute is designed, for example, to facilitate the setting up of forms and to keep instructional material pristine. A region of locked text may consist of a number of concatenated regions that were separately locked. A form usually comprises locked text and input fields. The locked text decorates and introduces the form and tells us what the various input fields are for ("My name is:"), the input field is where typing appears. The form is held in shape by locked text consisting of invisible characters such as spaces and returns. In the case where there is locked text immediately following locked text, typing follows the last of the consecutive concatenated locked texts and a message informs you that that has happened. The importance of locked text cannot be overstated. Without it we cannot create forms or have documentation that cannot be accidentally erased. If a selection contains both locked and unlocked text (but not input fields), and Del is tapped, the unlocked text is deleted and placed in the Deletions area. The locked text remains, concatenated into a locked block. However, if the selection contains input fields, they are just emptied (into the Deletions area). In particular, this is how a form is cleared. Software can interact with input fields as they are typed when such behavior is required. The user gets to the next input field by Leaping to the label of the field (or any other text that is locked and precedes the input field. In a well-designed form, all the text is locked. To create an input field, you select a portion of text and use the "InputField" command. The text is put in the Deletions area and the exact length of the text is replaced by an underline. Input fields are locked automatically, but turn into ordinary underlines that can be edited or deleted when unlocked. *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 Deletions area) after the command is executed. To keep a user from unlocking via repeated use of the Undo command, this command cannot be undone and is skipped over (earlier commands can be undone). *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 AND MARGINS This section contains the following subsections: *SHOW TABS COMMAND *SET TABS COMMAND *SHOW DEFAULT TABS COMMAND *SET DECIMAL TABS COMMAND *SHOW MARGINS COMMAND *SET MARGINS COMMAND The original typewriter tab stop system was based on the fixed-pitch technology of the time. Current systems tend to use an absolute distance from a margin (the left margin in left-to-right languages) instead. 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 use of the 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. 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. *ABOUT THE REPLACE COMMAND The following 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) in a selection. Select the text in which the replacement is to be made. Then select an instance of the target such as a word, phrase, or other selections instances of which that you want to replace, lastly select what you want to use as the replacement. Lastly, invoke the Replace command. A transparent message appears: 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. A transparent message appears to tell the user when there are no further instances of the target in the selection. *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. *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 this system. 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. Note that, for accessibility, pausing and restarting the T and TP commands is via the Space and Return keys. Selecting “T” or “TP” 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. *RESUME COMMAND This command resumes operation the process whose name is selected. If the selected task was not stopped, then a transparent message saying so is presented and nothing is started. *REPLY COMMAND When a process requests user input, a transparent message is presented. The user can choose or create a response, select it, and use the REPLY command to send the selection to the process. It is important to note that the user is never required to respond, and can respond to the request at any later time. After a message appears, it disappears when the user makes any action (which is standard message behavior), and the message is kept available by being placed in the Messages Document (which is also standard behavior). The programmer can, of course, create other input behavior, but the user should never be forced to reply before proceeding with other tasks (that would be modal and annoying) 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 REPLY 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 which specifies the name of the task requesting it; if the user dismisses the message (replied to or not) it is put into the Messages area. Executing the REPLY command leaves the selection selected. To reactivate a message, that you look up on the Messages Document or remember, you can use the Resume command to reactivate the task, then select (or type and select) the desired reply and use the Reply command. *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. 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 environment allow. 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. When a selection that includes both text and Python code is executed (as in both the Run and Compile commands) the system has to have a way to distinguish code that is embedded in the 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 that begin 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 the punctuation required by standard Python (such as three quotes in a row), and yet will word wrap. 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 troublemaking 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. *BOLDCODE COMMAND This command makes it easier to see the code portions of a selection. It does this by using a set of rules that add boldface to keywords and color to various structures or other methods that make code easier to read. *REMOVE BOLDCODE COMMAND undoes the typographic distinctions the BOLDCODE command creates. *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. *ADDING COMMANDS TO THE SYSTEM The code for the new command is typed into the Commands area with a specific header syntax: a Document character followed by command script where in capital letters is the name of the command. If there are multiple commands with the same name, the one that is farthest along in the text is the one that will be used. The only reason for having commands defined in a special area (they could have been anywhere and worked as well) is that a command in an incoming email would automatically be put into effect, and you could not have an example of code for a command that was not operational. There is no need to compile or run the code, just placing it in the Commands area suffices. The Commands area is delimited by C O M M A N D S and E N D O F C O M M A N D S spaced out as usual when we delimit areas. *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 the first non-empty, non-boundary-character line of the content of the email. The other commands involving email are: *ATTACHMENT COMMAND *SEND WITH CC COMMAND *SEND WITH BCC COMMAND *RECEIVING EMAIL *SET EMAIL PASSWORD *SET EMAIL PASSWORD HINT *CHANGE EMAIL PASSWORD *SET EMAIL INCOMING SERVER *SET EMAIL OUTGOING SERVER *SHOW EMAIL SETTINGS *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 some other 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 this system, 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. *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 email or an attachment, a message is made available in the usual manner. Emails are generally downloaded as they come in. If there is more than one, or if one arrives before another has been downloaded, then they are downloaded smallest first. If necessary we will consider user limits on incoming size and spam filtering. As each email comes in, extra line feeds or whatever are removed so that the text is wrappable. Many additional email features, such as marking email “read” or “unread”, putting emails into categories by sender, and such will have to be considered. At present, we will start with the basic sending and receiving of emails. *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. *SET EMAIL PASSWORD HINT Select the password hint and use this command. The hint will appear when you use the SHOW EMAIL SETTINGS command. *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. This has to be done once, and never again unless you change servers. The server is checked for email every 5 minutes. *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. *SHOW EMAIL SETTINGS This command inserts and selects all the current email settings, appropriately labeled. For example EMAIL SETTINGS INCOMING SERVER: imap.doll.com OUTGOING SERVER: smtp.bignetwork.net EMAIL PASSWORD HINT: a word that means obsequious in a physical sense. *PAGINATION AND THE AUTOPAGINATE COMMAND Number all pages in the selection consecutively, resetting to 1 whenever a Document character is encountered. 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. *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. 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. *SPELL CHECKING After you type a word, the system checks to see if it is in the spelling dictionary. If not, the word is marked immediately with a line of red dots (black if the word is red) through it. If the blinking cursor is placed on such a word, a transparent message appears with a set of alternatives. For example, if the unrecognized string was "toyd", the transparent message would contain a set of alternatives such as 1. toyd 2. toy 3. toad 4. toed 5. told 6. toys 7. toyed 8. toe 9. toyon 10. Toyota 11. toddy 12. third (Brooklyn accent) 13. add word No. 1 to the dictionary and the instructions "Press and hold Command and type the number of the desired alternative." The first alternative is always the unrecognized string itself. This is a general method for choosing among presented alternatives in our system. After an alternative has been chosen (even if it is the one originally flagged as not in the dictionary), the special marking is removed. The "dictionary" is used primarily for the Spell Checking command, though other uses can be found for it. The dictionary is in fact a vocabulary list (We could make it a dictionary by adding definitions). The spelling dictionary can be Leaped into 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. Subdictionaries might have different passwords, so that they can be all unlocked at the same time, thus allowing their selective removal. *ADDWORD COMMAND This command adds every word in the selection to the dictionary, each in its proper alphabetical order. The selection can be of any length and each word is assumed not to include spaces or between-word punctuation. An entry can be added by hand, but it may not be in alphabetical order unless you are careful. *STICK TO PAGE COMMAND This command allows the user to take a selection and make sure that it does not move horizontally or vertically with respect to the nearest previous explicit Page or Document character. A special highlight indicates stuck text. Text will flow from above to below the stuck section, and back. *UNSTICK FROM PAGE COMMAND Unsticks any material in the selection that was stuck to the screen. When unstuck, it becomes inserted at its apparent position in the text. *SPLIT SCREEN COMMAND This command allows the user to split the screen, so that the right half (left half in right-to-left languages, and assuming a landscape-oriented display) is a copy of the present display. It stays unmoved, except as forced to change by editing on the left half (e.g. if the cursor is moved into it, it will show up), and all user-directed action takes place on the left half. This command is essential when you want to compare two portions of the text. *UNSPLIT SCREEN COMMAND Banishes the right half and restores full-screen operation. When zooming, only the half where the graphic cursor is located zooms. *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. *GRAPHIC INPUT DEVICE GID 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. Pie menus will be used. A separate document will treat graphics. *LEAPBAR A LeapBar (tm)(patent in process) has a computer interface (e.g. USB) and adds a row of keys below the space bar, including Leap and this system's Command keys. The minimum functions needed are: Leap>, Leap<, Leap Again> (reuse the most recent Leap pattern, Leaping from the present cursor location), Leap Again<, Leap Back (to the last place Leaped to, and so on back through Leap history until some change in the text makes it impossible to do so), Command, Undo, Redo, Page, and Document. The present six-key layout includes these functions. Tapping both Leap keys together selects, tapping one creeps. Document Leap Back Leap Again Leap Again (unassigned) Redo Page (unassigned) Undo *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 Leap and LeapBar are trademarks owned by Jef Raskin. Beep sounds will last 0.25 seconds, and we will have fun inventing them.