
Three keyboards meet in this course: the Einstein's own, the modern one under MAME, and the editor's command keys. This appendix has all three in one place. Sections say "In MAME:" wherever the two machines differ; the tables here are the full set.
The Einstein's keyboard has no keys marked {, }, \, |, [, ], ^ or ~. They are made with three keys marked with arrows, which are character keys and not the cursor keys, and with the ½ key; the screen draws them as fractions and arrows, which is right, and not an error (Module 3).
| Character | On the Einstein | In MAME | Drawn on screen as |
|---|---|---|---|
[ | the ← key | Left arrow | ← |
{ | SHIFT and ← | Shift and Left | ¼ |
] | the → key | Right arrow | → |
} | SHIFT and → | Shift and Right | ¾ |
^ | the ↑ key | Up arrow | ↑ |
~ | SHIFT and ↑ | Shift and Up | ÷ |
| | ½ | \ | ‖ |
\ | SHIFT and ½ | Shift and \ | ½ |
_ | - key | - | _ |
` | SHIFT and - | Shift and - | ` |
? | SHIFT and / | Shift and / | ? |
Everything else is where its label says. The Einstein starts with CAPS LOCK on; press it once before typing a program, because C's names are case-sensitive and MAIN is not main (Module 4). The prompt does not mind either way.
| Einstein | In MAME | Does |
|---|---|---|
| ENTER | Return | Ends a command or a line |
| DELETE | Backspace | Rubs out the character to the left |
| GRPH | F8 | ED80's command key (below) |
| CONTROL | Control | Not used by ED80 on the course disc - it inserts ^E and the like (Module 5) |
| BREAK | Left Option | Nothing this course needs; it does not stop a C program (Module 7) |
| CAPS LOCK | Caps Lock | Toggles capitals; on at start |
| the horizontal cursor key | Tab | Nothing useful: ED80 puts ^D in the text, or ^H with SHIFT; kbd() sees 4, or 8 with SHIFT |
| the vertical cursor key | Down arrow | ED80 puts ^J in the text, or ^K with SHIFT; kbd() sees 10, or 11 with SHIFT |
MAME's own control keys - Esc to quit, F3 to reset - start switched off so that the Einstein gets every key; forward delete on a Mac, or Scroll Lock on Windows, switches them on and off again (Module 3).
The Einstein does not have four arrow keys. It has two grey cursor keys, side by side at the right-hand end of the QWERTY row, each marked with a double-headed arrow:
| Key | On its own | With SHIFT |
|---|---|---|
| the horizontal cursor key | cursor right | cursor left |
| the vertical cursor key | cursor down | cursor up |
Three other keys have a single arrow printed on them, but they are ordinary character keys, and the arrow is the character they type: the Einstein draws [ as a left arrow, ] as a right arrow and ^ as an up arrow.
| Key | Where it is | Types | With SHIFT |
|---|---|---|---|
| ← (marked ¼ and ←) | end of the QWERTY row, next to the cursor keys | [ | { |
| → (marked ¾ and →) | end of the ASDF row, next to ENTER | ] | } |
| ↑ (marked ÷ and ↑) | the number row, between = and ½ | ^ | ~ |
In MAME the two cursor keys are on your Tab key and your Down arrow: Tab is right, Shift and Tab is left, Down is down, and Shift and Down is up. Your Left, Right and Up arrows are the three character keys: Left types [, Right types ] and Up types ^. That is why MAME users so often report that the Einstein's arrow keys type brackets and do not move the cursor. The keys under those three arrows are not the cursor keys.
In ED80 on the course disc the cursor keys do not move the cursor. Each puts a control character into your text: ^D for the horizontal key, ^H with SHIFT, ^J for the vertical key and ^K with SHIFT. DEL takes it out, and GRPH-S, GRPH-D, GRPH-E and GRPH-X (below) do the moving. A program reading the keyboard with kbd() sees the four as 4, 8, 10 and 11 (Module 22).
Tatung's own manual describes the two cursor keys and the keyboard this way, and MAME's Einstein agrees with it. What the keys do in C on the course disc was checked in MAME, not on a real Einstein. If you have one and it behaves differently, please let us know and this page will be corrected.
GRPH and a letter, the letter pressed while GRPH is held. Where two keys are shown, the first is a prefix: press it, let go, and press the second.
| Keys | Does |
|---|---|
| GRPH-S, GRPH-D | Left a character, right a character |
| GRPH-A, GRPH-F | Left a word, right a word |
| GRPH-E, GRPH-X | Up a line, down a line |
| GRPH-C | Down a screenful; on a short file, to the end |
| GRPH-Q then D | To the end of the line |
| GRPH-Q then R | To the start of the file |
| GRPH-Q then C | To the end of the file |
| DEL | Delete the character to the left |
| GRPH-G | Delete the character under the cursor |
| CTRL-Y | Delete the whole line |
| GRPH-V | Switch between inserting and overwriting |
| GRPH-O then I | Auto-indent on and off (I/AUTO in the status line) |
| GRPH-J | The help screen; ENTER returns |
| GRPH-K then X | Save and exit: Filename:, ENTER accepts |
| GRPH-K then Q | Exit without saving: Abandon text: Sure?, Y |
The status line is wider than the screen and wraps over the first line of text (Module 5); the text is still there.
After an error the compiler waits: E opens ED80 on the faulty line, and any other key returns to the prompt (Module 7). DIR pauses when the screen is full and takes the next key as "continue" (Module 6).
The codes kbd() and rawin() return (Module 22):
| Key | Code | As a character |
|---|---|---|
| the ← key (Left arrow in MAME) | 91 | [ |
| the → key (Right arrow in MAME) | 93 | ] |
| the ↑ key (Up arrow in MAME) | 94 | ^ |
| the vertical cursor key (Down arrow in MAME) | 10 | line feed |
| SHIFT and the vertical cursor key | 11 | |
| the horizontal cursor key (Tab in MAME) | 4 | |
| SHIFT and the horizontal cursor key | 8 | backspace |
| SPACE | 32 | ' ' |
| ENTER | 13 | carriage return |
| A to Z | 65 to 90 | 'A' to 'Z', with CAPS LOCK on |
| 0 to 9 | 48 to 57 | '0' to '9' |
A key seen by kbd() is not taken, and waits for the prompt; a program that uses kbd() ends with gets (Module 22). No key stops a running C program (Module 7): a loop that must be stoppable watches the keyboard itself, and Q is the course's convention.