Tutorial objective[edit | edit source]
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.
Using the mouse and the keyboard[edit | edit source]
Oberon is controlled by a 3-key mouse. Physical movement of the mouse on a flat surface translates into movement of a mouse cursor on the plane of the display. This cursor has the shape of an arrow , the tip of which is named mouse focus. The focus designates the object on which the mouse actions described below will operate. There are three mouse actions of importance: clicking, dragging and interclicking.
Clicking: pressing a key and releasing it, without 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.
Dragging: pressing a key and holding it down while moving the mouse.
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.
Mouse varieties[edit | edit source]
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 IBM compatible 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.
Scrolling[edit | edit source]
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 scroll bar located at the left of the viewer.
The scroll bar features a position mark which is adjusted at each scroll operation. 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):
- Dragging on the left key tracks lines: lines are underlined as the cursor moves up or down. On release, the last line tracked will appear at the top. Clicking the left key moves the respective line to the top. Known as scroll forward.
- Dragging on the right key tracks lines: lines are underlined as the cursor moves up or down. On release, the last line tracked will appear at the bottom. Clicking the right key moves the respective line to the bottom. Known as scroll backward. This adjustment is termed tracking lines.
The following interclick actions are also defined:
- Pressing the middle key and interclicking the left key scrolls to the end of the document. Known as scroll to bottom.
- Pressing the middle key and interclicking the right key scrolls to the beginning of the document. Known as scroll to top.
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 absolute positioning.
Select - Mouse Right key - MR[edit | edit source]
Text and objects are selected through clicking or dragging on the 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 Esc key on the keyboard, or the F2 key with Native Oberon.
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 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.
Point - Mouse Left key - ML[edit | edit source]
Below you see a small viewer which might receive typed characters at explicitely designated points. This leads to the concept of the insertion point which is made visible with the caret symbol . The tip at the top is the 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 focus viewer. The focus viewer is unique.
Move the mouse cursor inside the viewer below and set the caret in place by clicking the 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 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 desktops and panels the insertion point of a gadget is made visible by another 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 caret symbol is used in 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 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?
Execute - Mouse Middle key - MM[edit | edit source]
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 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. In an ETH Oberon system, MM on System.Time and watch the additional line appear in the Oberon.Log.
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 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.
Cancelling a mouse action[edit | edit source]
When a wrong key is pressed, pressing all keys cancels any action that would otherwise be initiated. The same holds true for an interclick.
Editing with the mouse and the keyboard[edit | edit source]
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):
- interclicking the left key deletes the selection (equivalent to cut in other editors) or
- interclicking the middle key copies the selection to the caret location on release of the right key.
While tracking the caret (dragging on the left key):
- interclicking the middle key copies the most recent selection to the caret or
- interclicking the right key copies the attributes of the character to the right of the caret to the most recent selection.
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.
Now copy (or type) a few words in the next two tiny text viewers and observe the following:
- Text may be selected in both: the selection is not unique.
- Of all the selections only one is the most recent selection.
- 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 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.
Marker * and marked viewer - F1[edit | edit source]
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 F1 key on the keyboard. That point is made visible by a star-shaped marker (Warning: this marker is a fake, it belongs to this text).
The viewer containing the 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 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.
Removing all marks - Esc[edit | edit source]
Hitting the Esc key on the keyboard, or the 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 explicitly if it has a significance in a subsequent action.
Using the keyboard[edit | edit source]
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 ASCIITab.
PC with Oberon System 3 for Windows[edit | edit source]
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:
- F1: mark a viewer as the destination of a command.
- Esc: remove all marks (neutralize).
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.
PC with Native Oberon[edit | edit source]
|Remove all marks||F2|
|Mark viewer (*)||F1|
|White on black||F6|
|Ä||Alt-a or F8|
|Ö||Alt-o or F9|
|Ü||Alt-u or F10|
MacOberon[edit | edit source]
- F1 or Enter on the keypad: Mark viewer.
- esc: Remove all marks (neutralize).
- num-lock: insert a text style at the caret in a text.
What's next?[edit | edit source]
Index[edit | edit source]
Revised on 23 Nov, 1996
Installed on 30 05 1997
- (ML, MM, MR) = (mouse left, mouse middle, mouse right).
- In the ETH Oberon system, an entity can be active. For example a text can be edited and the color picker can enlarge. In this HTML page, the graphical entities are static images.