TextDocs.NewDocUOberon12.Scn.Fnt^Oberon12i.Scn.Fnt X E$ tOberon12b.Scn.Fnt XbUi [ R G P3$~"A"  'F( #  c[  E T  7 )Oberon10.Scn.Fntj^&7 Oberon14b.Scn.FntOberon14i.Scn.FntV;Ou BB+ l) @ o E\Book{Mouse}{Using the mouse and the keyboard} \Chapter{Tutorial objective} Theory on the mouse operation with practical drill using a three-key, a two-button mouse or even a single button mouse as is used by Macintosh systems. The terms "key" and "button" are used interchangeably in the literature or in advertisements. We have chosen to use the term "key" for the mouse device, because "button" designates an element (called a gadget) of the graphical user interface in the Gadgets System. Estimated time: 40 minutes. \Chapter{Using the mouse and the keyboard} \Label{Mouse*}Oberon is controlled by a 3-key mouse. Physical movement of the mouse on a flat surface translates into movement of a \Index{mouse cursor} on the plane of the display. This cursor has the shape of an arrow  , the tip of which is named \Index{mouse focus}. The focus designates the object on which the mouse actions described below will operate. There are three \Index{mouse actions} of importance: clicking, dragging and interclicking. \Label{Click}\Index[-]{clicking}Clicking: pressing a key and releasing it, whithout moving the mouse. Exercise this: only a tiny portion of the tutorial is visible right now. To continue reading what follows, move the mouse focus into the scroll bar (at the left) at the height of this line and click the left mouse key. If you have a Macintosh single button mouse, click that button. The text will scroll forward, but you will learn more about scrolling very soon. \Label{Drag}\Index[-]{dragging}Dragging: pressing a key and holding it down while moving the mouse. \Label{Interclick*}\Index[-]{interclicking}Interclicking: simply pressing a key or dragging on a key, and pressing one of the other two keys, until finally all keys are released (in any order). The first key pressed determines the action, and the second key pressed modifies it. \Chapter[+]{Mouse varieties} \
 \
Oberon is fine-tuned toward a 3-key mouse and a large number of functions can be activated by single mouse key clicks and interclick combinations. Not only have most Macintoshes a single button mouse, but many Intel-based PCs have a two-button mouse, so that the missing mouse keys have to be emulated by keyboard keys. If you are using such a PC, with Windows use the left Ctrl key as a substitute for the missing middle mouse key, but with Native Oberon use the left Alt key. If you are using a Macintosh, use the left control key as middle mouse key and the alt key as right mouse key. \Chapter[=]{Scrolling}\Index[-]{scrolling} In most cases, the extent of a document such as this tutorial (in its two-dimensional space) is bigger than the viewer frame (Note: Oberon uses "viewer" where other systems use "window"). Thus, you will want to move the document relative to the viewer to gain access to invisible portions. This process is called scrolling and is performed with the mouse when the mouse focus is positioned in the \Index{scroll bar} located at the left of the viewer. The scroll bar features a \Index{position mark}  which is adjusted at each scroll operation. \Index[-]{relative positioning}The relative position of this mark in the scroll bar is the same as the relative position of the first visible line in the entire text. To exercise scrolling, position the cursor in the scroll bar and verify by yourself that (watch the position mark adjusting itself): \ The following interclick actions are also defined: \ Finally, clicking the middle mouse key scrolls the document so that the top line in the viewer has the same relative position in the document as the mouse focus in the scroll bar. Consequently, the position mark moves to the mouse focus. Also known as \Index{absolute positioning}. \Chapter[=]{Selection*}{Select - Right Mouse key - RM}\Index[-]{selection} Text and objects are selected through clicking or dragging on the \Index{right mouse key}. On the display, selected objects are visually characterized, typically in reverse video. Moving the mouse focus and clicking the right key again clears the existing selection and starts a new one. The selection may be removed altogether by hitting the \Index{Esc key} on the keyboard, or the \Index{F2 key} whith Native Oberon. Select each of the following letters or calendar object in succession: A B  C. A larger piece of text is selected by first moving the mouse cursor to the start of the desired selection and then dragging on the right mouse key. On the display, the selected area is shown in reverse video and adjusted continuously as the mouse is moved. This adjustment is termed \Index{tracking the selection}. The selection process is completed when the mouse key is released. Notice that carriage return characters contained in a selection are revealed by the reverse video. Select the following text from here ->Selected text stretch which goes on and on and on and on and on and on<- to here. Now learn to improve the selection process: select several lines of text by first moving the mouse vertically and then horizontally left or right as need be. Clear the selection. Selecting a line: The text stretch from the mouse cursor to the left edge of the viewer is selected if the right mouse key is clicked two times without moving the mouse. It is not necessary for the two clicks to be in quick succession. Select this line entirely including the full stop. Note: Double clicking or clicking a key twice in rapid succession as is known from other systems is not used in Oberon. \Chapter[=]{Insertion*}{Point - Left Mouse key - LM}\Index[-]{point} Below you see a small viewer which might receive typed characters at explicitely designated points. This leads to the concept of the \Index{insertion point} which is made visible with the \Index{caret} symbol . The tip at the top is the \Index{caret focus} which determines the insertion point: when a character is typed on the keyboard, it is inserted at the right of the caret, and the caret moves one place to the right. The character at the left of the caret is removed by hitting the Backspace key (<-). The caret then moves one place to the left. Also a copied text selection (you will soon learn how this is done) appears to the right of the caret. The viewer with the caret is called the \Index{focus viewer}. The focus viewer is unique. Move the mouse cursor inside the viewer below and set the caret in place by clicking the \Index{left mouse key}. Moving the mouse focus and clicking the left key again moves the caret to a new point.  While dragging on the left key, the caret is tracked, that means it jumps from character to character or from object to object, trying to follow the cursor. This adjustment is termed \Index{tracking the caret}. Try even to drag the cursor below and around the viewer. You clearly see that the focus viewer does not change. The focus viewer will only change after you click the left mouse key outside of that small viewer. Interestingly enough, if you click here in this viewer, the caret's shape changes. In \Link{GadgetsIntro.Desktop}{desktops} and \Link{GadgetsIntro.Panel}{panels} the insertion point of a gadget is made visible by another \Index{caret} symbol . Place an insertion point of that shape approximately here -> <-. You will have noticed that the caret focus at the center of the cross can be adjusted pixel-wise. A third \Index{caret} symbol  is used in \Link{GadgetsIntro.Textfield}{text fields} like this one . Set the caret with a left mouse key click. This sets the focus point inside the text field. Text may be inserted and edited according to the rules described in \Link{Edit}{Editing with the mouse}, though it is limited to a single line (ending with a carrier return). Have you noticed that the focus viewer is unique? \Chapter[=]{ExecCmd*}{Execute - Middle Mouse key - MM}\Index[-]{execute} Definition: an Oberon command is denoted by a character string having the following structure: Module.Procedure (or briefly M.P) where Procedure is the name of a procedure exported by a module named Module written in Oberon. In Oberon a text is taken literally: a sequence of characters. If this sequence is to be interpreted as a command, it is not necessary for the characters to be in a special place, that is in a command line. In a text viewer like this one, a command and its parameters may appear anywhere and may be executed by pointing at the command name with the mouse cursor and clicking the \Index{middle mouse key}. While the middle mouse remains pressed, the word pointed at with the mouse cursor is underlined. On release of the key, Oberon tries to execute the command. Try it with this example, and watch the additional line appearing in the Oberon.Log: System.Time The last line in the log now displays: System.Time dd.mm.yy hh:mm:ss You will like to use a simple and lean expression such as 'click on ....' (a command or a word) instead of this emphatic but equivalent 'when the mouse focus is positioned on this command, click the middle mouse key and the command will be executed'. When dragging on the middle key, words are tracked; that is, each new word pointed at is underlined. This adjustment is termed \Index{tracking words}. The same holds true when graphical objects flow within the text stream. Try it with this color picker which will enlarge and shrink again. \Chapter[=]{Cancelling a mouse action}\Index[-]{cancel} When a wrong key is pressed, pressing all keys cancels any action that would otherwise be initiated. The same holds true for an interclick. \Chapter[=]{Edit}{Editing with the mouse and the keyboard}\Index[-]{editing} We have learned the primary functions of the left (point) and the right (select) mouse keys in a text editor. Further editing actions may be controlled by interclicks. The following standard actions are provided: While tracking the selection (dragging on the right key): \ While tracking the caret (dragging on the left key): \ Verify all these assertions by yourself using the text editor appearing below as playground. Set the caret in place and copy a few characters including these -> A B C D with different font and color attributes. Insert also text via the keyboard. Now go! You should observe the caret's movement (one place to the right) for each character typed on the keyboard and more important still, after having copied a text portion to the caret. Chaining further text portions intermixed with keyboard input is made easy. Likewise the caret is ideally positioned after you have deleted a text portion. Editing, i.e. inserting, deleting or copying text at the caret, has a side-effect: the selection is removed. When typing text, the text scrolls up to show what is being typed. If the end of a text is visible and text is inserted at the end, the text scrolls to show the new end of the text. \Label{Observe*}Now copy (or type) a few words in the next two tiny text viewers and observe the following: \
    \
  1. Text may be selected in both: the selection is not unique. \
  2. Of all the selections only one is the \Index{most recent selection}. \
  3. If a viewer contains a selection, typing an additional character or copying a selection to that viewer clears the selection. \
Thus remember this: to copy the same text stretch at different places in a viewer, place the text to copy in a separate viewer, select it and insert it repeatedly at the caret with a left + middle interclick. Note: The two variants of the "copy selection" correspond to the well-known \Index{copy-and-paste} used in other text editors. Oberon does not have a cut-and-paste operation. Once the caret is set, the four arrow keys (left, right, up, down) are used to move the caret to the previous or to the next character or line. The Page Up and Page Down keys are used to scroll one page up or down respectively. By default, pressing the ENTER key does auto-indentation. Pressing ENTER, starts a new paragraph. The same number TAB or space characters found at the beginning of the previous paragraph is inserted at the beginning of the new paragraph. \Chapter[=]{Marker*}{Marker * and marked viewer - F1} Some Oberon commands take a star character "*" as (usually first) parameter. Prior to the execution of such a command, the user must mark the viewer or the object that should be used by the command as one of its parameters. Marking is done by moving the mouse cursor inside the viewer or the object and by hitting the \Index{F1 key} on the \Link{Keyboard}{keyboard}. That point is made visible by a star-shaped \Index{marker}  (Warning: this marker is a fake, it belongs to this text). \Index[-]{marked viewer}The viewer containing the \Index{marker focus} (the center of the pattern) in its frame boundary is said to be marked. The marker is unique: if it is set, an attempt to place another one will erase the old one. To convince yourself try this: set the caret in a free area of a \Link{GadgetsIntro.Desktop}{desktop} (that is how the work surface on your display is called in Oberon) with a left mouse key click, mark this viewer (F1) and click on this command -> Icons.InsertIcon * An icon captioned "Mouse.html" appears at the insertion point. You should by now know how to delete the icon: set the mouse focus on the icon and interclick right + left mouse keys. \Chapter[=]{Removing all marks - Esc} Hitting the \Index{Esc key} on the \Link{Keyboard}{keyboard}, or the \Index{F2 key} with Native Oberon, removes all the selections, the caret (do you remember the 3 shapes?) and the (star-shaped) marker Note that hitting the Esc key makes the marker invisible only: the viewer, which displayed the marker just before, remains the marked viewer. To verify this assertion, set the caret in a free area of the desktop as you did earlier, and click on -> Icons.InsertIcon * . Delete the icon which just appeared. Caution: The marker is fixed to the screen, not to the viewer. Therefore, it is good practice to set the marker explicitely if it has a significance in a subsequent action. \Chapter[=]{Keyboard*}{Using the keyboard} In Oberon, the principal role of the keyboard is to enter text. The caret must be visible in one of the viewers. The following table shows the character set that is used by the Oberon System. Between 20X and 7FX (second, third and fourth rows) lie the standard ASCII characters. They are produced with the respective labelled keys, including the use of SHIFT. The collection of accented characters, appearing in some country alphabets, are also defined. They appear in the fifth row.  Some combinations of keyboard input can be used to create the accented characters: press and release the accent key first, then press the appropriate letter. Accent keys, which also are known as nonescaping keys or dead keys, are intended to be used only in conjunction with other keys. To create the accent character by itself, press the accent key, then the Spacebar. You can always use this ASCII character table to insert accented characters and any other represented character into a document directly without the help of the keyboard. Refer to \Link{Applic.ASCIITab}{ASCIITab}. \Chapter[+]{PC with Oberon System 3 for Windows} The Ctrl key is used to produce the German umlaut characters: \
 \
With a German keyboard, if the appropriate keyboard driver is installed, , , , , , and can also be typed directly. Additionally to character keys there is a small number of command keys, as follows: \ In a Windows environment, Oberon commands cannot be interrupted with Ctrl-Break. This is due to the cooperative multitasking strategy of Windows 3.1. The only way to stop Oberon is by using Ctrl-Alt-Del. Windows might be clever enough to kill only the Oberon program; sometimes it is not. \Chapter[=]{PC with Native Oberon} \
  \
\Chapter[=]{MacOberon} \ \Chapter{What's next?} Choose a tutorial among those included in this distribution. You should know that there is a lot more to say about using the mouse in \Link{Oberon3TUI.}{Using Oberon} and \Link{GadgetsIntro.}{Introduction to Gadgets} \
Revised on 23 Nov, 1996 BIER22r?MgMMNKNnNNN%OWOuOQQRAR}RRSSSXWWW XHXXXYJYYYZKZZZ[O[[[\`\\\*]l]]]1^r^^^D_b!fosrvFwwx"|R|||}F}}} ~P~~~[1v Jځ#s?Ճ jSŅ7y9~ÇCψh"C=KB CNamei $%&'()*+,-./012 C,KBCCmd32"C6KB C 495@U CCmdPoint6KB C 6,KB CCmd 7^C3ColorTools.ChangeColor #Col ~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~$$C+8BW C+9T C+:T C6KB C  ;%qCOberon10.Scn.Fnti <=>?@ABCDEFGHIJKLMCi NOPQRSTUVWXYZ[\]^_Ci `abcdefghijklmnopqC]w̻9  PLC 5 CCmdFieldYesVal 5  CCmdFieldYesVal 58 CCmdFieldYesVal A#Oberon10.Scn.FntLM  CCmd A#Oberon10.Scn.FntRM: CCmd ;#Oberon10.Scn.FntMM  C-  PLC 5@ CCmdFieldYesVal A#Oberon10.Scn.FntLM  CCmd B#Oberon10.Scn.Fnt Macintosh4 C1  !"# fPLC 5 CCmdFieldYesVal 5. CCmdFieldYesVal A#Oberon10.Scn.FntLM CCmd A#Oberon10.Scn.FntRM4 CCmd >#Oberon10.Scn.FntPoint C >#Oberon10.Scn.FntPoint C >#Oberon10.Scn.FntPointp C ?#Oberon10.Scn.FntSelect C ?#Oberon10.Scn.FntSelect@ C @#Oberon10.Scn.FntExecute"' C 9CtrlvCCmdFieldYesVal <controlv(CCmdFieldYesVal 8altv&CCmdFieldYesVal ;#Oberon10.Scn.FntMM C @#Oberon10.Scn.FntExecute|h' C ;#Oberon10.Scn.FntMM C A#Oberon10.Scn.FntRM CCmd @#Oberon10.Scn.FntExecuteh' C ?#Oberon10.Scn.FntSelecth Cw̻ J w̻                 mOberon10b.Scn.Fnt Oberon10.Scn.FntZ[Do not erase this line. Use the lines below it! The editor allows arbitrary graphical objects such as  or  or  to flow within the text stream, as demonstrated here. These objects can be manipulated ...BIER^oogggh[hk"C&IconCColor =KBCName6KB C  ]w̻w̻TextGadgets.NewStyleProcIcons.NewIconRembrandt.NewPictures.NewPicture^ w̻                    Z w̻              COberon10b.Scn.Fnt Oberon10.Scn.Fnt&3Do not erase this line! Insert new text below it. BIER)wDww"!! CTextGadgets.NewStyleProc *Oberon10.Scn.FntUse the space below! BIERwww"vv CTextGadgets.NewStyleProc *Oberon10.Scn.FntUse the space below! BIERexx=x"ww CTextGadgets.NewStyleProcw̻ *2 C * C <#Oberon10.Scn.FntFor C <#Oberon10.Scn.FntUseK C :#Oberon10.Scn.Fnt C :#Oberon10.Scn.Fnt C :#Oberon10.Scn.Fnt C ?#Oberon10.Scn.FntCtrl-oD C ?#Oberon10.Scn.FntCtrl-uD C :#Oberon10.Scn.Fnt C :#Oberon10.Scn.Fnt C :#Oberon10.Scn.Fnt C E#Oberon10.Scn.Fnt Ctrl-Shift-aD< C E#Oberon10.Scn.Fnt Ctrl-Shift-oD= C E#Oberon10.Scn.Fnt Ctrl-Shift-uD= C :#Oberon10.Scn.Fnt C ?#Oberon10.Scn.FntCtrl-sD C ?#Oberon10.Scn.FntCtrl-aD C H#Oberon10.Scn.FntMark viewer (*)O C ;#Oberon10.Scn.FntF1| C I#Oberon10.Scn.FntRemove all marks V C ;#Oberon10.Scn.FntF2| C C#Oberon10.Scn.Fnt Ctrl-Breakt4 C J#Oberon10.Scn.FntInterrupt commanda C ;#Oberon10.Scn.FntF5| C ;#Oberon10.Scn.FntF6| C D#Oberon10.Scn.Fnt Display off5 C G#Oberon10.Scn.FntWhite on blackJ C C#Oberon10.Scn.Fnt Crtl-Entert~3 C E#Oberon10.Scn.Fnt Insert style~5 C D#Oberon10.Scn.Fnt System.Quit; C A#Oberon10.Scn.FntCtrl-F10t* C *d{ C * C <#Oberon10.Scn.FntFor, C <#Oberon10.Scn.FntUse| C *2 C * C <#Oberon10.Scn.FntFor C <#Oberon10.Scn.FntUseK C :#Oberon10.Scn.Fnt C :#Oberon10.Scn.Fnt C :#Oberon10.Scn.Fnt C ?#Oberon10.Scn.FntCtrl-oD C ?#Oberon10.Scn.FntCtrl-uD C :#Oberon10.Scn.Fnt C :#Oberon10.Scn.Fnt C :#Oberon10.Scn.Fnt C F#Oberon10.Scn.Fnt Alt-a or F8D; C F#Oberon10.Scn.Fnt Alt-o or F9D< C G#Oberon10.Scn.FntAlt-u or F10DB C :#Oberon10.Scn.Fnt C ?#Oberon10.Scn.FntCtrl-sD C ?#Oberon10.Scn.FntCtrl-aD C TextGadgets.NewStyleProcRembrandt.NewPanels.NewPanelClocks.NewCalendarTextGadgets.NewTextFields.NewTextFieldColorTools.NewColorPickerASCIITab.NewFramePictures.NewPictureBasicGadgets.NewButtonTextFields.NewCaptionTexts.NewBasicFigures.NewLine