Information processing apparatus connectable to different types of keyboards

Abstract: An object of the present invention is to provide an information processing apparatus capable of using more than one type of keyboards with a single keyboard controller without increasing the production cost. In a keyboard matrix, a key scanning line C0 is arranged so that the key scanning line C0 is only connected to any one of key return lines R0 to R7 through a key switch having a key switch number G01. The key switch number G01 is assigned for the key [F1] which is common to keyboards having different key arrangements. When the information processing apparatus is activated, a keyboard initializing program is activated by depressing the [F1] key. As a result, the information processing apparatus identifies the type of the keyboard by detecting a key return line R from which a signal is returned when scanning is made upon the depression of the [F1] key.

Description: FIELD OF THE INVENTION The present invention relates to a keyboard device for use in an information processing apparatus, such as a personal computer, a word processor, and a pocket-sized computer, and also to an information processing apparatus including such a keyboard device as input means. BACKGROUND OF THE INVENTION As input means for entering user's instructions to controllers like personal computers and word processors, a keyboard device is generally used. There are other types of input means, such as a voice input system and a touch panel. However, when inputting a large number of characters, for example, texts and programs, it would be said that the keyboard device is still the best input means. In the keyboard device, a plurality of keys are usually arranged to correspond to characters, respectively. The keyboard device is formed by a keyboard and a keyboard controller. The keyboard has key switches which correspond to the respective keys and are arranged in a matrix form. When a key on the keyboard is depressed, a key switch corresponding to the depressed key is turned on. Then, the keyboard controller outputs a logical key number corresponding to this key switch as a signal. However, since each country has its own standards, various types of keyboards exist. For example, there are variations in the characters printed on the top of the keys and in the arrangement of the keyboard matrix. In general, a keyboard controller is produced to correspond to a particular keyboard. Thus, even if a keyboard device is electrically and mechanically compatible with a keyboard having another arrangement of keys, when the keyboard device is connected to the keyboard controller by only replacing the keyboard, signals corresponding to correct logical key numbers cannot be output. Therefore, in apparatuses like information processing apparatuses including a keyboard device, when the need to replace the keyboard with a keyboard having another arrangement of keys arises, it is impossible to replace only the keyboard. Namely, it is necessary to replace the whole keyboard device as a unit for the replacement of the keyboard. Such a drawback results in poor development efficiency and high development costs. In order to solve these problems, for example, Japanese Publication for Unexamined Patent Application No. 61585/1993 (Tokukaihei 5-61585) proposes an "information processing apparatus". In the information processing apparatus disclosed in this publication, an ID memory section for storing ID for distinguishing keyboards is included in a keyboard device formed by a keyboard and a controller for outputting key code signals corresponding to the respective key switches of the keyboard. On the other hand, a memory in the information processing apparatus includes, for example, key-code-signal to character-code conversion tables corresponding to a plurality of keyboards. The information processing apparatus reads the ID of a keyboard from the ID memory section, and accepts inputs from the keyboard through the key-code-signal to character-code conversion tables. Consequently, when an occasion to connect a newly developed keyboard to the controller arises, it is possible to use the new keyboard with the use of a conventional controller by storing a key-code-signal to character-code conversion table corresponding to the new keyboard in the memory and reading the key-code-signal to character-code conversion table in accordance with the ID of the new keyboard. The following description will briefly explain the structure and operation for distinguishing keyboards by presenting an example of a conventional information processing apparatus having storage means for storing a plurality of conversion tables corresponding to keyboards outside of the keyboard controller like the apparatus disclosed in the above-mentioned publication. As illustrated in Fig. 24, this information processing apparatus includes a system device 51, and a keyboard device 52. The system device 51 includes a central processing unit 53, a display device 54, a system information memory device 55 formed by an EEPROM, FLASHROM, non-volatile RAM, or the like, a main memory 56 formed by a read/write RAM, a secondary memory 57 formed by HDD, etc., and an input/output device 58 for managing the flow of signals between the constitutional elements of the keyboard device 52 and the system device 51. The system information memory device 55 includes a system information valid flag storage area 55a for storing a system information valid flag (hereinafter just referred to as the flag) L for determining whether initialization of the keyboard is to be performed or not, and a keyboard ID storage area 55b for storing the recognized keyboard ID from the keyboard device 52. The flag L is arranged to be 1 (L = 1) after the completion of the execution of a keyboard initializing program 66a which is called up from a system initializing program 59a, to be described later, when the power supply of the system is first switched on. More specifically, the system device 51 judges that the system information is invalid when L = 0, and that the system information is valid when L = 1. When L = 1, the system device 51 performs the following operations. The keyboard ID is a unique number allotted to each keyboard device 52 and the number varies according to the types of keyboards so that the system device 51 can identify the types of keyboards. The main memory 56 includes a program storage area 59 storing the system initializing program 59a for initializing the system setup and a keyboard input program 59b for converting a logical key number input to the keyboard device 52 into a character code, and a data storage area 60 formed by a character codes storage area 60a and a conversion tables storage area 60b storing logical-key-number to character-code conversion tables. The secondary memory 57 stores a plurality of logical-key-number to character-code conversion tables T (hereinafter referred to as the "conversion tables T") corresponding to different keyboard ID values. Like the embodiments of the present invention, to be described later, three conversion tables T00 to T02 corresponding to three types of keyboards are provided as shown in Fig. 24. The keyboard device 52 is formed by a keyboard controller 61 and a keyboard 62. The keyboard controller 61 is formed by a central processing unit 63, an input/output device 64 for managing the flow of signals between the constitutional elements of the system device 51 and the keyboard device 52, and a memory device 65. The memory device 65 includes a program storage area 66 and a data storage area 67. The program storage area 66 stores a keyboard initializing program 66a for recognizing the keyboard ID and transferring the recognized keyboard ID to the system device 51, and a keyboard output program 66b for converting a key switch position input through the keyboard 62 into a logical key number and transferring the logical key number to the system device 51 via the input/output device 64. In addition, the data storage area 67 has a keyboard ID storage area 67a storing the keyboard ID recognized by the keyboard initializing program 66a, and a key-switch-number to logical-key-number conversion table t (hereinafter referred to as the "conversion table t"). The keyboard 62 has a keyboard matrix 68 including an ID storage section 68a and a matrix section 68b with respect to necessary pieces of keys, for example, p pieces of keys. The ID storage section 68a is formed by an IC including ROM, etc., and stores an ID code unique to the keyboard. The matrix section 68b outputs a signal corresponding to the key switch position of a key depressed. For example, as shown in Fig. 20 which is related to Embodiment 2 to be described later, the matrix 68b is formed by 10 key scanning lines C0 to C9, and 8 key return lines R0 to R7. A key switch is formed at each of the intersections of the key scanning lines and the key return lines. The key switches are provided with key switch numbers Gp (p = 00 to 74). Namely, a corresponding key switch number Gp is individually determined by each key scanning line and key return line. The conversion table t shows the relationship between the key switch numbers Gp determined by the key scanning line numbers and key return line numbers, and the logical key numbers Kq (q = 00-74). The relationship is the same as the relationship shown in Fig. 21 which is related to an embodiment of the present invention, to be described later. On the other hand, the conversion tables T show the relationship between the logical key numbers Kq and character codes. As described above, the conversion table T varies according to the keyboard ID value. For example, a keyboard whose keyboard ID is 00 has an arrangement of keys which is the same as the arrangement of keys (Fig. 11) corresponding to the conversion table T00 shown in Fig. 4 related to an embodiment of the present invention, to be described later. Needless to say, when the keyboard ID has a different value, the conversion table T also varies. In the information processing apparatus having the above-mentioned structure, when power is supplied to the system device 51 and the keyboard device 52 after connecting the keyboard 62 whose keyboard ID is 00 to the keyboard controller 61, the system initializing program 59a is activated. Then, when it is judged based on the value of the flag L that the system information is invalid, the system information memory device 55 transmits to the keyboard controller 61 a request for keyboard ID. Upon the request for keyboard ID, the keyboard controller 61 activates the keyboard initializing program 66a. Then, the keyboard ID having a value of 00 is read from the ID storage section 68a of the keyboard 62, stored in the keyboard ID storage area 67a, and sent to the system device 51. The system device 51 stores the keyboard ID in the keyboard ID storage area 55b, reads the conversion table T00 corresponding to the keyboard ID from the secondary memory 57, and stores the conversion table T00 in the logical-key-number to character-code conversion tables storage area 60b. As a result, the flag L is made valid, and the activation of system is completed. After making the above-mentioned setup, in the keyboard device 52, when a character is input through the keyboard 62, the keyboard output program detects the key switch number Gp of a key depressed, calls a logical key number Kq corresponding to the key switch number Gp from the conversion table t, and transmits the logical key number Kq to the system device 51. In the system device 51, the keyboard input program 59b calls a character code corresponding to the input logical key number Kq from the conversion table T00, and outputs the character code to the display device 54. As described above, the keyboard 62 includes the keyboard ID storage section 68a storing unique keyboard ID, and the system device 51 has a plurality of conversion tables T corresponding to different keyboard ID values. By storing the conversion table T corresponding to the keyboard ID of the connected keyboard 62 in the logical-key-number to character-code conversion tables storage area 60b upon the activation of the information processing apparatus and by using the conversion table T, it is possible to output a character corresponding to a key depressed on the keyboard 62. Namely, this structure allows a single keyboard controller 61 to be compatible with a plurality of keyboards having different key arrangements. However, in the above-mentioned conventional techniques, the system automatically identifies a keyboard upon the activation of the information processing apparatus. Thus, it is necessary to provide the keyboard with a new memory area (ID storage section 68a). For instance, when a system as a whole supports four types of keyboards, at least a two-bit memory area is required. Moreover, since an IC is added, a capacitor and a resister may be required to deal with unwanted radiation and electrostatic breakdown. As a result, the cost of the keyboard device 52 itself increases. EP 0 549 242 discloses an arrangement for distinguishing between different appliance models (e.g. one of a range of microwave ovens) by identifying the kind of user-operable keypanel, unique to each model. One or more sense or drive lines are added, uniquely connected to the existing drive or sense lines, respectively, depending on the particular model. SUMMARY OF THE INVENTION It is an object of the present invention to provide a keyboard device capable of using more than one type of keyboard with a single keyboard controller without increasing the production cost. In order to achieve the above object, the present invention provides a keyboard device including a keyboard which includes a plurality of keys and a corresponding matrix of key switches, and is one of a plurality of keyboards with differing key arrangements and a keyboard controller which is operable to identify the particular keyboard installed in the device, characterized in that said keyboard controller is arranged to so identify the installed keyboard upon user-actuation of a specific function key common to all of said plurality of keyboards by determining the particular position, within the matrix, of the key switch operated by such key actuation, said position being unique to each of said plurality of keyboards. Where the key switches are provided at respective intersections between key scanning lines and key return lines of the keyboard, the keyboard controller can be arranged to identify the type of keyboard detecting which key return line is connected to the key scanning line corresponding to the specific key which has been actuated by depressing thereof. In this structure, since the combination of the key scanning line and the key return line which are connected to each other when the specific key is depressed varies according to each keyboard, different signals are obtained from the respective keyboards. Consequently, it is possible to distinguish the keyboards based on the signals. It is therefore unnecessary for the keyboard to have a structure for identifying the keyboard, for example, for outputting the keyboard ID. Namely, it is possible to provide an information processing apparatus capable of using more than one type of keyboards with a single keyboard controller without increasing the production cost. Moreover, in order to output logical key numbers, the keyboard controller may include first memory means for storing a key-switch-number to logical-key-number conversion table. The first memory means stores a plurality of key-switch-number to logical-key-number conversion tables corresponding to the keyboards having different key arrangements. The keyboard device of this structure outputs logical key numbers corresponding to key switch positions based on a key-switch-number to logical-key-number conversion table which is selected according to a signal obtained by depressing the specific key. In this structure, a key-switch-number to logical-key-number conversion table corresponding to a detected keyboard type is used in the keyboard controller. Consequently, the keys depressed are correctly converted into corresponding character codes according to a connected keyboard. It is therefore possible to make a single keyboard controller compatible with a plurality of keyboards. In the keyboard controller, in order to identify the keyboard, for example, such a program that depresses the specific key when the information processing apparatus is activated is operated. Furthermore, a keyboard apparatus including a keyboard device of the present invention and a system device for providing character codes corresponding to the logical key numbers may be arranged to output such character codes corresponding to the logical key numbers based on a logical-key-number to character-code conversion table which is selected according to the type of keyboard. In this structure, the transmission of signals between the keyboard device and the system device is standardized by the logical key numbers. Therefore, even if the keyboard device has not only a different key arrangement but also a different physical arrangement of the keyboard matrix, the keyboard device can be connected to the system device by converting signals through the key-switch-number to logical-key-number conversion table and the logical-key-number to character-code conversion table. In addition, the key scanning line corresponding to the specific key may be connected to a said key return line on the keyboard matrix only at a key switch position corresponding to the specific key. In this structure, it is possible to locate the key switch corresponding to the specific key on different key switch positions according to the number of key return lines by only providing an additional key scanning line exclusively for the specific key. Namely, it is possible to distinguish the same number of keyboard ID values as the number of key return lines. Furthermore, the key switch position corresponding to the specific key can be changed, and the key-switch-number to logical-key-number conversion tables may be arranged so that the relationship between the logical key numbers of the respective conversion tables and the specific key becomes uniform. In this arrangement, by varying the key switch position corresponding to the specific key according to each keyboard, the same character code is obtained when the specific key is depressed, but the key switch position obtained by the depression of the specific key varies according to the types of keyboards. It is thus possible to distinguish keyboard ID. For a fuller understanding of the nature and advantages of the invention, reference should be made to the ensuing detailed description taken in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a circuit diagram showing a keyboard matrix circuit used in a keyboard whose keyboard ID is 00 according to one embodiment of the present invention. Fig. 2 is a block diagram showing the system structure of a personal computer of the present invention. Fig. 3(a) is a partial circuit diagram of a modified example of the keyboard matrix circuit shown in Fig. 1, which is used in a keyboard whose keyboard ID is 01. Fig. 3(b) is a partial circuit diagram of a modified example of the keyboard matrix circuit shown in Fig. 1, which is used in a keyboard whose keyboard ID is 02. Fig. 4 is a logical-key-number to character-code conversion table T00 corresponding to keyboard ID having a value 00. Fig. 5 is a logical-key-number to character-code conversion table T01 corresponding to keyboard ID having a value 01. Fig. 6 is a logical-key-number to character-code conversion table T02 corresponding to keyboard ID having a value 02. Fig. 7 is a key-switch-number to logical-key-number conversion table t00 corresponding to keyboard ID having a value 00. Fig. 8 is a key-switch-number to logical-key-number conversion table t01 corresponding to keyboard ID having a value 01. Fig. 9 is a key-switch-number to logical-key-number conversion table t02 corresponding to keyboard ID having a value 02. Fig. 10 is an explanatory view showing the relationship between the key arrangement on a keyboard and logical key numbers. Fig. 11 is an explanatory view showing the relationship between the characters shown on the top of keys and the key arrangement when the keyboard ID is 00. Fig. 12 is an explanatory view showing the relationship between the characters shown on the top of keys and the key arrangement when the keyboard ID is 01. Fig. 13 is an explanatory view showing the relationship between the characters shown on the top of keys and the key arrangement when the keyboard ID is 02. Fig. 14 is a flow chart of a system initializing program. Fig. 15 is a flow chart of a keyboard initializing program. Fig. 16 is a flow chart of a keyboard output program. Fig. 17 is a flow chart of the R reading process in Fig. 16. Fig. 18 is a flow chart of the logical key number transmission process in Fig. 17. Fig. 19 is a flow chart of a keyboard input program. Fig. 20 is a circuit diagram showing a keyboard matrix circuit of a keyboard according to another embodiment of the present invention. Fig. 21 is a key-switch-number to logical-key-number conversion table t00' corresponding to keyboard ID having a value 00 according to the another embodiment. Fig. 22 is a key-switch-number to logical-key-number conversion table t01' corresponding to keyboard ID having a value 01 according to the another embodiment. Fig. 23 is a key-switch-number to logical-key-number conversion table t02' corresponding to keyboard ID having a value 02 according to the another embodiment. Fig. 24 is a block diagram showing the system structure of a conventional personal computer. DESCRIPTION OF THE PREFERRED EMBODIMENTS [Embodiment 1] The following description will explain one embodiment of the present invention with reference to Figs. 1 to 19. Fig. 2 is a block diagram showing the system structure of a personal computer of the present invention. The personal computer includes a system device I, and a keyboard device 2. The system device 1 includes a central processing unit 11, a display device 12, a system information memory device 13 formed by an EEPROM, FLASHROM, non-volatile RAM, or the like, a main memory 14 formed by a read/write RAM, a secondary memory 15 formed by HDD, etc., and an input/output device 16 for managing the flow of signals between the constitutional elements of the keyboard device 2 and the system device 1. The system information memory device 13 includes a system information valid flag storage area 13a storing a system information valid flag (hereinafter just referred to as the flag) L for determining whether initialization of the keyboard as input means is to be performed or not, and a keyboard ID storage area 13b storing recognized keyboard ID from the keyboard device 2. The flag L is arranged to be 1 (L = 1) after the completion of the execution of a keyboard initializing program 26a which is called from a system initializing program 17a, to be described later, when the power supply of the system is first switched on. More specifically, the system device 1 judges that the system information is invalid when L = 0, and that the system information is valid when L = 1. When L = 1, the system device 1 performs the following operations. The keyboard ID is a unique number allotted to each keyboard device 2 and the number varies according to the types of keyboards so that the system device 1 can identify the types of keyboards. The main memory 14 includes a program storage area 17 storing the system initializing program 17a for initializing the system setup and a keyboard input program 17b for converting a logical key number input to the keyboard device 2 into a character code, and a data storage area 18 formed by a character codes storage area 18a and a conversion tables storage area 18b storing logical-key-number to character-code conversion tables. The secondary memory 15 stores three logical-key-number to character-code conversion tables T00 to T02 (hereinafter referred to as the "conversion tables T00 to T02", the conversion tables T00 to T02 may be generically called the "tables T") corresponding to different keyboard ID values. In this embodiment, since compatible keyboards are of three types, three conversion tables T00 to T02 are stored. However, the number of conversion tables T to be stored in the secondary memory 15 in advance can be determined according to the need. Namely, the number of the conversion tables T are not necessarily limited to three. As illustrated in Fig. 2, the keyboard device 2 is formed by a keyboard controller 21 and a keyboard 22. The keyboard controller 21 is formed by a central processing unit 23, an input/output device 24 for managing the flow of signals between the constitutional elements of the system device 1 and the keyboard device 2, and a memory device 25. The memory device 25 includes a program storage area 26 and a data storage area 27. The program storage area 26 stores a keyboard initializing program 26a for recognizing the keyboard ID and transferring the recognized keyboard ID to the system device 1, and a keyboard output program 26b for converting a key switch position input through the keyboard 22 into a logical key number and transferring the logical key number to the system device 1 via the input/output device 24. In addition, the data storage area 27 stores a keyboard ID storage area 27a storing the keyboard ID recognized by the keyboard initializing program 26a, and three key-switch-number to logical-key-number conversion tables t00 to t02 (hereinafter referred to as the "conversion tables t00 to t02", the conversion tables t00 to t02 may be generically called the "conversion tables t"). Similarly to the conversion tables T, the number of conversion tables t can be determined according to the need. The keyboard 22 includes a keyboard matrix 22a having a structure for allowing the system device 1 to recognize the keyboard ID, and key switches Gp (p = 00 to 74) corresponding to the respective keys. As illustrated in Fig. 1, the keyboard matrix 22a is formed by key scanning lines Ci (i represents a key scanning line number), and key return lines Rj (j is a key return line number). The key switch Gp is formed at each of the intersections of the key scanning lines Ci and the key return lines Rj. A key switch Gp is selected by depressing a key. In this case, at a key switch position CiRj of a key switch Gp, since the result of scanning a key scanning line Ci is returned to a key return line Rj connected with the key switch Gp, it is possible to detect which key switch Gp is selected. In the keyboard device 2, the key switch position represented by the key scanning line Ci and the key return line Rj of the detected key switch number Gp is converted into a logical key number Kq by the conversion tables t, and then transferred to the system device 1. In the system device 1, the logical key number Kq transferred from the keyboard device 2 is converted into a character code by the conversion tables T. In this embodiment, as described above, the system device 1 corresponds to keyboards having keyboard ID values 00, 01, and 02. For example, Fig. 1 shows a circuit diagram of a keyboard matrix circuit corresponding to the keyboard ID value 00 with a key scanning line number i (i = 0 to 10) and a key return line number j (j = 0 to 7). In each of the keyboard matrix circuits corresponding to keyboard ID values 01 and 02, as shown in Figs. 3(a) and 3(b), the position of a key return line Rj corresponding to the key switch number G01 differs from that in the keyboard matrix circuit corresponding to the keyboard ID value 00. The secondary memory 15 stores the conversion table T00 (Fig. 4) corresponding to a keyboard ID value 00, the conversion table T01 (Fig. 5) corresponding to a keyboard ID value 01, and the conversion table T02 (Fig. 6) corresponding to a keyboard ID value 02. The data storage area 27 stores the conversion table t00 (Fig. 7) corresponding to the keyboard ID value 00, the conversion table t01 (Fig. 8) corresponding to the keyboard ID value 01, and the conversion table t02 (Fig. 9) corresponding to the keyboard ID value 02. Moreover, in the conversion tables t, a logical key number K01 is allotted to the key switch number G01. An [F1] key (specific key) is set as a key for requesting a user to make an input to identity the type of the keyboard during the initialization of the system, and is allotted to the logical key number K01 in the conversion tables T. Thus, the characters "F1" are printed on the top of a key corresponding to the key switch number G01. Therefore, when the "F1" key is depressed, the key switch number G01 is selected, and the characters "F1" as a character code are input. In this case, if the keyboard ID is 00, the position of a key return line from which a signal is returned when scanning C0 is R0. If the keyboard ID is 01, the position of the key return line is R1. If the keyboard ID is 02, the position of the key return line is R2. It is thus possible to distinguish keyboards. The physical positions of the keys on the keyboard depend on the logical key number Kq, and the arrangement of the keys is shown in Fig. 10. Hence, according to the conversion tables T00 to T02 shown in Figs. 4 to 6, the key arrangements on the keyboards having keyboard ID values 00, 01 and 02 are shown in Figs. 11, 12 and 13, respectively. In the above-mentioned structure, the operation of detecting a keyboard upon the supply of power to the personal computer of this embodiment will be explained below with reference to Figs. 14 to 19. When the power is supplied to the system device 1 and the keyboard device 2, the system initializing program 17a stored in the main memory 14 is activated. When the system initializing program 17a is activated, as shown in Fig. 14, the value of the flag L stored in the system information valid flag storage area 13a is first judged (step S1). In S1, if L = 1, i.e., the system information is judged to be valid, the keyboard ID is read from the keyboard ID storage area 13b (step S2). Subsequently, a conversion table Tn corresponding to the value of the read keyboard ID is read from the secondary memory 15, and stored in the conversion tables storage area 18b (step S3). Then, the system initializing program 17a is completed. On the other hand, if L = 0, i.e., the system information is judged to be invalid, a message "SYSTEM CONFIGURATION INVALID, PRESS [F1] KEY" is displayed (step S4) in order to inform the user that the system information is invalid. Then, when the [F1] key is depressed, a request for keyboard ID is transmitted to the keyboard controller 21 via the input/output device 16 (step S5). At this time, the system initializing program 17a waits until the keyboard ID is sent from the keyboard controller 21 (step S6). When the keyboard ID is sent, the keyboard ID is stored in the keyboard ID storage area 13b (step S7). Thereafter, the flag L representing 1 is stored in the system information valid flag storage area 13a (step S8), and then the procedure moves to S2. The procedure after S2 is performed in the manner mentioned above. Meanwhile, in the keyboard controller 21, the keyboard initializing program 26a is activated upon the receipt of the request for keyboard ID sent from the system device 1 in S5. When the keyboard initializing program 26a is activated, as shown in Fig. 15, the keyboard controller 21 first outputs 1 to the key scanning line C0 of the keyboard matrix 22a (step S11), and reads the values of the key return lines R0 to R7 (step S12). Then, it is judged whether all of R0 to R7 are 0. If all of R0 to R7 are 0, the control procedure returns to S12 (step S13). In S13, if at least any one of the eight key return lines R0 to R7 is 1, the value of the key return line R0 is first judged (step S14). If R0 = 1, 00 is stored as the keyboard ID in the keyboard ID storage area 27a (step S15). If R0 ≠ 1, the value of the key return line R1 is judged (step S16). If R1 = 1, 01 is stored as the keyboard ID in the keyboard ID storage area 27a (step S17). If R1 ≠ 1, the value of the key return line R2 is judged (step S18). If R2 = 1, 02 is stored as the keyboard ID in the keyboard ID storage area 27a (step S19). Furthermore, if R2 ≠ 1, it is judged that the recognition of the input key switch failed, and the control procedure returns to S11. Since the above-mentioned keyboard initializing program 26a corresponds to three types of keyboards, when R0 to R2 are 0, the procedure returns to S11. However, the keyboard initializing program 26a detects the keyboard based on the value of the key return line Rj. Therefore, in the above-mentioned case, the keyboard controller is physically compatible with a maximum of eight types of keyboards. Next, the keyboard ID stored in the keyboard ID storage area 27a is transmitted to the system device 1 (step S20) to complete the keyboard initializing program 26a. Thereafter, the keyboard output program 26b is activated. When the keyboard output program 26b is activated, as shown in Fig. 16, a counter i is first initialized to show 0 (step S21), and 1 is output to the key scanning line Ci of the keyboard matrix 22a (step S22). Subsequently, the key return line Rj is read (step S23), and increment of i is performed (step S24). In this embodiment, since the total number of the key scanning lines C0 to C10 is 11, a series of processing from S22 to S24 is repeated until i becomes 11 (step S25). When i becomes 11, the procedure returns to S21. Referring now to Fig. 17, the following description will explain the operation of reading R in S23. When reading R, first, the key return lines R0 to R7 are all read (step S31), and then a counter j is initialized to show 0 (step S32). Thereafter, it is judged whether the key return line Rj of the keyboard matrix 22a is 1 or not (step S33). If Rj = 1, the transmission of logical key number is performed (step S34), and then the procedure moves to S35. If Rj ≠ 1, the procedure moves to S35 without performing the operation in S34. Subsequently, it is judged whether j is 7 or not (S35). If j ≠ 7, increment of j is performed (S36), and the procedure moves to S32. On the other hand, if j = 7, reading of R is completed, and the procedure returns to a point where the reading of R was called. More specifically, when scanning each key scanning line, by checking all the key return lines which can be connected to the key scanning line by the key switches so as to detect a return of a signal, the position of a key switch which is being depressed is detected. Further, the operation of the transmission of the logical key number in S34 will be explained with reference to Fig. 18. In the transmission of the logical key number, first, the keyboard ID is read from the keyboard ID storage area 27a (step S41). The transmitting operation is separated into S43 to S45 depending on the keyboard ID values, i.e., the types of keyboards (step S42). In S42, if the keyboard ID value is 00, the leading address of the conversion table t00 is selected (step S43). When the keyboard ID value is 01, the leading address of the conversion table t01 is selected (step S44). When the keyboard ID value is 02, the leading address of the conversion table t02 is selected (step S45). Subsequently, the values of the counters i and j are read (step S46), and a logical key number Kq corresponding to the key switch position CiRj is read from a selected conversion table t based on the values of the counters i and j. The read logical key number Kq is transmitted to the system device 1 (step S48) to complete the transmission of the logical key number, and the procedure returns to a point where the transmission of the logical key number was called. As described above, in a period during which the system device 1 and the keyboard device 2 are in an operative state, in the keyboard device 2, the keyboard output program 26b is always arranged to be in an infinite loop state. In this arrangement, the keyboard device 2 can transmit to the system device 1 a logical key number Kq corresponding to the detection of a key switch being depressed. Meanwhile, in the system device 1, the central processing unit 11 is interrupted upon the transmission of the logical key number Kq from the keyboard controller 21. The keyboard .input program 17b is a processing program for the interruption, and executed in the system 1. The keyboard input program 17b outputs a character code based on the logical key number Kq transmitted from the keyboard device 2. Referring now to Fig. 19, the following description will explain the operation of the keyboard input program 17b. First, when the keyboard input program 17b is activated, a logical key number Kq is read by the input/output device 16 (step S51), and a character code corresponding to the read logical key number Kq is selected from the conversion tables T stored in the conversion tables storage area 18b (step S52). The selected character code is stored in the character codes storage area 18a in the main memory 14 (step S53) to complete the keyboard input program 17b, and the procedure returns to a point where the keyboard input program 17b is called. As described above, in the keyboard device, a key scanning line (equivalent to the key scanning line C0 in this embodiment) for identifying the types of keyboards is provided, and a specific key ([F1] = key switch number G01) which can be connected to different key return lines according to the types of keyboards is arranged. In the keyboard controller, a plurality of key-switch-number to logical-key-number conversion tables corresponding to different keyboard ID values are provided. By instructing the user to select the above-mentioned specific key when the system is activated, a signal is returned from a key return line which varies according to the types of keyboards. It is therefore possible to distinguish the keyboards. Namely, it is possible to distinguish the keyboard ID by simply expanding a part of the keyboard matrix without additionally providing a special memory area in the keyboard. This structure allows a single keyboard controller to be compatible with more than one type of keyboards at low costs. Consequently, it is possible to provide an information processing apparatus capable of using more than one type of keyboards with a single keyboard controller without increasing the production cost. [Embodiment 2] The following description will explain another embodiment of the present invention with reference to Figs. 20 to 23. The structures having the same function as in the above-mentioned embodiment will be designated by the same code and their description will be omitted. The system structure of a personal computer of this embodiment is substantially the same as the system structure of the personal computer of Embodiment 1 shown in Fig. 2, and also supports three keyboards like Embodiment 1. These keyboards are the same as those explained in Example 1 in respect of the positional relationship of the characters printed on the top of the keys. In both of Embodiments 1 and 2, the keyboard matrix 22a of each keyboard has basically the same structure. As shown in Fig. 20, all of the keyboards include 8 key return lines R0 to R7, and 10 key scanning lines C0 to C9. The number of the key scanning lines in the keyboard matrix of Embodiment 2 is one line less than that in the keyboard matrix of Embodiment 1. However, the keyboard matrix of this embodiment has the same structure as the keyboard matrix of ordinary keyboards. Therefore, conversion tables t00' to t02' corresponding to the respective keyboard ID values are those shown in Figs. 21 to 23, respectively. More specifically, Embodiment 2 is the same as Embodiment 1 in respect of the structure that the logical key number K01 corresponds to the key [F1] used for distinguishing keyboards. However, the logical key switch number Gp corresponding to the logical key number K01, i.e., the key switch position CiRj, varies. When keyboards have keyboard ID values 00, 01 and 02, the logical key number K01 corresponds to the key switch numbers G01, G02 and G03, respectively. Hence, when the scanning of the key scanning line C0 is performed by the depression of the key [F1], a signal is returned from either of the key return lines R1, R2 and R3 depending on the type of the keyboard, thereby identifying the keyboard. The operation of detecting the keyboard performed when the power is supplied to the personal computer of Embodiment 2 can be explained by replacing the key return lines R0, R1 and R2 in the steps S14, S16 and S18 shown in Fig. 15 of Embodiment 1 with R1, R2 and R3, respectively, and by replacing the maximum number of i in S25 shown in Fig. 16 with 10. In this case, even if the mechanical and electrical structures of keyboards used are exactly the same, it is possible to distinguish the keyboards by changing the relationship between the key switch numbers Gp and the logical key numbers Kq in the conversion tables t. Therefore, for example, it is possible to produce keyboards having different key arrangements for individual countries by changing the characters printed on the top of the keys and providing corresponding conversion tables T and t. As described above, in Embodiment 2, unlike Embodiment 1, the logical key number corresponding to a predetermined key switch used for distinguishing keyboards is varied. This arrangement allows a single keyboard controller to be compatible with more than one type of keyboards without providing an additional part equivalent to the conventional memory area. Namely, in this arrangement, it is possible to provide an information processing apparatus capable of using more than one type of keyboards with a single keyboard controller without increasing the production cost. As explained in the section of Embodiments 1 and 2 above, in the information processing apparatus of the present invention, the keyboards 22 of different key arrangements can be connected to the keyboard device 2, and the specific key which is common to the respective keyboards 22 is positioned so that the key scanning line Ci is connected to the key return line Rj at the key switch position CiRj, which varies according to the types of keyboards 22, on the keyboard matrix 22a. Moreover, the types of the keyboards 22 are identified by detecting the position of a key switch which is being depressed, based on whether the key scanning line Ci is connected to the key return line Rj. In this structure, since the combination of the key scanning line Ci and the key return line Rj which are connected to each other when the specific key is depressed varies according to the types of keyboards 22, it is possible to obtain different signals from the respective keyboards 22. Consequently, the keyboards 22 can be distinguished based on the signals. Therefore, it is not necessary for the keyboard 22 to have a structure for identifying keyboard 22, for example, for outputting the keyboard ID. Namely, it is possible to provide an information processing apparatus capable of using more than one type of keyboards with a single keyboard controller without increasing the production cost (at low costs). Moreover, in order to output the logical key numbers K00 to K74, the keyboard controller 21 includes the data storage area 27 storing the conversion tables t (key-switch-number to logical-key-number conversion tables). the data storage area 27 stores a plurality of conversion tables t00 to t02 (conversion tables t) corresponding to the keyboards 22, respectively. The information processing apparatus of the present invention outputs the logical key numbers K00 to K74 corresponding to the key switch positions CiRj based on a conversion table t which is selected according to a signal which is obtained when the specific key is depressed. In this structure, the keyboard controller 21 uses either of the conversion table t00 to t02, corresponding to the detected keyboard type. Therefore, the depressed key is correctly converted into the corresponding character code according to the keyboard connected. Thus, a single keyboard controller 21 can be made compatible with a plurality of keyboards 22. In this case, in order to identify the keyboard, for example, such a program that causes the specific key to be depressed when the information processing apparatus is activated is operated. Furthermore, the information processing apparatus of the present invention outputs character codes corresponding to the logical key numbers K00 to K74 based on a conversion table T (logical-key-number to character-code conversion table) selected according to the type of the keyboard. In this structure, the transmission of signals between the keyboard device 2 and the system device 1 is standardized by the logical key numbers. Therefore, even if the keyboard device 2 has not only a different key arrangement but also a different physical arrangement of the keyboard matrix 22a, the keyboard device 2 can be connected to the system device 1 by converting signals through the conversion tables t and T. In addition, in the information processing apparatus of the present invention, the key scanning line Ci can be connected to any one of the key return lines Rj on the keyboard matrix 22a through only a key switch position CiRj corresponding to the specific key. In this structure, it is possible to locate the key switch corresponding to the specific key on different key switch positions according to the number of key return lines by only providing an additional key scanning line exclusively for the specific key. Namely, it is possible to distinguish the same number of keyboard ID values as the number of key return lines Rj. Moreover, in the information processing apparatus of the present invention, the key switch position CiRj corresponding to the specific key can be changed, and the conversion tables t are arranged so that the relationship between the logical key numbers K00 to K74 of the respective conversion tables t and the specific key becomes uniform. In this arrangement, by varying the key switch position CiRj corresponding to the specific key according to each keyboard, the same character code is obtained when the specific key is depressed, but the key switch position CiRj obtained by the depression of the specific key varies according to the types of keyboards. It is thus possible to distinguish keyboard ID.

Claims: A keyboard device including a keyboard (27) which includes a plurality of keys and a corresponding matrix of key switches (Gp), and is one of a plurality of keyboards with differing key arrangements, and a keyboard controller (21) which is operable to identify the particular keyboard installed in the device, characterized in that said keyboard controller is arranged to so identify the installed keyboard upon user-actuation of a specific function key common to all of said plurality of keyboards by determining the particular position, within the matrix, of the key switch operated by such key actuation, said position being unique to each of said plurality of keyboards. A keyboard device according to claim 1, wherein said keyboard has a plurality of key scanning lines (Ci) and a plurality of key return lines (Rj), said key switches being provided at respective intersections between said key scanning lines and said key return lines; and wherein said keyboard controller is arranged to provide logical key numbers corresponding to key positions on the keyboard. A keyboard apparatus comprising: a keyboard device according to claim 2; and a system device (1) for providing character codes corresponding to the logical key numbers. An information processing apparatus comprising a keyboard apparatus according to claim 3. An information processing apparatus according to claim 4, wherein said keyboard controller is arranged to identify the type of said keyboard by detecting which key return line is connected to the key scanning line corresponding to said specific key which has been actuated by depressing thereof. An information processing apparatus according to claim 4, wherein said keyboard controller comprises first memory means (27) storing a key-switch-number to logical-key-number conversion table (t00-t02) so as to output the logical key numbers. An information processing apparatus according to claim 6, wherein said first memory means stores a plurality of key-switch-number to logical-key-number conversion tables corresponding to said keyboards having different key arrangements. An information processing apparatus according to claim 7, wherein said keyboard controller is arranged to output logical key numbers corresponding to key switch positions based on one of said key-switch-number to logical-key-number conversion tables, which is selected according to a signal obtained by depressing said specific key. An information processing apparatus according to claim 4, wherein said system device comprises second memory means (18) storing a logical-key-number to character-code conversion table (T00-T02) so as to output the character codes. An information processing apparatus according to claim 9, wherein said second memory means stores a plurality of logical-key-number to character-code conversion tables corresponding to said keyboards having different key arrangements. An information processing apparatus according to claim 10, wherein said system device is arranged to output character codes corresponding to logical key numbers based on said logical-key-number to character-code conversion tables, which are selected according to types of said keyboards. An information processing apparatus according to claim 4, wherein the key scanning line corresponding to the specific key is connected to a said key return line on said keyboard matrix only at a key switch position corresponding to said specific key. An information processing apparatus according to claim 4, wherein the key switch position corresponding to said specific key is changeable.

Inventors: JOTO TAKUMA, SAKAI TAKESHI, JOTO, TAKUMA, SAKAI, TAKESHI
Applicants: SHARP KK, SHARP KABUSHIKI KAISHA
Application year: 1997
Main classification: G06F3
IPC codes: G06F3, H03M11