Key detection method

By employing staggered scan lines and output lines in the matrix keyboard circuit, and utilizing driving voltage signals with different frequency components and diode resistor design, the problems of inaccurate key detection and susceptibility to external interference in the prior art are solved, achieving more efficient and accurate key recognition.

WO2026081268A1PCT designated stage Publication Date: 2026-04-23SUZHOU ZHONGKE GUANGJU TECHNOLOGY CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
SUZHOU ZHONGKE GUANGJU TECHNOLOGY CO LTD
Filing Date
2024-11-07
Publication Date
2026-04-23

AI Technical Summary

Technical Problem

Existing matrix keyboard circuit designs are easily affected by the external environment when detecting keys, leading to false detections or failure to recognize keys. Furthermore, they require high-level input for each scan line, resulting in short detection times and inaccuracies.

Method used

A matrix circuit is formed by interleaved scan lines and output lines. The push-button switch is determined by passing drive voltage signals of different frequency components to the scan lines and continuously sampling the frequency component information of the voltage signal of the output line. Diodes and resistors are combined to prevent false detection.

Benefits of technology

It improves the accuracy and reliability of key detection, reduces latency, minimizes the impact of external environmental interference, simplifies the circuit structure, and helps to make the device thinner and lighter.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024130530_23042026_PF_FP_ABST
    Figure CN2024130530_23042026_PF_FP_ABST
Patent Text Reader

Abstract

A key detection method, executed by a key detection circuit, and comprising the following steps: S21, inputting driving voltage signals to first voltage ends of all scanning lines according to a preset mode, and continuously receiving voltage signals of voltage output ends of all output lines, wherein frequency components of the driving voltage signals inputted to different scanning lines are different; S22, sampling the voltage signals received from the voltage output ends to obtain frequency component information of the voltage signals of different voltage output ends; and S23, determining a triggered key switch on the basis of the frequency component information of the voltage signals. During key detection, the driving voltage signals can be simultaneously inputted to the scanning lines, and continuous sampling and detection can be performed for the output lines, thereby effectively ensuring the detection time, improving the detection accuracy, reducing the delay of key detection, and making the method less susceptible to external environmental influence to achieve more accurate detection results.
Need to check novelty before this filing date? Find Prior Art

Description

A key detection method

[0001] Priority information: This application claims priority to Chinese patent application No. 202411439915.2, filed on October 15, 2024, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This invention relates to the field of button detection technology, and in particular to a button detection method. Background Technology

[0003] With the development of technology, electronic devices have become increasingly diverse. In order to achieve human-computer interaction, electronic devices are usually equipped with buttons. For example, computers are often equipped with keyboards for typing, gaming, and other operations.

[0004] To receive key press information, it is necessary to accurately detect which key is pressed. To the applicant's knowledge, the most commonly used key detection circuit design currently employs a matrix keyboard design, which includes multiple scan lines and multiple output lines. The scan lines and output lines are coupled through the key switches. The scan lines and output lines are respectively connected to the chip's I / O interface. Since the scan lines and output lines can connect to the switches of multiple keys, by inputting a high level to different scan lines and detecting the level of the output lines, it is possible to determine which key(s) are pressed, thus achieving the detection of more key states with fewer I / O interfaces.

[0005] However, this circuit design still has some drawbacks. For example, it requires inputting a high level to each scan line individually. Only when the switch corresponding to the scan line with a high level is pressed can the key press be detected. Switches corresponding to scan lines without a high level will not be detected even if pressed. Currently, the time interval between two high-level inputs to the same scan line is usually shortened by reducing the time of each high-level input to ensure that keyboard operations can be reliably identified. However, the shorter the high-level input time of the scan line, the shorter the sampling time of the corresponding output line, which may lead to inaccurate detection. Furthermore, judging key operations by detecting the voltage magnitude may be affected by external environmental factors (such as static electricity), leading to false detections. In addition, since the time interval between unenergized scan lines is objectively present, in extreme cases, there may still be cases where keys cannot be identified.

[0006] The above content is only used to help understand the technical solution of this application and does not constitute an admission that the above is prior art.

[0007] Summary of the Invention

[0008] The purpose of this invention is to provide a key detection method to solve at least one technical problem pointed out in the background art.

[0009] To achieve the above-mentioned objective, in a first aspect, the present invention proposes a key detection method, wherein the key detection method is executed by a key detection circuit, the key detection circuit including multiple scan lines arranged at intervals and multiple output lines arranged at intervals, the multiple output lines and the multiple scan lines being arranged alternately to form a matrix circuit, the scan lines having a first voltage terminal and a second voltage terminal, the output lines having a voltage output terminal and multiple switching circuits respectively connected to the multiple scan lines, the switching circuit including a key switch;

[0010] The button detection method includes the following steps:

[0011] S21. Apply a driving voltage signal to the first voltage terminal of all the scan lines in a preset manner, and the frequency components of the driving voltage signals applied to different scan lines are different, and continuously receive the voltage signals of the voltage output terminals of all the output lines;

[0012] S22. Sample the received voltage signal from the voltage output terminal to obtain the frequency component information of the voltage signal from different voltage output terminals;

[0013] S23. Determine the triggered push-button switch based on the frequency component information of the voltage signal.

[0014] Furthermore, in step S21, the difference in the center frequency of the driving voltage signal supplied to the first voltage terminal of each scan line is not less than one percent of the highest sampling rate of the detection line.

[0015] Further, in step S21, applying a driving voltage signal to the first voltage terminal of all the scan lines in a preset manner includes the following steps:

[0016] A driving voltage signal is continuously applied to the first voltage terminal of all scan lines; or, a driving voltage signal is applied to the scan line according to a preset power-on cycle for each scan line, wherein the power-on cycle includes power-on time and non-power-on time, and within a certain period of time, all scan lines or at least two scan lines are simultaneously applied with driving voltage signals.

[0017] Further, step S23 includes the following steps:

[0018] S231. Identify the scan line of the driving voltage signal with the corresponding frequency component based on the frequency component information of the voltage signal at the voltage output terminal of the output line;

[0019] S232. Identify the push-button switch connected between the output line and the scan line that have the same voltage frequency components, which is the push-button switch that has been triggered.

[0020] Furthermore, the second voltage terminal is a ground voltage terminal, the scan line has a main line and multiple parallel branch lines connected to the main line, the main line has the first voltage terminal, the branch lines have the second voltage terminal, and each branch line is provided with a corresponding switch circuit;

[0021] A diode and a first resistor are connected in series between the connection point of the branch line and the main line and the second voltage terminal. The diode allows current to flow unidirectionally towards the first resistor. The diode can be a common diode or an LED used for keyboard backlighting. The switching circuit is connected to the portion of the branch line located between the diode and the first resistor; or...

[0022] A first resistor is provided between the connection point of the branch line and the main line and the second voltage terminal. The switching circuit is connected to the portion of the branch line located between the first resistor and the connection point of the branch line and the main line. It includes a diode connected in series with the push-button switch. The diode enables current to conduct unidirectionally towards the voltage output terminal. The diode is a general-purpose diode or a light-emitting diode.

[0023] Furthermore, the scan line has a main line and multiple parallel branches connected to the main line. The main line has a first voltage terminal, and the branches have a second voltage terminal. Each branch is provided with a corresponding switch circuit. The switch circuit is connected to the second voltage terminal of the branch. The switch circuit includes a diode connected in series with the push-button switch.

[0024] Secondly, the present invention proposes a key detection method, which is executed by a key detection circuit. The key detection circuit includes multiple scan lines arranged at intervals and multiple output lines arranged at intervals. The multiple output lines and multiple scan lines are arranged in an alternating matrix circuit. The scan lines have a first voltage terminal and a second voltage terminal. The key detection circuit includes light-emitting diodes for keyboard backlighting. The output lines have voltage output terminals and multiple switching circuits respectively connected to the multiple scan lines. The switching circuits include key switches.

[0025] The button detection method includes the following steps:

[0026] S1. Drive the LED to emit light as needed during the first time period t10;

[0027] S2. During the second time period t11, perform button detection;

[0028] S3. Repeat steps S1 and S2 in sequence;

[0029] In step S2, the key detection includes the following steps:

[0030] S21. Apply a driving voltage signal to the first voltage terminal of all the scan lines in a preset manner, and the frequency components of the driving voltage signals applied to different scan lines are different, and continuously receive the voltage signals of the voltage output terminals of all the output lines;

[0031] S22. Sample the received voltage signal from the voltage output terminal to obtain the frequency component information of the voltage signal from different voltage output terminals;

[0032] S23. Determine the triggered push-button switch based on the frequency component information of the voltage signal.

[0033] Furthermore, in step S21, the difference in the center frequency of the driving voltage signal supplied to the first voltage terminal of each scan line is not less than one percent of the highest sampling rate of the detection line.

[0034] Further, in step S21, applying a driving voltage signal to the first voltage terminal of all the scan lines in a preset manner includes the following steps:

[0035] A driving voltage signal is continuously applied to the first voltage terminal of all scan lines; or, a driving voltage signal is applied to the scan line according to a preset power-on cycle for each scan line, wherein the power-on cycle includes power-on time and non-power-on time, and within a certain period of time, all scan lines or at least two scan lines are simultaneously applied with driving voltage signals.

[0036] Further, step S23 includes the following steps:

[0037] S231. Identify the scan line of the driving voltage signal with the corresponding frequency component based on the frequency component information of the voltage signal at the voltage output terminal of the output line;

[0038] S232. Identify the push-button switch connected between the output line and the scan line that have the same voltage frequency components, which is the push-button switch that has been triggered.

[0039] Furthermore, the first time period t10 and the second time period t11 form a light emission cycle T2. In step S1, the light-emitting diodes are controlled to produce a light effect during the first time period t10, or a high level is continuously input to the first voltage terminal of all the scan lines to drive all the light-emitting diodes to continuously emit light. The first time period t10 is greater than or equal to the second time period t11.

[0040] Furthermore, the first time period t10 and the second time period t11 form a light emission period T2, and the duration of the light emission period T2 is less than or equal to 41.6 ms.

[0041] Furthermore, the second voltage terminal is a ground voltage terminal, the scan line has a main line and multiple parallel branch lines connected to the main line, the main line has the first voltage terminal, the branch lines have the second voltage terminal, and each branch line is provided with a corresponding switch circuit;

[0042] The branch line is also provided with a first resistor connected in series with the light-emitting diode. The light-emitting diode and the first resistor are sequentially arranged between the connection position of the branch line and the main line and the second voltage terminal. The light-emitting diode enables the current to conduct unidirectionally towards the first resistor. The switching circuit is connected to the portion of the scan line located between the diode and the first resistor.

[0043] Compared with the prior art, the present invention has the following beneficial effects: The key detection method of the present invention includes the following steps: applying driving voltages of different frequency components to the first voltage terminals of all the scan lines; receiving voltage signals from the voltage output terminals of all the output lines; sampling the received voltage signals from the voltage output terminals to obtain frequency component information of the voltage signals from different voltage output terminals; and determining the position of the pressed key based on the frequency component information of the voltage signals. Since driving voltage signals can be simultaneously applied to the scan lines during key detection, and the output lines can be continuously sampled and detected, the detection time is effectively guaranteed, which is beneficial to improving the accuracy of detection and reducing the delay of key detection. In addition, the detection of voltage frequency components is less susceptible to the influence of external environment (such as static electricity) than the detection of voltage magnitude, resulting in more accurate detection results. Attached Figure Description

[0044] Figure 1 is a circuit diagram of a key detection circuit according to an embodiment of the present invention.

[0045] Figure 2 is a circuit diagram of a key detection circuit according to an embodiment of the present invention.

[0046] Figure 3 is a circuit diagram of a key detection circuit according to an embodiment of the present invention.

[0047] Figure 4 is a timing diagram of energizing the scan line according to an embodiment of the present invention.

[0048] Figure 5 is a timing diagram of the energizing cycle of each scan line in one embodiment of the present invention.

[0049] Figure 6 is a timing diagram of the energizing cycles of each scan line in one embodiment of the present invention.

[0050] Figure 7 is a circuit diagram of a control circuit according to an embodiment of the present invention. In the figure, ordinary diodes are provided on the scan lines.

[0051] Figure 8 is a circuit diagram of a control circuit according to an embodiment of the present invention. In the figure, light-emitting diodes are provided on the scan lines.

[0052] Figure 9 is a schematic diagram of the circuit shown in Figure 8 to prevent false detection.

[0053] Figure 10 is a circuit diagram of a key detection circuit according to an embodiment of the present invention. In the figure, the switch circuit is provided with a second resistor.

[0054] Figure 11 is a timing diagram of one emission cycle according to an embodiment of the present invention.

[0055] Figure 12 is a circuit diagram of a control circuit according to an embodiment of the present invention.

[0056] Figure 13 is a schematic diagram of the key input device according to an embodiment of the present invention.

[0057] Figure 14 is a schematic diagram of the key input device according to an embodiment of the present invention. Detailed Implementation

[0058] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the specific embodiments of this application will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, it should be noted that, for ease of description, only the parts relevant to this application are shown in the accompanying drawings, not the entire structure. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this application.

[0059] The terms “comprising” and “having”, and any variations thereof, used in this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus.

[0060] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0061] Example 1

[0062] This embodiment proposes a button detection method, which is used to detect buttons and determine which button on the device is pressed.

[0063] The key detection method is executed by a key detection circuit, as shown in Figure 1. Figure 1 shows a key detection circuit of one embodiment, which includes multiple scan lines 10 and multiple output lines 11. The multiple scan lines 10 are arranged at intervals, and the multiple output lines 11 are also arranged at intervals, forming a matrix circuit by alternating the scan lines 10 and output lines 11. As shown in Figure 1, there are three scan lines 10 and three output lines 11. For ease of description, the three scan lines 10 from top to bottom are referred to as the first scan line 10a, the second scan line 10b, and the third scan line 10c, respectively, and the three output lines 11 from left to right are referred to as the first output line 11a, the second output line 11b, and the third output line 11c, respectively.

[0064] It should be noted that in this document, the terms "multiple," "more than," or similar expressions indicate a quantity of at least two; that is, "more" means two or more. Therefore, in other embodiments, the number of scan lines 10 and output lines 11 can be two or more than three. Furthermore, although the number of scan lines 10 and output lines 11 is the same in the illustrated embodiment, this is not mandatory. The number of scan lines 10 and output lines 11 can differ; for example, one may have two lines, and the other three, etc.

[0065] The output line 11 has a voltage output terminal 110 and multiple switch circuits 12 connected to multiple scan lines 10 respectively. The switch circuit 12 includes push-button switches. SW1 to SW9 marked in Figure 1 are push-button switches. The push-button switches correspond to the positions of the buttons (usually located below the buttons). When the button is pressed, the button will move down, thereby triggering the push-button switch to close and making the switch circuit 12 conduct. Conversely, when the push-button switch is released, the button resets and the push-button switch opens.

[0066] The scan line 10 has a first voltage terminal 100 and a second voltage terminal 101. There can be multiple second voltage terminals 101. For example, in the embodiment shown in FIG1, the scan line 10 includes a main line 102 and multiple branch lines 103 connected to the main line 102. The multiple branch lines 103 are arranged in parallel, and each branch line 103 is provided with a second voltage terminal 101. Multiple switching circuits 12 of the output line 11 are respectively connected to the branch lines 103 of the multiple scan lines 10, and each branch line 103 is correspondingly provided with a switching circuit 12. The first voltage terminal 100 is used to input a driving voltage signal. In some embodiments, referring to FIG1, a first resistor is provided between the connection point of the branch line 103 and the main line 102 and the second voltage terminal 101. R1 to R9 marked in the figure are the first resistors. In this embodiment, the second voltage terminal 101 is grounded, serving as a ground voltage terminal. The switch circuit 12 is connected to the branch line 103 at the connection point between the branch line 103 and the main line 102 and the first resistor. Optionally, referring to Figure 2, the switch circuit 12 also includes a diode connected in series with the push-button switch; D1 to D9 in the figure are the diodes. In some other embodiments, referring to Figure 3, the switch circuit 12 also includes a diode connected in series with the push-button switch, but in this embodiment, the second voltage terminal 101 is directly connected to the switch circuit 12 and is not a ground voltage terminal. In still other embodiments, referring to Figures 7 and 8, a diode and a first resistor are sequentially arranged in series between the connection point of the branch line 103 and the main line 102 and the second voltage terminal 101. The diode allows current to flow unidirectionally towards the first resistor, and the switch circuit 12 is connected to the branch line 103 at the portion between the diode and the first resistor.

[0067] It is understandable that when a push-button switch (e.g., SW1) is pressed and a high level is applied to the first voltage terminal 100 of the scan line 10 (e.g., the first scan line 10a) connected to it, the voltage output terminal 110 of the output line 11 (e.g., the first output line 11a) connected to the push-button switch will detect a voltage, which will also be reflected as a high level. The characteristics of the detected voltage (e.g., magnitude and frequency) are related to the characteristics of the voltage applied to the first voltage terminal 100, thereby determining which button has been pressed.

[0068] In this embodiment, the key detection method includes the following steps:

[0069] S21. Referring to Figure 4, drive voltage signals are applied to the first voltage terminals 100 of all scan lines 10 in a preset manner, and the frequency components of the drive voltage signals applied to different scan lines 10 are different, and the voltage signals of the voltage output terminals 110 of all output lines 11 are continuously received.

[0070] S22. Sample the voltage signal received from the voltage output terminal 110 to obtain the frequency component information of the voltage signal from different voltage output terminals 110;

[0071] S23. Determine the triggered push-button switch based on the frequency component information of the voltage signal.

[0072] The driving voltage signal can be, for example, a sine wave signal, a square wave signal, or other quadrature signals with a certain frequency. Since the voltage output terminal 110 of the output line 11 can only detect a voltage signal containing the corresponding frequency component when the push-button switch on the switching circuit 12 connected to the output line 11 and the scan line 10 is pressed, the frequency component of the voltage signal at the voltage output terminal 110 can be used to determine which push-button is pressed. In addition, since the triggered push-button switch is determined by detecting the frequency component of the voltage signal, multiple (at least two or even all) scan lines 10 can be simultaneously supplied with driving voltage signals without sequentially supplying them. When the same output line 11 detects voltage signals containing multiple different frequency components, it indicates that multiple push-button switches connected to different scan lines 10 have been pressed.

[0073] Specifically, step S23 may include the following steps:

[0074] S231. Identify the scan line 10 of the driving voltage signal with the corresponding frequency component based on the frequency component information of the voltage signal at the voltage output terminal 110 of the output line 11;

[0075] S232. Identify the push-button switch connected between the output line 11 and the scan line 10, which have the same voltage frequency components. This push-button switch is the triggered push-button switch. It is understood that the position information corresponding to each push-button switch and the scan line 10 and output line 11 has been pre-recorded and stored. Therefore, when the scan line 10 and output line 11 with the same voltage frequency components are known, the position information of the push-button switch can be obtained, and the triggered push-button switch can be identified. The position information of the push-button switch corresponds to the position of the button.

[0076] For example, driving voltage signals containing frequency components of 1kHz, 2kHz, and 3kHz are respectively applied to the first scan line 10a, the second scan line 10b, and the third scan line 10c. When the voltage output terminal 110 of the first output line 11a detects a voltage signal containing a frequency component of 1kHz, the push-button switch SW1 connected to the first output line 11a and the first scan line 10a can be located (indicating that the push-button switch SW1 is pressed), and the position information corresponding to the push-button switch can be obtained to determine the pressed button. When the voltage output terminal 110 of the first output line 11a detects voltage signals containing frequency components of 1kHz, 2kHz, and 3kHz, the push-button switches connected between the first output line 11a and the first scan line 10a, the second scan line 10b, and the third scan line 10c can be identified as SW1, SW4, and SW7, indicating that the push-button switches SW1, SW4, and SW7 are all pressed. The position information corresponding to the push-button switches SW1, SW4, and SW7 can be obtained to determine the pressed button. The button configurations for other output lines 11 can be deduced similarly.

[0077] Understandably, the aforementioned button detection method, by simultaneously applying driving voltage signals to multiple scan lines 10 and continuously sampling and detecting the output line 11, eliminates the need to sequentially apply driving voltage signals to the scan lines 10. Therefore, compared to sequentially applying high-level signals to the scan lines 10, it increases the time for each scan line 10 to receive the driving voltage signal, effectively ensuring detection time and improving detection accuracy. Furthermore, the frequency of the voltage is less susceptible to external environmental influences (such as static electricity) than its magnitude, further enhancing detection accuracy.

[0078] It is understood that applying a driving voltage to the first voltage terminal 100 of the scan line 10 in a preset manner can include various methods. In some embodiments, the preset method is to continuously apply a driving voltage signal to the first voltage terminal 100 of all scan lines 10. In this embodiment, since the driving voltage signal can be continuously applied and the output line 11 is continuously detected, the accuracy of button detection can be greatly improved, timeliness can be guaranteed, delay can be reduced, and the situation where no button operation is detected due to the time interval of applying the driving voltage signal will not occur, making it more reliable. In other embodiments, the preset method is to apply a driving voltage to the scan line 10 according to a preset power-on cycle for each scan line. The energizing cycles of each scan line 10 can be the same or different. The energizing cycle includes the energizing time and the non-energizing time. It can be understood that the voltage applied during the energizing cycle is a driving voltage signal with a certain frequency component. The energizing time included in the energizing cycle corresponding to each scan line 10 can be the same or different. Referring to Figures 5 and 6, the energizing cycles of the first scan line 10a, the second scan line 10b, and the third scan line 10c are T3, T4, and T5, respectively. In the embodiment shown in Figure 5, the durations of the energizing cycles T3, T4, and T5 are different, and the energizing time t within the energizing cycle of each scan line 10 is... 通 and the time without power t 断 Each accounts for half. In the embodiment shown in Figure 6, the durations of the power-on cycles T3, T4, and T5 are the same, and the power-on time t within the power-on cycle of each scan line 10 is equal. 通 It is much greater than the time t is not powered on. 断 This allows for a longer energizing time for the scan line 10, which is more conducive to improving the accuracy of button detection and reducing the delay in button detection. Further, optionally, when a driving voltage is applied to the scan line 10 according to a preset energizing cycle for each scan line, all scan lines 10 or at least two scan lines 10 are simultaneously energized with driving voltage signals within a certain time period.

[0079] Optionally, in step S21, the difference in the center frequency of the driving voltage signal supplied to the first voltage terminal 100 of each scan line 10 is not less than one percent of the highest sampling rate of the detection line, so that the frequency components of the voltage signal have a large difference, which facilitates accurate identification of the frequency component information of the voltage output terminal 110 and prevents confusion caused by the frequency of the driving voltage being too close.

[0080] Optionally, in step S21, the voltage output terminal 110 of the output line 11 is detected only after a preset time period following the application of the driving voltage signal to the scan line 10, so that the voltage at the output terminal 110 is more stable and the detection result is more accurate. Optionally, the length of the preset time period is greater than or equal to 30 microseconds, and further preferably greater than or equal to 50 microseconds, to ensure the accuracy of the detection result and avoid false detections caused by level jitter.

[0081] Optionally, in step S22, the frequency component information of the voltage signal at different voltage output terminals 110 is obtained by performing Fourier expansion on the sampled voltage signal.

[0082] To further improve the reliability of key detection, a diode that conducts unidirectionally towards the voltage output terminal 110 of the output line 11 can be connected in series in the circuit, as shown in Figures 2, 3, 7, and 8. The diode prevents current from flowing back towards the first voltage terminal 100 of the scan line 10. Taking Figures 7 and 8 as examples, a diode is also provided on the branch line 103 of the scan line 10. The diode and the first resistor are connected in series and are sequentially positioned between the connection point of the branch line 103 and the main line 102 and the second voltage terminal 101. D1 to D9 in Figures 7 and 8 represent the diodes. The diode allows current to conduct unidirectionally towards the second voltage terminal 101; that is, the current flowing into the first voltage terminal 100 flows into the positive terminal of the diode, then flows out from the negative terminal and through the first resistor. It can be understood that due to the unidirectional conduction characteristic of the diode, current cannot flow from its negative terminal to its positive terminal.

[0083] Because a diode is connected in series in scan line 10, the unidirectional conduction characteristic of the diode can be used to achieve the effect of preventing ghosting. For example, when button switches SW1, SW2 and SW4 are pressed simultaneously, the voltage output terminal of the first output line 11a can detect the voltage frequency of the first scan line 10a and the second scan line 10b, and the second output line 11b can detect the voltage frequency of the first scan line 10a. Due to the unidirectional conduction of the light-emitting diode D1, the current of the second scan line 10b cannot flow into the second output line 11b from the dashed line shown in Figure 9 (the dashed line in Figure 9 shows the path of the current flowing into the second scan line 10b), so that the voltage output terminal 110 of the second output line 11b detects a voltage with the same voltage frequency component as the second scan line 10b, thus preventing the button switch SW5 from being mistakenly pressed. It is understandable that when no light-emitting diode is set, the current may flow along the dotted line shown in Figure 9, causing both the first output line 11a and the second output line 11b to detect the voltage frequency components of the first scan line 10a and the second scan line 10b. In this case, the button switch SW5 that has not been pressed will be mistakenly judged as pressed. Therefore, the button detection circuit with diode can prevent false detection.

[0084] The diode can be a regular diode or an LED. A regular diode refers to a diode that does not emit light. The diode shown in Figure 7 is a regular diode, and the diode shown in Figure 8 is an LED. In some embodiments, the LED can illuminate the keys, thus serving as keyboard backlighting. Optionally, the LED is positioned corresponding to a key switch, for example, below the key. In some embodiments, the key is at least partially transparent; for example, the portion displaying the letters can be made transparent, allowing the LED to illuminate the corresponding letters. In some embodiments, the key can be completely transparent to present a crystal-clear appearance and enhance aesthetics. In some embodiments, the key is opaque, with a reflective surface on its inner wall (e.g., coated with a reflective coating) that reflects the light from the LED, illuminating the area below the key and creating a luminous effect around it.

[0085] Understandably, by inserting an LED in series into the key detection circuit, both ghost key prevention and key illumination can be achieved, thus simplifying the circuit structure and reducing costs. Simultaneously, the simplified circuit structure helps reduce the number of layers on the circuit board of the key output device, thereby reducing the thickness of the key input device and achieving a thinner and lighter electronic device.

[0086] When the diode is a light-emitting diode (LED), in the embodiments shown in Figures 2 and 3, current will flow through the corresponding LED only when the button switch is pressed and the corresponding scan line 10 is at a high level, thus enabling it to conduct. That is, the LED corresponding to the button will only emit light when the button is pressed. In the embodiment shown in Figure 8, regardless of whether the button switch is pressed, as long as the corresponding scan line 10 is supplied with a driving voltage signal, the LED can emit light under the control of the driving voltage signal, which is beneficial for achieving a constantly lit backlight effect or producing a lighting effect.

[0087] It is understandable that the shorter the actual light-emitting time of the LED within a certain period, the lower the brightness of the light actually observed by the human eye, thus affecting the backlight effect. Optionally, within one power-on cycle, the power-on time is greater than one-M times the power-on cycle, where M is the total number of scan lines 10 in the button detection circuit. On the one hand, this can increase the power-on time of the scan lines 10, ensuring the accuracy of detection. On the other hand, for embodiments where the LED lights up as long as the scan line 10 is supplied with a high level regardless of whether the button switch is pressed (e.g., the embodiments corresponding to Figures 8 and 10), the light-emitting time of the LED can be increased, increasing the brightness perceived by the naked eye. Further optionally, within one power-on cycle, the power-on time is greater than one-half of the power-on cycle to further improve the effect. Even more optionally, a driving voltage signal is continuously supplied to the first voltage terminal 100 of all scan lines 10 to maximize the power-on time of the scan lines 10, improve the accuracy of the detection results, reduce delay, and enable the LEDs in the embodiments corresponding to Figures 8 and 10 to continuously emit light.

[0088] The button detection circuit includes a chip. The first voltage terminal 100 and the voltage output terminal 110 are both connected to the chip's IO interface. The chip can input drive voltage signals to multiple scan lines according to the control signal and detect the voltage signal of the voltage output terminal 110 of the output line 11.

[0089] In some embodiments, the resistance of the first resistor is 100–1000 ohms, and the voltage at the first voltage terminal 100 is approximately 5V. Setting the resistance of the first resistor to 100–1000 ohms allows the current flowing through the LED to be 1–10mA, which meets the current requirements for most LEDs used in keyboards. In other embodiments, the voltage at the first voltage terminal 100 is approximately 3.3V. In this case, the resistance of the first resistor can be selected as 30–500 ohms to ensure reliable LED illumination.

[0090] The resistance value of the first resistor can be adjusted according to the actual current and voltage parameters required for the LED to operate normally, so that the LED can emit light reliably.

[0091] In some embodiments, as shown in FIG10, the switching circuit 12 further includes a second resistor connected in series with the push-button switch. R10 to R18 in FIG10 are the second resistors. The resistance value of the second resistor is greater than 0.2 times that of the first resistor, that is, the ratio of the resistance value of the second resistor to the resistance value of the first resistor is greater than 0.2, so as to ensure the reliability of the light-emitting diode emitting light during the button press process. It can be understood that in the embodiment shown in FIG8, when two or more push-button switches on the same output line 11 are pressed simultaneously, the first resistor corresponding to the pressed push-button switch will be connected in parallel. The resistance value after parallel connection is smaller than the resistance value of the individual first resistor, so that the resistance for voltage division with the light-emitting diode is smaller, and the current and voltage acting on the light-emitting diode will be larger. For example, referring to Figure 8, when a high level is input to the first voltage terminal 100 of the first scan line 10a, and SW1 and SW4 are pressed simultaneously, the resistance of the two first resistors connected in parallel will be only half of the original value, even if the resistance values ​​of the first resistors R1 and R4 are the same. Therefore, the current flowing through the light-emitting diode will increase, and the voltage acting on the light-emitting diode will also increase. The more buttons are pressed at the same time, the smaller the resistance value of the resistor that divides the voltage with the light-emitting diode will be. In this way, the light-emitting diode may be burned out due to excessive current flowing through it, or the brightness may be too high, shortening its service life.

[0092] This problem can be solved by setting a second resistor in series with the push-button switch in the switching circuit 12. In the embodiment shown in Figure 10, when multiple buttons on the same output line 10 are pressed simultaneously, the presence of the second resistor will result in a smaller decrease in the resistance of the resistor that ultimately divides the voltage with the LED. This ensures the stability of the current flowing through the LED when the button is pressed, reduces the current increase, and is beneficial for reliable LED illumination, resulting in a more consistent and stable illumination effect. It also helps to extend the LED's lifespan. For example, when the first voltage terminal 100 of the first scan line 10a is input with a high level, and push-button switches SW1 and SW4 are pressed simultaneously, the first resistor R1 is connected in parallel with resistors R10, R13, and R4. Since the resistance values ​​of resistors R10 and R13 are greater than 0.2 times the resistance values ​​of resistors R1 and R4, the parallel resistance value will be greater than the resistance value of R1 and R4 alone, reducing the current increase flowing through the LED.

[0093] To further ensure the stability of LED light emission, the resistance of the second resistor can be greater than or equal to 1, 2, 3, 4, 5, or more times the resistance of the first resistor. Optionally, the resistance of the second resistor is greater than or equal to twice the resistance of the first resistor, so that when the switch is pressed, the total current impact is less than 33%, the change in current flowing through the LED is smaller, and it will not cause significant optical and electrical effects on the LED, thereby effectively ensuring the stability of LED light emission and the reliability of its use.

[0094] Optionally, the resistance value of the second resistor shall not exceed 10 times the resistance value of the first resistor, because the detection input of the output line is generally in a high-impedance state. When the resistance at the detection end is too large, it will affect the accuracy of the detection value. Setting the resistance value of the second resistor to be less than 10 times the resistance value of the first resistor is beneficial to improving the accuracy of the detection value.

[0095] Optionally, the first and second resistors can be ordinary resistors, carbon ink resistors, silver paste printed resistors, or other resistors that can be used in thin film circuits.

[0096] The color of the light emitted by the LEDs is not limited; for example, it can be white, red, blue, or green. When a high level is continuously applied to scan line 10, the LEDs will continuously emit light, achieving a constant-on backlight effect. Optionally, all LEDs can emit light of the same color, or at least two LEDs can emit light of different colors. The colors of LEDs at different positions can be set as needed.

[0097] It is understood that in this embodiment, key detection can be performed according to steps S21 to S23 throughout the entire working process of the key detection circuit, without the need to set the first time period t10 in embodiment 2.

[0098] Example 2

[0099] This embodiment proposes a key detection method, which is executed using the key detection circuit with light-emitting diodes (circuits shown in Figures 8 and 10) as described in Embodiment 1. The relevant structure and parameters of the key detection circuit can be found in the description of Embodiment 1, and will not be repeated here. For ease of description, the key detection method in Embodiment 1 is referred to as the first key detection method, and the key detection method in Embodiment 2 is referred to as the second key detection method.

[0100] Referring to Figure 11, in this embodiment, the button detection method includes the following steps:

[0101] S1. Drive the LED to emit light as needed during the first time period t10.

[0102] S2. During the second time period t11, key press detection is performed.

[0103] S3. Repeat steps S1 and S2 in sequence.

[0104] The method for performing key detection in step S2 can refer to the key detection method in embodiment 1, that is, key detection includes the following steps:

[0105] S21. Drive voltage signals are applied to the first voltage terminals 100 of all scan lines 10 in a preset manner, and the frequency components of the drive voltage signals applied to different scan lines 10 are different, and the voltage signals of the voltage output terminals 110 of all output lines 11 are continuously received.

[0106] S22. Sample the voltage signal received from the voltage output terminal 110 to obtain the frequency component information of the voltage signal from different voltage output terminals 110;

[0107] S23. Determine the triggered push-button switch based on the frequency component information of the voltage signal.

[0108] Similarly, in step S21, the difference in the center frequency of the driving voltage signal supplied to the first voltage terminal 100 of each scan line 10 can be selected to be no less than one percent of the highest sampling rate of the detection line, so that the frequency components of the voltage signal have a large difference, which facilitates accurate identification of the frequency component information of the voltage output terminal 110 and prevents confusion caused by the frequency components of the driving voltage signal being too close.

[0109] Similarly, step S23 may include the following steps:

[0110] S231. Identify the scan line 10 of the driving voltage signal with the corresponding frequency component based on the frequency component information of the voltage signal at the voltage output terminal 110 of the output line 11;

[0111] S232. Identify the push-button switch connected between the output line 11 and the scan line 10, which have the same voltage frequency components; this push-button switch is the one that has been triggered.

[0112] In the second button detection method, all LEDs first emit light as needed during the first time period t10, such as remaining constantly lit, or creating breathing or flashing effects. Then, button detection is performed during the second time period t11. This increases the number of lighting modes and improves aesthetics. Simultaneously, during the second time period t11, drive voltage signals can be applied to all scan lines 10, and all output lines 11 can be detected. Therefore, the detection time for the voltage of the output lines 11 during button detection can be guaranteed, improving the reliability of the detection results during the second time period t11.

[0113] During the first time period t10, a high level can be input to the first voltage terminal 100 of all scan lines 10 according to the control signal to drive all light-emitting diodes to emit light according to the control signal, such as continuously emitting light or producing a lighting effect.

[0114] In some embodiments, during a first time period t10, a high level is continuously input to the first voltage terminal 100 of all scan lines 10 to drive all light-emitting diodes to emit light. It is understood that in this embodiment, the light-emitting diodes emit light continuously during the first preset time period t10 in order to maximize the brightness of the light emitted by the naked eye.

[0115] In other embodiments, during the first time period t10, the LEDs are controlled to create varying lighting effects by controlling the energizing method of the scan lines 10. For example, a high level is input to the first voltage terminal 100 of all scan lines 10 according to a control signal. The duration and sequence of the high level input can be set as needed. For example, a high level is input to each scan line 10 for a preset time according to a preset sequence, causing each LED to emit light as needed. For example, it can emit light sequentially or at intervals to produce diverse lighting effects. The LEDs can be controlled to emit light as needed, for example, by using PWM to control the LEDs to produce flashing or flowing light effects. Optionally, the first time period t10 is greater than or equal to the second time period t11, so that the second time period t11 is not too long. It is understood that when button detection is performed in the second time period t11, the LEDs will be continuously energized and illuminated. Setting the first time period t10 to be greater than or equal to the second time period t11 can prevent the second time period t11 from being too long, thereby improving the continuity of the lighting effect changes. Optionally, the time ratio of the first time period t10 to the emission period T2 is not less than 80%, to further reduce the length of the second time period t11, reduce the human eye's recognition of the emission during the second time period t11, and better ensure the continuity of the lighting effect changes. Even more optionably, the time ratio of the first time period t10 to the emission period T2 is not less than 90%. Even more optionably, the time ratio of the first time period t10 to the emission period T2 is not greater than 99.9%, to ensure that the second time period t11 has sufficient time for detection.

[0116] Optionally, the duration of the light emission period T2 is no more than 41.6ms, to ensure that under normal operation, the button press can be detected regardless of when the hand presses the button.

[0117] Understandably, keyboards use backlighting units to illuminate the keys. These units are located below the keys and emit light towards the side where the key is located. Generally, each key has its own backlighting unit. The backlight color can be monochrome or multi-colored. When the backlight color is monochrome, it can be white, red, green, blue, or other colors. In this case, the backlighting unit can consist of only one LED, which is connected in series in the circuits shown in Figures 8 and 10 to emit light. When the backlight color is multi-colored, richer color effects can be achieved. For example, the color can gradually change, making the backlighting effect more dazzling. In this case, the backlighting unit can include at least two LEDs that emit light of different colors. The LEDs of different colors can emit a single color or mix to emit a new color, thus making the colors richer.

[0118] Example 3

[0119] This embodiment introduces a key detection circuit with multi-color light emission effect.

[0120] The key detection circuit with multi-color light emission effect has a basically the same structure as the key detection circuit described above. The difference is that the light-emitting unit of the key detection circuit with multi-color light emission effect includes at least two light-emitting diodes (LEDs) of different colors. One of the LEDs is connected in series with the first resistor, allowing current to flow unidirectionally through the first resistor. It emits light under the drive of the signal applied to scan line 10. The other LEDs are controlled to emit light by other control circuits and can cooperate with the LED connected in series with the first resistor to produce various light emission effects. For ease of description, the LEDs in the light-emitting unit other than the LED connected in series with the first resistor are referred to as other LEDs.

[0121] In this way, by using the light-emitting diodes connected in series with the first resistor and other light-emitting diodes of different colors, a variety of colors can be produced, creating a more diverse light-emitting effect. Optionally, the light-emitting unit includes three light-emitting diodes, which emit red, green, and blue light (the three primary colors of light) respectively, thus allowing for the creation of virtually any color that the human eye can perceive.

[0122] In some embodiments, the light emitted by the LED connected in series with the first resistor is red. It is understood that, due to the need for key detection, the LED connected in series with the first resistor must be at a high level for a certain period, which means that the LED will inevitably light up during key detection, even if it is not required to light up during that time under a preset lighting control mode. Since the human eye is less sensitive to red light than other colors (blue and green), setting the color of the light emitted by the LED connected in series with the first resistor to red can reduce the visual attention drawn to the LED during key detection, thus not affecting the keyboard's lighting according to the predetermined lighting mode.

[0123] The key input device also includes a control circuit 3 for controlling the illumination of other LEDs. Each of the other LEDs is located in a separate control circuit, so that each LED can be independently controlled to emit light. In some embodiments, as shown in FIG12, the control circuit 3 includes a third resistor (R19 in the figure), a third voltage terminal 30 for inputting a driving voltage signal, and a fourth voltage terminal 31 for grounding. The LED (D10 in the figure) and the third resistor are connected in series between the third voltage terminal 30 and the fourth voltage terminal 31. Obviously, the positive terminal of the LED is close to the third voltage terminal 30, so that the LED can emit light under the voltage drive of the third voltage terminal 30.

[0124] The first voltage terminal 100, the third voltage terminal 30, and the voltage output terminal 110 are all connected to the chip's I / O interface. The chip inputs drive voltage signals to multiple scan lines 10 and detects the voltage signal at the voltage output terminal 110 of the output line 11. Simultaneously, the chip inputs a drive voltage signal to the third voltage terminal 30 according to control instructions to control the LEDs in the control circuit to emit light according to the control signals. It is understood that the number of chips is not limited to one; for example, more chips can be used when the number of I / O interfaces is insufficient. Furthermore, the button detection circuit and the control circuit 3 can share a chip or be set up with separate chips.

[0125] The specific structure of the key detection circuit can be found in the description above, and will not be repeated here.

[0126] Since the light-emitting unit includes at least two light-emitting diodes, in step S1 above, during the first time period t10, a driving voltage signal is input to the first voltage terminal 100 of the scan line 10 and the third voltage terminal 30 of the control circuit 3 according to the control signal, so as to control all the light-emitting diodes to emit light according to the control signal. The control signal can be issued by the processor of the electronic device, which can be the light-emitting control program built into the system, or it can be a corresponding control signal generated according to the control command issued by the user. After the chip receives the corresponding control signal, it inputs a high level to the scan line 10 and the third voltage terminal 30 according to the control signal, so that each light-emitting diode emits light at the required time.

[0127] During the second time period t11, in some embodiments, other light-emitting diodes are controlled to emit light (by applying a driving voltage signal) according to a control signal, thereby improving the continuity and brightness of the light-emitting display effect and covering the light emitted by the light-emitting diode connected in series with the first resistor. In other embodiments, other light-emitting diodes can also be controlled not to emit light (by not applying a driving voltage signal). Since the second time period t11 is relatively short, it has less impact on the light-emitting display effect and is more energy-efficient.

[0128] Example 4

[0129] This embodiment proposes a key input device, which performs key detection using the key detection method described above, or includes the key detection circuit described above. The key input device may be, for example, a keyboard.

[0130] The key input device includes a key circuit board, as shown in Figure 13. The key circuit board includes a first circuit board 40 and a second circuit board 41 arranged vertically and spaced apart, and a spacer layer 42 connecting the first circuit board 40 and the second circuit board 41. The first circuit board 40 is located above the second circuit board 41 and is provided with an output line 11 and a second resistor (if present). The second circuit board 41 is provided with a scan line 10, a light-emitting diode 46 and a first resistor (not shown in the figure). Conductive lines (e.g., silver paste lines) can be provided on the first circuit board 40 and the second circuit board 41 to form the scan line 10 and the output line 11.

[0131] A push-button switch is connected between a first circuit board 40 and a second circuit board 41, as shown in Figure 13. The push-button switch includes a first contact 430 located on the first circuit board 40 and electrically connected to the output line 11, and a second contact 431 located on the second circuit board 41 and electrically connected to the scan line 10. The two contacts are spaced apart from each other, and the spacer layer 42 has a cavity 420 for exposing the first contact 430 and the second contact 431. A reset element 44 and a button 45 are correspondingly arranged above the push-button switch. The reset element 44 can be made of elastic materials such as rubber or silicone. When the button 45 is pressed, the button 45 presses down the reset element 44 and the push-button switch, so that the first contact 430 and the second contact 431 are in contact, and the scan line 10 and the output line 11 are connected. When the button 45 is released, the button 45 is reset by the elastic force of the reset element 44, and the scan line 10 and the output line 11 are disconnected.

[0132] An LED 46 is disposed on the second circuit board 41. A clearance hole 400 is provided on the spacer layer 42 and the first circuit board 40 to expose the LED 46. The LED 46 is disposed within the clearance hole 400, and its light can be emitted towards the button 45. In some embodiments, the button 45 is provided with a light-transmitting area 450 made of transparent material. The light-transmitting area 450 can, for example, be consistent with the letters / graphics marked on the button 45, so that the light from the LED 46 can illuminate the letters / graphics, making it more aesthetically pleasing. The button 45 can also be made completely transparent; in this case, the portion of the button 45 other than the portion marked with letters / graphics forms the light-transmitting area 450 (i.e., the light-transmitting area 450 includes cases where the button 45 is partially transparent or completely transparent). In some other embodiments, referring to FIG14, a reflective layer 451 is provided on the inner surface of the button 45. The reflective layer 451 has a reflective surface that reflects the light of the light-emitting diode 46. The reflected light illuminates the area around the button 45, improving the aesthetics. In other embodiments, if the inner surface of the button 45 itself has a good reflective effect, the reflective layer 451 may not be provided, and the inner surface of the button 45 may be used directly as the reflective surface.

[0133] It is understandable that when the light-emitting unit includes multiple light-emitting diodes, the other diodes and the corresponding control circuits and the third resistor can be set on the second circuit board 41, or they can be set on the first circuit board 40.

[0134] Optionally, both the first circuit board 40 and the second circuit board 41 are thin-film circuits.

[0135] In this invention, only two circuit boards are needed to achieve the functions of anti-ghosting key detection and backlight display, which simplifies the structure of the circuit board, makes the circuit design of the key input device simpler, and the overall thickness of the circuit board can be reduced. In this way, the key input device can also be made smaller, which can effectively reduce the thickness of laptops and other products with high requirements for thinness and lightness, and improve product competitiveness.

[0136] Example 5

[0137] This embodiment proposes an electronic device that includes the key detection circuit described above or the key input device described above. The electronic device may be, for example, a mobile phone, laptop, desktop computer, game console, or other device with keys.

[0138] Example 6

[0139] This embodiment proposes a processor-readable storage medium for storing processor-executable instructions. When these instructions are loaded and executed by the processor, the key detection method described above can be implemented. It is understood that this processor-readable storage medium may be included within a key input device and / or electronic device. The processor may be, for example, a computer, an embedded system, or a single chip.

[0140] It should be noted that, in the absence of conflict, the various embodiments described herein can be combined with each other to obtain more implementation schemes.

[0141] The above are merely specific embodiments of the present invention, and any improvements made based on the concept of the present invention shall be considered within the scope of protection of the present invention.

Claims

1. A key detection method characterized by, The key detection method is executed by a key detection circuit, which includes multiple scan lines (10) arranged at intervals and multiple output lines (11) arranged at intervals. The multiple output lines (11) and multiple scan lines (10) are arranged in an alternating matrix circuit. Each scan line (10) has a first voltage terminal (100) and a second voltage terminal (101). Each output line (11) has a voltage output terminal (110) and multiple switch circuits (12) respectively connected to the multiple scan lines (10). Each switch circuit (12) includes a key switch. The button detection method includes the following steps: S21. Drive voltage signals are applied to the first voltage terminals (100) of all the scan lines (10) in a preset manner, and the frequency components of the drive voltage signals applied to different scan lines (10) are different, and the voltage signals of the voltage output terminals (110) of all the output lines (11) are continuously received. S22. Sample the voltage signal received from the voltage output terminal (110) to obtain the frequency component information of the voltage signal from different voltage output terminals (110); S23. Determine the triggered push-button switch based on the frequency component information of the voltage signal.

2. The key detection method of claim 1, wherein, In step S21, the difference in the center frequency of the driving voltage signal supplied to the first voltage terminal (100) of each scan line (10) is not less than one percent of the highest sampling rate of the detection line.

3. The key detection method of claim 1, wherein, In step S21, applying a driving voltage signal to the first voltage terminal (100) of all the scan lines (10) in a preset manner includes the following steps: A driving voltage signal is continuously applied to the first voltage terminal (100) of all scan lines (10); or, a driving voltage signal is applied to the scan line (10) according to a preset power-on cycle for each scan line (10), wherein the power-on cycle includes power-on time and non-power-on time, and within a certain period of time, all scan lines (10) or at least two scan lines (10) are simultaneously applied with a driving voltage signal.

4. The key detection method of claim 1, wherein, Step S23 includes the following steps: S231. Identify the scan line (10) of the driving voltage signal with the corresponding frequency component based on the frequency component information of the voltage signal at the voltage output terminal (110) of the output line (11); S232. Identify the output line (11) and scan line (10) connected to the same voltage frequency component. The button switch between the two buttons is the button switch that is triggered.

5. The key detection method according to any one of claims 1 to 4, wherein The second voltage terminal (101) is a ground voltage terminal. The scan line (10) has a main line (102) and multiple parallel branch lines (103) connected to the main line (102). The main line (102) has the first voltage terminal (100), and the branch lines (103) have the second voltage terminal (101). Each branch line (103) is provided with a corresponding switch circuit (12). A diode and a first resistor are sequentially connected between the connection point of the branch line (103) and the main line (102) and the second voltage terminal (101). The diode allows current to flow unidirectionally towards the first resistor. The diode is a common diode or a light-emitting diode used for keyboard backlighting. The switching circuit (12) is connected to the portion of the branch line (103) located between the diode and the first resistor. Alternatively, A first resistor is provided between the connection position of the branch line (103) and the main line (102) and the second voltage terminal (101). The switch circuit (12) is connected to the branch line (103) between the first resistor and the connection position of the branch line (103) and the main line (102). It includes a diode connected in series with the push-button switch. The diode allows current to conduct unidirectionally to the voltage output terminal (110). The diode is a general diode or a light-emitting diode.

6. The key detection method according to any one of claims 1 to 4, wherein The scan line (10) has a main line (102) and multiple parallel branch lines (103) connected to the main line (102). The main line (102) has a first voltage terminal (100), and the branch lines (103) have a second voltage terminal (101). Each branch line (103) is provided with a corresponding switch circuit (12). The switch circuit (12) is connected to the second voltage terminal (101) of the branch line (103). The switch circuit (12) includes a diode connected in series with the push button switch.

7. A key detection method characterized by comprising: The key detection method is executed by a key detection circuit, which includes multiple scan lines (10) arranged at intervals and multiple output lines (11) arranged at intervals. The multiple output lines (11) and multiple scan lines (10) are arranged in an alternating matrix circuit. Each scan line (10) has a first voltage terminal (100) and a second voltage terminal (101). The key detection circuit includes light-emitting diodes for keyboard backlighting. Each output line (11) has a voltage output terminal (110) and multiple switch circuits (12) respectively connected to the multiple scan lines (10). Each switch circuit (12) includes a key switch. The button detection method includes the following steps: S1. Drive the LED to emit light as needed during the first time period t10; S2. During the second time period t11, perform button detection; S3. Repeat steps S1 and S2 in sequence; In step S2, the key detection includes the following steps: S21. Drive voltage signals are applied to the first voltage terminals (100) of all the scan lines (10) in a preset manner, and the frequency components of the drive voltage signals applied to different scan lines (10) are different, and the voltage signals of the voltage output terminals (110) of all the output lines (11) are continuously received. S22. Sample the voltage signal received from the voltage output terminal (110) to obtain the frequency component information of the voltage signal from different voltage output terminals (110); S23. Determine the triggered push-button switch based on the frequency component information of the voltage signal.

8. The key detection method of claim 7, wherein, In step S21, the difference in the center frequency of the driving voltage signal supplied to the first voltage terminal (100) of each scan line (10) is not less than one percent of the highest sampling rate of the detection line.

9. The key detection method of claim 7, wherein, In step S21, applying a driving voltage signal to the first voltage terminal (100) of all the scan lines (10) in a preset manner includes the following steps: A driving voltage signal is continuously applied to the first voltage terminal (100) of all scan lines (10); or, a driving voltage signal is applied to the scan line (10) according to a preset power-on cycle for each scan line (10), the power-on cycle including power-on time and non-power-on time, and within a certain period of time, all scan lines (10) or at least two scan lines (10) are simultaneously applied with driving voltage signals.

10. The key detection method of claim 7, wherein, Step S23 includes the following steps: S231. Identify the scan line (10) of the driving voltage signal with the corresponding frequency component based on the frequency component information of the voltage signal at the voltage output terminal (110) of the output line (11); S232. Identify the push-button switch connected between the output line (11) and the scan line (10) having the same voltage frequency components, which is the push-button switch that has been triggered.

11. The key detection method according to any one of claims 7 to 10, wherein, The first time period t10 and the second time period t11 form a light emission cycle T2. In step S1, the light-emitting diodes are controlled to produce a light effect during the first time period t10, or a high level is continuously input to the first voltage terminal (100) of all the scan lines (10) to drive all the light-emitting diodes to continuously emit light. The first time period t10 is greater than or equal to the second time period t11.

12. The key detection method of claim 11, wherein, The first time period t10 and the second time period t11 together form a light emission period T2, and the duration of the light emission period T2 is less than or equal to 41.6 ms.

13. The key detection method according to any one of claims 7 to 10, wherein The second voltage terminal (101) is a ground voltage terminal. The scan line (10) has a main line (102) and multiple parallel branch lines (103) connected to the main line (102). The main line (102) has the first voltage terminal (100), and the branch lines (103) have the second voltage terminal (101). Each branch line (103) is provided with a corresponding switch circuit (12). The branch line (103) is also provided with a first resistor connected in series with the light-emitting diode. The light-emitting diode and the first resistor are sequentially arranged between the connection position of the branch line (103) and the main line (102) and the second voltage terminal (101). The light-emitting diode enables the current to conduct unidirectionally to the first resistor. The switching circuit (12) is connected to the portion of the scanning line (10) located between the diode and the first resistor.

Citation Information

Patent Citations

  • Keyboard scanning device as well as key matrix circuit and scanning method thereof

    CN102142846A

  • Matrix circuit and scan method

    CN103560796A

  • Computer keyboard key scan shared matrix with an individual LED per key

    CN104919400A

  • Scanning driving method for computer keyboard

    CN105306070A

  • Operation recognition device and method and intelligent terminal with device

    CN108132728A