WangEmu Keyboard Map
The Wang 2200 had a number of different keyboard options during its life. The earliest ones are best described as being more like a calculator keyboard that had the letters retrofitted to it than a keyboard meant for typing. Later ones did have a more or less normal typewriter layout augmented with some dedicated keys for performing common tasks.
One problem most emulators have is deciding how to map the emulated keys onto the keys available on the host computer's keyboard. Many emulator writers attempt to map the emulated keys to the same positions of the keyboard even if the key legend is very different (such that a blindfolded user of the emulated computer would feel at home). WangEmu takes the other tack. As much as possible, if a key with the right legend is available on the host keyboard, that is the one used to represent the equivalent 2200 key.
That still leaves some problems. The Mac keyboard has many keys that the 2200 (more correctly, the 2226 keyboard) didn't have, and the 2226 had some keys that the Mac keyboard doesn't have. In these cases, WangEmu tries to pick keys that are somewhat mnemonic. Also, not all keys were directly mapped since such a mapping was rarely used and adding it to the emulator would cause more confusion than it was worth (e.g., mapping "RENUMBER" to the shifted comma key, while accuate, would have necessitated moving the "<" symbol to some other obscure location).
Another matter is that there isn't complete standardization on keyboard layouts. This is especially true on the Mac platform. Perhaps a future version of the emulator will allow for a user-configurable key map, but for now, changing it requires editing the source code and recompiling.
Special function keys and dedicated keyword keys
Unfortunately, the Wang has 16 special function keys, while not all Mac keyboards do. OS X also steals F9, F10, F11, and F12 for various Exposé functions, and at least on the authors keyboard, F13-F16 don't seem to act predictably like the other function keys.
There are two workarounds available for the lack of a complete set of F0-F15 keys. First, WangEmu can be configured to display a toolbar with all the special function keys.
Second, special function keys used in the EDIT mode are also mapped to control key combinations.
Below is a complete table of the mappings. In some cases, there are two Mac keys or key combinations that are used to emulate a given 2226 keystroke. On the 2200, some of the special function keys get a dedicated purpose when in edit mode, shown as the last column of the table. Note that not all Wang keys have an equivalent Mac mapping, including "PRINT" and "CONTINUE".
|Wang key||2200 use||2200 use in edit mode||Mac keys|
|SF0||special function 0||n/a||ESC|
|SF1||special function 1||n/a||F1|
|SF7||special function 7||n/a||F7|
|SF8||special function 8||delete to end of line||F8
|SF9||special function 9||delete char under cursor||Delete
|SF10||special function 10||insert char at cursor||Ctrl+I|
|SF11||special function 11||cursor right 5 places||Shift + →|
|SF12||special function 12||cursor right 1 place||→|
|SF13||special function 13||cursor left 1 place||←|
|SF14||special function 14||cursor left 5 places||Shift + ←|
|SF15||special function 15||recall line||Ctrl+F|
|EDIT||enter edit mode||n/a||Ctrl+E|
|LINE ERASE||clear whole line||clear whole line||Home|
|NEXT STATEMENT||next highest line number||next highest line number||Tab|
Pressing the key or key sequence for SF0-SF15 in combination with the SHIFT key will generate the codes for the 2200's special function 16 through 31 keys (the 2226 also had only 16 special function keys, SF0-SF15, and SF16-SF31 were obtained by pressing SHIFT to add 16 to the special function key number). This doesn't work for F8-F15 because of OS X's allocation of these keys. Instead, you must use the toolbar by clicking the appropriate function key image while holding down shift.
To recall and edit, say, line 500 this quick keyboard sequence can be used:
500<press ctrl><E><F><release ctrl>
The 2226 keyboard had two modes of operation: "Keyword/A" and "A/a". Which mode the keyboard was in was controlled by a toggle switch on the left side of the keyboard. This is controlled in the emulator in any of three ways: the checkbox in the lower left corner of the emulated CRT window, via the Configure/Keyword mode menu item, or with the Cmd+K shortcut.
In "A/a" mode, the keyboard works pretty much like a typewriter, with unshifted keys producing lower case letters and shifted keys producing capital letters. In "Keyword/A" mode, unshifted keys produced capital letters while shifted keys produced BASIC keywords. Most of them have been preserved.
A few keys that couldn't be conveniently mapped to their Wang-like positions, but which are exceedingly useful, have been mapped to control keys:
It should be noted that the GUI itself has these keyboard accelerators:
|Cmd+K||toggle keyword mode|
|Cmd+Enter||toggle fullscreen mode|
Finally, here is a diagram showing where all the keys are mapped, at least on my keyboard. Certain keys may appear in different locations on different keyboards, especially European keyboards.