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).
Starting with release 2.0, WangEmu runs natively under OS X on the Mac. This system has its own problems, noted below, although the majority of this document is PC-centric.
Special function keys and dedicated keyword keys
Unfortunately, the Wang has 16 special function keys, while most PC keyboards have only 12. To get around this and to trigger the other special function keys, hold down the control key then press F9 to F12. Ctrl+F9 through F11 map to special function keys 13 through 15, while Ctrl+F12 maps to the EDIT key. Note that F10 is a problem in that Windows uses it to trigger keyboard access to the application menu; press it twice in a row to get one SF10.On the Mac, F1-F8 unshifted work just as on the PC. Unfortunately, the other function keys and any of the function keys in combination with shift don't work. There are two workarounds available for this. 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, described below.
Besides mapping the PC function keys to the Wang Special Function keys, some other PC keys have been mapped for convenience during the line edit mode. 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 PC LEFT-ARROW (<-) than the normal PC 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 (listed as the "optional PC key"). 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". On the PC platform, some function keys can be entered in two or even three different ways; which way is best is determined by what is most mnemonic to the user.
Wang key 2200 use 2200 use in edit mode PC keys Mac keys SF0 special function 0 n/a ESC ESC SF1 special function 1 n/a F1 F11 ... ... ... ... ... SF7 special function 7 n/a F7 F71 SF8 special function 8 delete to end of line F8
EndF81 SF9 special function 9 delete char under cursor F9
Delete
Ctrl+DCtrl+D SF10 special function 10 insert char at cursor F102
Insert
Ctrl+ICtrl+I SF11 special function 11 cursor right 5 places F11
Shift + -->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 + <--Shift + <-- SF15 special function 15 recall line Ctrl+F11
Ctrl+FCtrl+F EDIT enter edit mode n/a Ctrl+F12
Ctrl+ECtrl+E LINE ERASE clear whole line clear whole line Home n/a NEXT STATEMENT next highest line number next highest line number Tab Tab HALT/STEP break/single step n/a Break
Ctrl+CCtrl+C Footnotes:
1: On the Mac, shift can't be held in combination with the function keys. Use the toolbar.
2. On the PC, F10 must be hit twice in a row to achieve one SF10 keystroke in the emulatorPressing 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 on the Mac; on the Mac, you must use the toolbar by clicking on the appropriate function key image while holding down shift.
Note that to edit and recall a given line is this quick sequence on the PC:
<enter line number><press ctrl><F12><F11><release ctrl>
The following sequence is usable on both the PC and the Mac:
<enter line number><press ctrl><E><F><release ctrl>
Keyword Keys
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. 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 HEX( N TRACE B SKIP O STEP C REWIND P NEXT D DATA Q COM E DEFFN R GOSUB F RESTORE S STR( G READ T RETURN H IF U INPUT I FOR V SAVE J THEN W DIM K STOP X BACKSPACE L END Y REM M GOTO Z SELECT 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:
Ctrl+Z CONTINUE Ctrl+L LIST Ctrl+P Ctrl+R RUN It should be noted that the GUI itself has these keyboard accelerators:
PC key Mac key Function Alt+G Cmd+G screen grab Alt+X Cmd+Q exit application Alt+R Cmd+R cold reset Alt+W Cmd+W warm reset Alt+K Cmd+K toggle keyword mode Alt+Enter 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.
Last update: May 24, 2005