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 PC keyboard has many keys that the 2200 (more correctly, the 2226 keyboard) didn't have, and the 2226 had some keys that the PC 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. 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 most PC keyboards have only 12. Also, Windows has dedicated F10 to selecting the application menu, for accessibility. Press it twice in a row to get around that problem.
Since F13-F15 don't typically exist, WangEmu has a workaround. Holding down the control key when pressing F9 to F12 yields the function keys. Ctrl+F9 through F11 map to special function keys 13 through 15, while Ctrl+F12 maps to the EDIT key.
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. For example, to enter the Wang SF13 key, which in edit mode causes the cursor to move left one position, it is much more mnemonic to press LEFT-ARROW (←) than the normal mapping, Ctrl+F9.
Below is a complete table of the mappings. In some cases, there are two PC 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 PC mapping, including "PRINT" and "CONTINUE".
|Wang key||2200 use||2200 use in edit mode||PC keys|
|† F10 must be hit twice in a row to achieve one SF10 keystroke|
|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||F9
|SF10||special function 10||insert char at cursor||F10†
|SF11||special function 11||cursor right 5 places||F11
Shift + →
|SF12||special function 12||cursor right 1 place||F12
|SF13||special function 13||cursor left 1 place||Ctrl+F9
|SF14||special function 14||cursor left 5 places||Ctrl+F10
Shift + ←
|SF15||special function 15||recall line||Ctrl+F11
|EDIT||enter edit mode||n/a||Ctrl+F12
|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).
To recall and edit, say, line 500 either of the following sequences can be used:
500<press ctrl><F12><F11><release ctrl>
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 Alt+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:
|Alt+K||toggle keyword mode|
|Alt+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.