KP Typing Tutor International Generation Version 4.0 Copyright (C) 1996 Zijian Huang All Right Reserved Shareware This document describes more details of KP, especially when you want to get more choices from the flexibility of KP. ------------------------------------------------------------------------------ How the batch files work Here is the content of "kpus.bat": kpworldg.exe kp.txt kpcourse.txt us.key [kp.rec] [color/mono] The first argument indicates the sample text file which the functions "Sentence practice" and "Text practice" will use. The second indicates the sample text which the function "Course" will use. The third indicates a keyboard template file, KP uses this file to display a specified virtual keyboard template on the screen. The forth argument is optional. It records the progress of the learner. The fifth argument is optional. If you run the program in a computer with mono monitor, you should indicate a fifth argument "mono". This argument can also be "colorNoGame" or "monoNoGame" to disable the game function of this typing tutor. Other DOS text files can be used as sample source files. It is recommended that the text files contain no more than 1600 lines, or the lines behind will be neglected; and each line contains no more than 78 characters, or the characters behind will be neglected. The last character of each line has better to be a visible character. DO REMEMBER, the bigger the sample text file is, the larger memory the KP program requires. It is recommended to call KP via a batch file which indicate all the arguments. If no argument is given to "kpworldg.exe", "kpworldg.exe" will search for "kp.txt", "kpcourse.txt", "uk.key" and "kp.rec", and run under color mode. ------------------------------------------------------------------------------ Suggestion to network managers (or manager of public computer lab) If you happen to be a network manager of a windows environment, you may produce several program icons to start various "*.bat" files that indicate various practice styles. Please notice that MS-Window contain a Dvorak keyboard driver, you must install it previously. Some vendors also provides the Dvorak keyboard driver for DOS environment. KP 4.1 will remind the user to pay after about four hours of use. Since you have paid the registration fee of public computer lab, you may disable this function. Follow these step: 1. Edit "kp.rec" with a text editor; 2. You will see three integer numbers, change the third number from 0 to 1. Then other users will never encounter the message of reminding, since they don't have to pay the registration fee. If you are going to use KP in a network, it is recommended that the manager treats this file as a user file to make sure that the learners can record their progress in their own files. For example: You install KP in "X:" drive somewhere, and the default user path is "F:", so you can write a batch file like: "... IF NOT EXIST f:\kp.rec COPY kp.rec f:\kp.rec kpworldg.exe kp.txt course2.txt us.key f:\kp.rec ..." ------------------------------------------------------------------------------ How to modify or produce a keyboard template file This section introduces to you how to modify or produce a keyboard template file. IF YOU WISH ONLY TO USE THE KEYBOARD TEMPLATES SUPPLIED, YOU DON NOT NEED TO READ THIS SECTION. Hopefully you understand ASCII code, code page, extend code page. "*.key" is a text file that only contains integer numbers. The format of the file will be described below by some examples. The content of "usf.key" is: 0 7 9 11 13 96 126 14 49 33 14 50 64 13 51 35 12 52 36 11 53 37 11 54 94 16 55 38 16 56 42 17 57 40 18 48 41 19 45 95 19 61 43 19 7 2 7 2 7 2 7 2 7 2 7 2 7 2 7 2 7 2 7 2 7 2 7 2 7 2 13 113 81 4 119 87 3 101 69 2 114 82 1 116 84 1 121 89 6 117 85 6 105 73 7 111 79 8 112 80 9 91 123 19 93 125 19 92 124 19 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 2 7 2 7 2 11 97 65 4 115 83 3 100 68 2 102 70 1 103 71 1 104 72 6 106 74 6 107 75 7 108 76 8 59 58 19 39 34 19 3 3 3 3 3 3 11 11 7 7 7 7 11 11 3 3 3 3 7 2 7 2 10 122 90 4 120 88 3 99 67 2 118 86 1 98 66 1 110 78 6 109 77 6 44 60 17 46 62 18 47 63 19 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 2 7 2 7 2 IT SHOULD BE NOTICED that each line of a "usf.key" file will probably more than 80 characters, if you want to read and write a "*.key" file more easily, you may turn off the wrap line function of the editor. The following are descriptions for each line of this file: LINE ONE 111111111111111111111111111111111111111111111111111111111111111111 0 7 9 11 Four numbers indicate the offsets from the left-most of the keyboard, for each line of keys from top to bottom. LINE TWO 222222222222222222222222222222222222222222222222222222222222222222 13 96 126 14 49 33 14 50 64 13 51 35 12 52 36 11 53 37 11 54 94 16 55 38 16 56 42 17 57 40 18 48 41 19 45 95 19 61 43 19 The number 13 indicates there exist 13 keys in the top row of the keyboard; the following 13 groups of numbers indicate the information of the 13 keys on the top row of the keyboard. In each group, the first number indicates the ASCII code of the lower case character; the second indicates the ASCII code of the upper case character; the third indicates the attribute of the key. For example, in the second group, number 49 is the ASCII code of character '1', number 33 is the ASCII code of character '!', number 14 contains number 1 and 4, number 4 means the little finger of the left hand, number 1 means this key is divided into lower part and upper part. LINE THREE 33333333333333333333333333333333333333333333333333333333333333333 7 2 7 2 7 2 7 2 7 2 7 2 7 2 7 2 7 2 7 2 7 2 7 2 7 2 These 13 groups of data indicate the colors of characters of each key. In each group, the FIRST number indicate the color of the LOWER case character, the SECOND indicate the color of the UPPER case character. LINE FOUR 44444444444444444444444444444444444444444444444444444444444444444 13 113 81 4 119 87 3 101 69 2 114 82 1 116 84 1 121 89 6 117 85 6 105 73 7 111 79 8 112 80 9 91 123 19 93 125 19 92 124 19 In this line, number 13 indicate there exist 13 keys on the second row. In the ninth group, number 79 is the ASCII code of 'O', number 111 is the ASCII code of 'o', number 8 contains number 0 and 8. number 0 means this key is for a alphabet letter, number 8 means the ring finger of the right hand. LINE FIVE 5555555555555555555555555555555555555555555555555555555555555555 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 2 7 2 7 2 LINE SIX 666666666666666666666666666666666666666666666666666666666666666666 11 97 65 4 115 83 3 100 68 2 102 70 1 103 71 1 104 72 6 106 74 6 107 75 7 108 76 8 59 58 19 39 34 19 LINE SEVEN 777777777777777777777777777777777777777777777777777777777777777 3 3 3 3 3 3 11 11 7 7 7 7 11 11 3 3 3 3 7 2 7 2 LINE EIGHT 8888888888888888888888888888888888888888888888888888888888888888 10 122 90 4 120 88 3 99 67 2 118 86 1 98 66 1 110 78 6 109 77 6 44 60 17 46 62 18 47 63 19 LINE NINE 99999999999999999999999999999999999999999999999999999999999999999 7 2 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 2 7 2 Symbolic constant numeric value: BLACK 0 BLUE 1 GREEN 2 CYAN 3 RED 4 MAGENTA 5 BROWN 6 LIGHTGRAY 7 DARKGRAY 8 LIGHTBLUE 9 LIGHTGREEN 10 LIGHTCYAN 11 LIGHTRED 12 LIGHTMAGENTA 13 YELLOW 14 WHITE 15 "Note: Some monitors do not recognise the intensity signal used to create the eight "light" colors(8-15). On such monitors, the light colors are displayed as their "dark" equivalents (0-7). Also, systems that do not display in color can treat these numbers as shades of one color, special patterns, or special attributes (such as underlined, bold, italics, and so on). Exactly what you"ll see on such systems depends on your hardware." (From Borland C++ on-line help) The ASCII code for each character in this file follow US code page (437).. In file "us.key", you can see an additional line with ten number, 6 14 5 3 4 6 15 5 3 4 which define the colors of ten fingers. The order is: l-t, l-i, l-m, l-r, l-l; r-t, r-i, r-m, r-l. Try to run "kpukf.bat". Which layout would you like? Hopefully, this example will give you some ideas how "kpus.bat" can work on various keyboards and different alphabet languages. ------------------------------------------------------------------------------ Update the game This typing game read a text file "kpgame.txt" as a source of providing words. You may have a look at this text file. You will see this text file contains groups of words. That is. The KP typing game read words randomly group by group. You may modify this text file or produce your own file. Up to sixty groups of words can be valid. There is no limitation on how many words or lines in a group. However, a line should not be longer than 200 characters. Also, you have to make sure the text file not too big, because the bigger the text file, the bigger the memory is required. Usually, a text file with size from 1 KB ~ 200 KB will be OK for the program running normally, depending how many memory which your system will provide to run a DOS application. If you are using an alphabetic language other than English, you may produce a game text in an alphabetic language other than English. The KP typing game accept extended ASCII character set. I do not guarantee that the "kpgame.txt" you received is the original file from me, because during the distribution between users, the "kpgame.txt" might be modified by some of them. If you want to get the most original copy of this typing game especially the text file, please visit Garbo FTP archive and her mirrors in directory "/pc/education". Any other advice, comments, suggestions please send to me. Zijian Huang 12, December 1995