GB2263990A - Method for detecting ghost keys - Google Patents

Method for detecting ghost keys Download PDF

Info

Publication number
GB2263990A
GB2263990A GB9301046A GB9301046A GB2263990A GB 2263990 A GB2263990 A GB 2263990A GB 9301046 A GB9301046 A GB 9301046A GB 9301046 A GB9301046 A GB 9301046A GB 2263990 A GB2263990 A GB 2263990A
Authority
GB
United Kingdom
Prior art keywords
keys
key
keyboard
ghost
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
GB9301046A
Other versions
GB2263990B (en
GB9301046D0 (en
Inventor
Cheng-Wen Chen
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Silitek Corp
Original Assignee
Silitek Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Silitek Corp filed Critical Silitek Corp
Publication of GB9301046D0 publication Critical patent/GB9301046D0/en
Publication of GB2263990A publication Critical patent/GB2263990A/en
Application granted granted Critical
Publication of GB2263990B publication Critical patent/GB2263990B/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M11/00Coding in connection with keyboards or like devices, i.e. coding of the position of operated keys
    • H03M11/003Phantom keys detection and prevention

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Input From Keyboards Or The Like (AREA)

Abstract

A method of detecting ghost keys on a keyboard in which the keyboard is column-wise scanned, and the results of the scan are entered to a template for reading comprises the steps of a) detecting whether more than two keys are depressed; b) if more than two keys are detected as being depressed, re-scanning said keyboard and comparing the results with the contents of said template; and c) if the results of said comparison indicate more than two keys are depressed, indicating that a ghost key state exists. Step b) may be repeated at least once before said ghost key state is indicated.

Description

METHOD FOR DETECTING GHOST KEYS The present invention relates to a method for detecting ghost keys, for example on a microcomputer keyboard.
It is well known that matrix keyboards can give rise to so-called ghost keys. This may occur when three keys are pressed, the three keys being at three of the vertices of a rectangle. When such key depressions take place the scanning arrangement, instead of recognising only the three keys which were actually depressed, also recognises a false key depression at the fourth vertex of the rectangle. This phenomenon is illustrated in Figure 1, where depression of the keys indicated with a dot will also give rise to a false indication of the key marked "X" being depressed.
Since the problem of ghost keys results from a sneak conduction path through the three corners of the rectangle which are actually closed by the key depression, and is due to the lack of isolation between the switches of the cross point encoder of a matrix keyboard, it has been proposed in the prior art to add a diode to each key. Such a keyboard, shown in Figure 2, prevents the creation of a ghost key but at the same time increases the cost of a keyboard substantially.
Alternatively a logical operation may be performed using the keys on the keyboard to diagnose whether a ghost condition is likely to have occurred. Such a logic operation may be performed using hard logic but is more commonly implemented using the microcomputer of the keyboard, since this is more economically viable. A first such method is disclosed in US Patent No. 4,420,744. In this the method is to choose two rows in the matrix and compare if each column in two columns is being pressed.
The comparison is repeated for each row until all combinations are compared. However this has the disadvantage of requiring a large number of diagnoses, and as a result the time taken is too long. If there are to many scanning lines, in other words, to many keys, then there may occur errors in diagnosis.
A second such method is disclosed in Taiwan Patent No.
7,7103,440 (Acer Incorporated). The method is: Crossshaped diagnosis method, using each row as the basis. When it is diagnosed that two keys are pressed at the same time, then ghost may occur. Diagnose if there are keys being pressed on the same column. If yes, beeps are sounded.
Wait for the condition to be cleared and scan again.
This second method is less time-consuming but the diagnostic method loops with the normal scanning program path so it wastes more program memory. Standard keyboards must have AT/XT and PS/2 compatibility and each key must have three sets of different codes SET1, SET2 and SET3.
The keys in the third set SET3 can be set individually.
For Acer keyboards, some functions are eliminated. This is due to the use of the insufficient 2K ROM program memory.
This method is also less flexible in changes (in the # area, only two keys can appear).
It is therefore an object of the invention to at least partially mitigate the above mentioned disadvantages in providing a fast and flexible method for detecting whether a ghost key condition exists. The method aims to give an accurate diagnosis within a short period of time.
According to the present invention there is provided a method of detecting ghost keys on a keyboard, said keyboard being column-wise scanned, and the results of the scan being entered to a template for reading, comprising the following steps: a) detecting whether more than two keys are depressed; b) if more than two keys are detected as being depressed, re-scanning said keyboard and comparing the results of the re-scan of said keyboard with the contents of said template; c) if the results of said comparison indicate more than two keys are depressed, indicating that a ghost key state exists.
Advantageously step b) above is repeated at least once before said ghost key state is indicated.
Conveniently each scanning or re-scanning of said keyboard uses a conventional keyboard scanning subprogram known per se.
Advantageously the indication of the ghost key state is produced substantially continuously until said ghost key state is eliminated.
Preferably the method further includes the step of continuing scanning of the keyboard after said ghost key state is indicated, to detect when said ghost key state is eliminated.
Conveniently the indication of the ghost key state comprises outputting an audible alarm.
The invention will now be described, by way of example, with reference to the accompanying drawings in which: - Figure 1 shows the currents of the ghost key in a matrix keyboard; Figure 2 shows a prior art circuit for eliminating the ghost key; Figure 3 shows a circuit diagram implementing the method of the present invention; Figure 4 shows an advantageous form of keyboard for use with the method of the present invention; and Figures 5-13 show a flow-chart for a keyboard incorporating the present invention.
In the Figures like reference numerals indicate like parts.
Please refer to Figure 3. Under normal conditions, that is no pressed key, every row is in the high state due to the addition of a pull-up resistor on the circuit as shown in Figure 3. Each scanning line can become LOW according to sequence. Based on sequential scanning, the scanning cycle is 8 lines per 4 ms, that is, scanning of 16 lines can be completed in 8 ms. There are 8 keys per column and 16 lines (rows) form 128 keys (8 x 16 = 128 keys) so that each scanning cycle is 8 ms.
When a key is pressed, the status of the read in column is "0" while the rest are "1". There are 8 keys in each row, that is 8 bits, so that if only one key is pressed, the whole is considered as without the GHOST key.
Exit from the diagnostic program and continue executing other programs. If there are more than two keys, the current status is stored in the template. Use the original scanning subprogram to scan each column again and perform logic and gate routines with the data stored in the template. Then diagnose and if the data has more than one key (that is two bits are "1"), then it is considered as the GHOST key. Continue scanning until all columns are finished and if none is found, the two pressed-key condition will exit the diagnostic program. Continue the execution.
If more than two keys are pressed (that is, more than two bits are "1"), then it is called GHOST key, stop the repeat character function immediately. Design a -500 ms timer so that beeps are generated every 500 ms (using the original repeat character timer function) and continue scanning. When the user pressed other keys that are not in the # area, characters can still be sent out and normal scanning procedure will continue after the GHOST keys is eliminated.
This invention has another special advantage, that is, if a single chip microcomputer with lesser I/O pins is used in designing the keyboard, then it only needs 14 scanning lines can control 112 keys.
As shown in Figure 4 (that is YO - YD), 16 scanning lines are absolutely needed to completely avoid the GHOST key in ordinary known technology but this invention can be used on 16 scanning lines. The CTRL (L), CTRL (R), ALT (R), and ALT (L) keys in Figure 4 are six special function keys. Based on the definition of the keyboard, the combination of any two keys with another key will not result in a GHOST key. Current technology using 13 or 14 scanning lines cannot comply with this requirement. 16 lines are needed absolutely. Whereas using this invention can easily fulfil this requirement.
Fig. 5 is a flow chart of the start program segment.
As the system was started, the read only memory and the program memory are tested in proper order, then the conditions of the pins are set and the buzzer control pin is shut off, then the time delay, the keys and LEDs of the keyboard are set and the start code is piled up in the buffer and the flag is set for repeat-action, and then the program judges the model of the system.If the system model is identified being of a XT mainframe, then the XT program (B) is executed; if the system model is identified being of an AT/PS2 mainframe, then the program immediately judges if there is any instruction given by the system to the keyboard? If there is an instruction given by the system to the keyboard, then the program stops scanning and code sending (C); if there is no any instruction given by the system to the keyboard, then the keyboard is judged if it was disabled? If the keyboard is judged been disabled, then the buffer is checked if there is any data stored? If the buffer is checked having data stored therein, then the program sends the code (E); if the buffer has no data, then the program starts scanning the keyboard (F).
Fig. 6 is a flow chart of the program segment of reading out and executing system instruction. As the subprogram of system instruction to keyboard is executed, it reads out the instruction code from the system. If the reading process fails, the program executes the subprogram (K) of judging keyboard disabled and then keep executing the next procedures. If the reading process is successful, the subprogram (M) of judging the instruction code to be a first or second instruction code. If a second instruction code is identified, the subprogram executes the command (L); if a first instruction code is identified, it is judged to be Fl or EF or not. If the instruction code is identified being F1 or EF, a repeat code is sent out, and the subprogram (K) of judging keyboard disabled is executed, and then the next procedures are followed.
If the instruction code is identified neither F1 nor EF, it is judged to be FE or not. If the instruction code is identified being FE, the last sending code is sent out; if the instruction code is identified not being FE, the answer back code FAH is sent out. If the process of code sending fails, the program reads in new instruction. If the repeat reading is successful, the subprogram (M) of judging the instruction code to be a first or second instruction code is executed, and then the next procedures are followed. If the repeat reading fails, the program executes the sub-program (N) of judging the instruction code to be F1 or EF or not, and then keep executing the next procedures. If the process of code sending is successful, the program judges the type of the instruction code to be a doubleset or single-set- instruction code.If the instruction code is identified being a double-set instruction code, a double-set instruction code flag is set, then the subprogram (K) of judging keyboard disabled is executed, and then the next procedures are followed. If the instruction code is identified being a single-set instruction code, the instruction is respectively executed, then the subprogram (K) of judging keyboard disabled is executed, and then the next procedures are followed.
Fig. 7 is a flow chart of the program segment of scanning the keyboard. As the scanning keyboard program segment is executed, the program firstly sets the master scan flag and scans one line and resets the LEDs, then judges if it is a master scan or skip scan? If the master scan flag was not set, then skip scan is deleted (0). Then, the program judges if there is any key switched? If there is no any key switched, the program executes the subprogram of comparison with original keys. If the comparison result indicates the same, namely, no any key is released, then the scan index is added with 1 and a next line is scanned, and then the program proceeds to the subprogram (H) and the next procedures continuously. If the comparison result shows a key released, the program immediately returns to delete the skip program.On the contrary, if there are keys switched, the keys are compared with the original keys, and the repeat-action speed processing program segment (G1) is executed if the comparison results indicates a repeat-action. The repeat-action speed processing program segment (Gl) is to reduce 1 from the repeat-action flag and judge the result if there is zero-reading. If non-zero reading is judged, the subprogram (I) of adding the scan index with 1 and scanning the next line is executed; if zero reading is judged, the buffer is checked if there is any data stored therein. If the buffer is checked being stored with data, the sbprogram (J) of setting repeataction and starting to wait time flag, and then the stabprogram (I) of adding the scan index with 1 and scanning the next line is executed.If the buffer is checked having no data stored therein, the key being switched is judged. If the key being switched is judged not a special key, the make code is put in the buffer, and then the subprogram (J) of setting repeataction and starting to wait time flag is executed.
If the comparison result is different, it means there is a new key Pressed, and the sub-program (G) of returning to deleting the skip program is executed.
Fig. 8 is a flow chart of the skip key clearing processing program segment. When entered the skip key clearing processing program segment, the program firstly calls the clear skip key scanning program, then proceeds to the skip key clear transfer, and then judges if there is any ghost key? If there is a ghost key, then the program judges if there is any repeat-action? If a repeat-action is identified, then the program proceeds to the code sending subprogram (R); if no repeat-action is identified, then the program proceeds to the subprogram (I) to add 1 to the scan index and scan the next line, and then proceeds to the next procedures. It there is no ghost key after the procedure of calling the clear skip key scanning program, the program sets the mother key and the related flag execute mother key subprogram (Z) then judges the model of the system. If the system is identified being of XT model, then the program searches the key code and proceeds to the subprogram (S) to judge any key pressed or released?and then to proceed to the next procedures; if the system is identified being of AT/PS2 model, then the program judges what mode? and searches the key code and then judges any key pressed or released? If there is a key released, then the program executes the subprogram (T); if there is a key pressed, then the program executes the subprogram (U).
Fig. 9 is a flow chart of the ghost key detecting program segment. When entered the ghost key detecting program segment, the-program saves the line status in the template, cancels the main scan flag, then the scan index points to the next line, and then the program calls the scan st:bprogram again and compares the new status with the template. The program saves original scan index if every line was compared and the comparison result showed less than two keys, then proceeds to the special function processing program segment. If less than 2 keys, then the program calls the scan subprogram again and keep proceeding to the next procedures. If there are two keys, then program saves the original scan index and calls the scan program again, and then compares the new status with the template.If there are still two keys, the program calls the scan subprogram again and keep proceeding to the next procedures. If there is only one key, the program proceeds to the special function processing program segment.
Fig. 10 is a flow chart of the key-released module judgment program segment. As any key is released, the program judges if the key is of module 3? If the key is identified of module 3, then the program judges if to send out a break code? If no break code is to be sent out, then the program judges if there is any key of the same array released? If there is any key of the same array released, then the program proceeds to the subprogram (S) to judge any key pressed or released and then proceeds to the next procedures; if there is no key of the same array released, then the program executes the subprogram (I) to add 1 to the scan index and scan the next line and then proceed to the next procedures.
If a break code is needed to be sent out after the module 3 has been identified, then the program puts the break code in the buffer, and then judges if there is any key of the same array released and proceeds to the next procedures. If a key is identified being not of module 3 as it was released, the program judges if it is a special key? If the key is identified being not a special key, then the program puts the break code in the buffer and then proceeds to the next procedures; if the key is identified being a special key, then the program calls the special key processing subprogram (X) and puts the break code in the buffer, and then proceeds to the next procedures.
Fig. 11 is a flow chart of the pressed module judgment program segment. As any key is pressed, the program judges if the key is of the module 3 or not.
If the key is identified being of the module 3, then the program judges if a repeat-action is required. If a repeat-action is not required, a respective key code is then put in the buffer, and then the buffer is checked.
If the buffer is checked being not full, then the program checks if there is any key of the same array pressed?, so as to make a calculation and set the repeat-action flag value and execute the subprogram (I) of adding 1 to the scanning index and scanning the next line. - If the buffer is checked being full, then the program a respective overflow indicator code is put to the buffer at the top, and then the program keeps searching if there is any key of the same array pressed? and proceeds to the next procedures.If a repeataction is required after the module 3 has been identified, the program judges if the repeat-action sound flag has been set? If the repeat-action sound flag has been set, the enable line of the buzzer is then plzlled to high for permitting the buzzer to make a sound, then the repeat-action enable flag is set and the key code is put in the buffer, and then the program proceeds to the next procedures. If the repeataction sound flag has not been set when a repeat-action is required after the module 3 has been identified, the program directly sets the repeat-action enable flag and puts the key code in the buffer and then proceeds to the next procedures.If the key being pressed is judged not being of the module 3, the program judges if it is a special key? If the key being pressed is not a special key, the program judges if the repeat-action sound flag has been set? and then proceeds to the next procedures; if the key being pressed is a special key, the program calls the special key processing program (W) and sets the special key repeat-action flag, then puts the key code in the buffer and then proceeds to the next procedures.
Fig. 12 is a flow chart of the novell/workstation processing subprogram (E), the code sending subprogram (R) and the novel subprogram (P). When entered the novell/workstation processing program segment, the novell/workstation processing program (E) is executed.
If a novell/workstation is identified, the program calls the novell subprogram (P); if not, the program calls the code sending subprogram (R) and then sends the code.
If the process of code sending fails, the keyboard scanning subprogram (F) is executed; if the process of code sending is successful, the program executes the time delay between codes and reduces 1 from the buffer flag, and then executes the keyboard scanning subprogram (F).
When entered the code sending subprogram (R), the subprogram judges what system the code is sent and executes the job, then sends out 8 information codes, and then judges if the system is of the model AT/PS2.
If the system is not the model AT/PS2, return to the code sending subprogram (R); it the system is the model AT/PS2, send out bit inspection flag value and then return to novell/workstation processing subprogram (E).
When entered novel subprogram (P), the novel subprogram sets novel counter 3 times and sets the time, then calls code sending subprogram (R) to see if there is any system instruction so as to send out the key code. If the process of sending out the key code is successful, the subprogram executes the time delay between codes (Q) and then keep executing the next procedures; if the process of sending out the key code fails, the subprogram reduces 1 from the novel counter, and then returns to call the code sending subprogram (R) and see if there is any system instruction if the novel counter has a non-zero reading, or returns to the novel/workstation processing subprogram (E).
Fig. 13 is a flow chart of the special function processing program segment. When entered the special function processing program segment, the program firstly sets CTRL, ALT, SHIFT, NUM LOCK flags, then judges if any mother key has been pressed? If no mother key is pressed, then the program judges if the lock out flag has been locked? If the lock out flag has been locked, then the program returns to the subprogram (Z) to set the mother key and the related flags; if the lock out flag is not locked, then the program continr3es.
If there is a mother key pressed after the setting of CTRL, ALT, SHIFT, NUM LOCK flags, then the program judges if there is any specific daughter key been pressed? If there is a specific daughter key 1-5 been pressed, then the program alters the repeat-action parameter; if either daughter key 6 or 7 was pressed, then the program alters the keyboard lock out flag; if the daughter key 8 was pressed, then the program alters the buzzer enable flag and the control line; if the daughter key 9 was pressed, then the program alters the repeat-action sound flag; if there is any undefined key been pressed, then the program repeats searching until a defined daughter key is pressed or a mother key is released. If there is no any daughter key been pressed, then the program keeps searching until a defined daughter key is pressed or a mother key is released. If a mother key is identified been released, then the program executes the subprogram (Z1) to judge if the lock out flag has been locked? and then proceeds to the next procedures.
From the above, we can see the operating flow-chart for the keyboard. Mostly used is the common original scanning path so it saves lots of program memory space. It also uses a special template and logic and gate process, then determines if more than two keys are stored to diagnose the GHOST. This way, based on the definition of the gate 0 + 0 = 0, 0 + 1 = 0, 1 + 1 = 1, the GHOST will only appear if 4 keys exist at the same time.
It is especially advantageous to add a diode to certain of the function keys, as shown in Figure 4. Using the method of the present invention, such a modified keyboard will not diagnose a ghost state even if three or more such keys were pressed continuously.
When three or more keys are pressed and a ghost key state is detected, the microcomputer, as described above, acts to switch off the repeat character function immediately. At the same time the timer setting acts to produce 500 millisecond beeps from the buzzer, while the scanning routine is continued until the ghost key is eliminated. Once elimination of the ghost key occurs, normal execution is resumed.
The invention has now been described with respect to one embodiment thereof. It will be clear to those skilled in the art that many modifications could be performed whilst remaining within the scope of the appended claims.

Claims (7)

CLAIMS:
1. A method of detecting ghost keys on a keyboard, said keyboard being column-wise scanned, and the results of the scan being entered to a template for reading, comprising the following steps: a) detecting whether more than two keys are depressed; b) if more than two keys are detected as being depressed, re-scanning said keyboard and comparing the results of the re-scan of said keyboard with the contents of said template; c) if the results of said comparison indicate more than two keys are depressed, indicating that a ghost key state exists.
2. A method of detecting ghost keys on a keyboard according to claim 1 wherein step b) is repeated at lest once before said ghost key state is indicated.
3. A method of detecting ghost keys according to claim 1 or 2 wherein each scanning or re-scanning of said keyboard uses a conventional keyboard scanning subprogram known per se.
A. A method of detecting ghost keys according to any preceding claim wherein indication of the ghost key state is produced substantially continuously until said ghost key state is eliminated.
5. A method of detecting ghost keys on a keyboard according to any preceding claim further including the step of continuing scanning of the keyboard after said ghost key state is indicated, to detect when said ghost key state is eliminated.
6. A method of detecting ghost keys on a keyboard according to any preceding claim wherein the indication of the ghost key state comprises outputting an audible alarm.
7. A method of detecting ghost keys on a keyboard substantially as described herein with reference to Figures 3-13 of the accompanying drawings.
GB9301046A 1992-02-07 1993-01-20 Method for detecting ghost keys Expired - Fee Related GB2263990B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US83238292A 1992-02-07 1992-02-07

Publications (3)

Publication Number Publication Date
GB9301046D0 GB9301046D0 (en) 1993-03-10
GB2263990A true GB2263990A (en) 1993-08-11
GB2263990B GB2263990B (en) 1995-05-03

Family

ID=25261485

Family Applications (1)

Application Number Title Priority Date Filing Date
GB9301046A Expired - Fee Related GB2263990B (en) 1992-02-07 1993-01-20 Method for detecting ghost keys

Country Status (2)

Country Link
CN (1) CN1030943C (en)
GB (1) GB2263990B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8159372B2 (en) 2007-10-16 2012-04-17 Microsoft Corporation Keyboard with plural key switch matrices to detect ghosting

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1075645C (en) * 1996-08-28 2001-11-28 旭丽股份有限公司 Method for extending functional key in keyboard
CN101257309B (en) * 2007-03-01 2011-11-30 达方电子股份有限公司 Input device and control method
CN101686060B (en) * 2008-09-25 2013-06-19 旭丽电子(广州)有限公司 Control circuit and configuration method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8159372B2 (en) 2007-10-16 2012-04-17 Microsoft Corporation Keyboard with plural key switch matrices to detect ghosting

Also Published As

Publication number Publication date
CN1075221A (en) 1993-08-11
GB2263990B (en) 1995-05-03
GB9301046D0 (en) 1993-03-10
CN1030943C (en) 1996-02-07

Similar Documents

Publication Publication Date Title
US4106011A (en) Keyboard circuit
US4922248A (en) Key output method for keyboards
US4599608A (en) Circuit preventing phantom input in a switch matrix
KR880000991B1 (en) Keyboard coding apparatus
US4591833A (en) Keyboard unit control system using block scanning techniques
US5220323A (en) Keyboard apparatus having ghost key sensing function
US4470038A (en) Shift control system for keyboards
GB2263990A (en) Method for detecting ghost keys
JPH01218126A (en) Keyboard
US5914677A (en) Apparatus and method for scanning a switch array
EP0229695B1 (en) A matrix switching apparatus for preventing pseudo input
GB2263991A (en) Computer keyboard
JPS5818650B2 (en) keyboard input device
US3846758A (en) Electronic keyboard including program memory means and program selecting means
JP2839304B2 (en) Keyboard device
EP0292238B1 (en) Data input device having switch matrix scanning means
JPH0426129B2 (en)
US5583498A (en) Input device
JP3017192B1 (en) N-key rollover keyboard system
KR900000604B1 (en) Processing control circuit of key input data
JPS63149717A (en) Detecting system for depressed key
GB2221071A (en) Electronic keyboard
JPH0667782A (en) Key input device
JPH0470647B2 (en)
JPS62239222A (en) Keyboard input device

Legal Events

Date Code Title Description
PCNP Patent ceased through non-payment of renewal fee

Effective date: 20000120