|
| 1 | + |
| 2 | + Vcc KeyMap Editor |
| 3 | + Description of operation |
| 4 | + |
| 5 | +The Vcc key map editor consists of two main components; the Vcc |
| 6 | +Custom Keyboard Map file and the Edit Custom Key Map dialog. |
| 7 | +These are discussed below. |
| 8 | + |
| 9 | +Vcc Custom Keyboard Map File |
| 10 | +---------------------------- |
| 11 | + |
| 12 | +The keyboard map file is used to map host PC key codes into Color |
| 13 | +Computer 3 keys. This file has the default name "custom.keymap" and |
| 14 | +resides in the user's Vcc appdata directory. The file contains |
| 15 | +lines of text and can be edited using Notepad if that is desired. |
| 16 | + |
| 17 | +Each line contains four fields (two pairs) seperated by one or |
| 18 | +more spaces or tabs. Blank lines, lines starting with "#", |
| 19 | +or anything on a line beyond four fields are comments. The first |
| 20 | +two fields on each non-comment line are the PC code and it's |
| 21 | +modifier. The second two fields are the CoCo key and it's |
| 22 | +modifier. |
| 23 | + |
| 24 | +PC keynames start with "DIK_" and CoCo key names start with |
| 25 | +"COCO_". Key modifiers are specified with a single digit as |
| 26 | +follows: |
| 27 | + |
| 28 | + 0=not modified, 1=shift, 2=control, 3=alt. |
| 29 | + |
| 30 | +A list of valid PC and CoCo key names can be found in keynames.h |
| 31 | +in Vcc sources. |
| 32 | + |
| 33 | +Here is an sample entry line: |
| 34 | + |
| 35 | +# PC key name Mod CoCo name Mod |
| 36 | +# ----------- --- ----------- --- |
| 37 | + DIK_EQUALS 0 COCO_MINUS 1 # "=" Coco |
| 38 | + DIK_MINUS 1 COCO_MINUS 2 # "_" NitrOS-9 |
| 39 | + |
| 40 | +This above example maps the "Equals" key on the host PC to |
| 41 | +"Shift" + "-" keys in Vcc and the "Shift" + "-" keys on the |
| 42 | +host PC keyboard to "Alt" + "-" keys in Vcc. This matches |
| 43 | +what is printed on the keycaps of many keyboards with what |
| 44 | +the CoCo uses. |
| 45 | + |
| 46 | +The file contents are loaded into Vcc when the KeyBoard Mapping |
| 47 | +is changed to "Custom" in the Vcc Options "Keyboard" tab dialog. |
| 48 | +If the file does not exist Vcc will use default values for the |
| 49 | +custom keymapping. In this later case the "Select File" function |
| 50 | +in the Edit Custom Key Map Dialog can be used to generate the |
| 51 | +file. |
| 52 | + |
| 53 | +Any CoCo key that is not mapped in the keymap file will be |
| 54 | +"dead" in Vcc. However shifted letter keys do not need to be |
| 55 | +mapped to make them uppercase because DECB and NitrOS-9 will |
| 56 | +handle this internally. |
| 57 | + |
| 58 | +Whenever Vcc updates the keymap file all comments after the first |
| 59 | +valid map entry will be removed. This means user comments should |
| 60 | +be confined to the head of the file. Also entry order may be |
| 61 | +changed by the Edit Custom Key Map dialog. |
| 62 | + |
| 63 | +Edit Custom Key Map dialog |
| 64 | +-------------------------- |
| 65 | + |
| 66 | +The edit key map dialog is activated by clicking the EDIT button |
| 67 | +in the Vcc Options "Keyboard" tab dialog. The dialog has a virtual |
| 68 | +Color Computer 3 keyboard, a file name text box, a CoCo Key text |
| 69 | +box, and Host Key text box, and the following buttons: |
| 70 | + |
| 71 | + "Save Keymap" Used to save key map modfications to keymap file |
| 72 | + "Select File" Used to select the keymap file to use. |
| 73 | + "Set" Used to modify a key mapping in Vcc |
| 74 | + "Clear" Used to clear out the CoCo and Host text boxes |
| 75 | + "Exit" Used to exit the dialog. |
| 76 | + |
| 77 | +Other than selecting which PC key and modifier to map the dialog |
| 78 | +can not be navigated using the PC keyboard. Buttons can only be |
| 79 | +activated with a pointing device or touch keyboard. |
| 80 | + |
| 81 | +Once the dialog is entered pressing any key on the PC keyboard will |
| 82 | +cause the corresponding key button on the virtual CoCo keyboard to |
| 83 | +be pushed in and text describing the keys to appear in the CoCo |
| 84 | +Key and Host Key text boxes. If the PC key has no mapping the |
| 85 | +CoCo key text box will be blank and no button on the virtual CoCo |
| 86 | +keyboard will be pushed. Keys toggle - if the same key is pressed |
| 87 | +twice it toggled on-off. Modifier keys can be toggled either |
| 88 | +before or after non-modifier keys. This functionality allows user |
| 89 | +to quickly toggle through various PC key combinations to see the |
| 90 | +Vcc mapping of each. |
| 91 | + |
| 92 | +To change a keymapping user first selects a PC key and optional |
| 93 | +modifier by the above method and then clicks on a key button(s) |
| 94 | +on the virtual CoCo keyboard. This causes the "Set" button to |
| 95 | +become active. One the desired keymapping is seen clicking the |
| 96 | +"Set" button commits the mapping to Vcc. If instead the "Clear" |
| 97 | +button is clicked or any PC key is pushed the "Set" button will |
| 98 | +be deactivated and the keymap change is canceled. |
| 99 | + |
| 100 | +Changing the mapping of a key by the above method is temporary |
| 101 | +until the change is saved to the keymap file using the |
| 102 | +"Save Keymap" button (which activates if the keymap has been |
| 103 | +changed). It is considered normal to leave the Edit Key Map |
| 104 | +dialog without saving a map change. This allows user to use |
| 105 | +the change for the duration of the session without having it |
| 106 | +be permanant. |
| 107 | + |
| 108 | +The keymap file name can be changed with the "Select File" button. |
| 109 | +Pressing this button brings up an open file dialog which allows |
| 110 | +user to choose a different keymap file. When a file is selected |
| 111 | +the current custom keymapping is automatically saved to it. If |
| 112 | +the file selected does not exist the user is prompted if they |
| 113 | +want to create it. |
| 114 | + |
0 commit comments