Keyboard for early warning of hot plug shaft seat contact degradation by key by key

CN123017775APending Publication Date: 2026-10-30INSITE (JIANGXI) ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611227934.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-13
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0007]针对热插拔键盘的闭合回路中多处接触电阻串联、普通压降测量不能把退化归因到轴座界面的问题,本发明提供一种热插拔轴座接触退化逐键预警的键盘

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123017775A_ABST
    Figure CN123017775A_ABST
Patent Text Reader

Abstract

The application relates to a keyboard input device, and discloses a keyboard capable of early warning of contact degradation of a hot plug shaft seat. Each plug-in position of the shaft seat is provided with a load contact and a sensing contact which are electrically insulated from each other and contact the same shaft body pin. After a key is closed and enters a stable period, a controller applies a diagnostic current through the load contact, obtains a first voltage drop between nodes on the circuit side of the load contact and a second voltage drop between the two pins of the shaft body, respectively, and determines the resistance of the shaft seat interface according to the difference between the two voltage drops. The controller saves a reference amount for the key position, judges the trend of only qualified samples belonging to different key closing events, and outputs early warning of the corresponding key position when the degradation criterion is continuously met. The scheme can weaken the influence of internal contact fluctuation of the shaft body on the judgment of the shaft seat, and facilitate positioning of the shaft seat needing maintenance before the key fails.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of keyboard input devices and low resistance measurement technology, specifically to a keyboard that can distinguish between the internal contact resistance of the switch and the contact resistance of the hot-swappable switch interface during normal key use, and provides a warning of contact degradation at the key position. Background Technology

[0002] Hot-swappable mechanical keyboards allow users to replace switches without soldering. The two metal pins of the switch are inserted into the switch housing, where they are held and electrically connected by a spring. Repeated insertion and removal, wear on the pin plating, dust ingress, and relaxation of the spring all cause changes in the number and location of contact points. In the early stages of contact degradation, the keys are usually still detectable by the scanning circuit, only occasionally missing detection when the pressing direction, temperature, or vibration conditions change. By the time the fault manifests as continuous key breakage, the switch housing often needs to be replaced.

[0003] Existing keyboard testing equipment applies a constant current to the key contacts at the production or repair station, using the voltage drop to determine if a key is open-circuited, short-circuited, or has poor contact. Other equipment uses four-wire measurement to reduce errors caused by the resistance of the test leads. These devices measure the entire closed circuit seen from the keyboard interface. For hot-swappable keyboards, this circuit connects at least the first switch-pin interface, the fixed and moving contacts inside the switch body, and the second pin-spin interface. The bounce of the contacts inside the switch, changes in actuation force, or contact contamination will also alter the voltage drop. Simply observing the overall resistance increase is insufficient to determine whether maintenance is needed on the switch itself or the switch housing soldered to the circuit board.

[0004] Another structural approach involves adding springs or contact points to the shaft terminals to increase clamping force and reduce initial contact resistance. Multiple contact points typically belong to the same metal terminal and are electrically equipotential. This structure can delay poor contact, but it cannot indicate which key's shaft has begun to degrade during use. If analog sampling is added directly to the row and column scan lines, the scanning switch on-resistance, power supply variations, and changes in contacts within the same shaft will still couple to the measurement results.

[0005] In actual maintenance, replacing the switch body is easy, but repairing the switch holder requires disassembling the keyboard and soldering it. If the degradation cannot be attributed to the switch holder before the malfunction occurs, the user may repeatedly replace the switch without resolving the problem, or mistake a single contact bounce for a damaged switch holder.

[0006] Therefore, the problem of multiple contact resistances connected in series in the closed loop of a hot-swappable keyboard, and the inability of ordinary voltage drop measurements to attribute degradation to the hinge interface, are technical problems that urgently need to be solved. Summary of the Invention

[0007] To address the problem that multiple contact resistances are connected in series in the closed loop of a hot-swappable keyboard, and that ordinary voltage drop measurements cannot attribute degradation to the switch interface, this invention provides a keyboard with key-by-key warning for hot-swappable switch contact degradation.

[0008] The keyboard includes a circuit board, a keyboard controller, a measurement switching circuit, and multiple key units. Each key unit includes a detachable switch and a key housing that plugs into two pins of the detachable switch. The two insertion points of the key housing are respectively provided with a load contact and a sensing contact. The load contact and the sensing contact within the same insertion point contact the same pin, but they remain electrically insulated within the key housing and on the circuit board. The load contact is connected to the key scanning circuit, bearing the key scanning current and diagnostic current; the sensing contact is connected to the differential sampling circuit, and the current flowing through the sensing contact during sampling is no greater than one-thousandth of the diagnostic current.

[0009] When a key is pressed and passes through the debouncing interval, the keyboard controller selects a stable contact period before the key is released. During this period, the measurement switching circuit connects the diagnostic current to the two load contacts of the key. The diagnostic current flows sequentially through the contact interface between one load contact and the pin, the closed path inside the switch, and the contact interface between the pin and the load contact on the other side. The differential sampling circuit obtains the first voltage drop between the circuit-side nodes of the two load contacts, and simultaneously obtains the second voltage drop between the two pins via the two sensing contacts.

[0010] Since the input current of the sensing branch is much smaller than the diagnostic current, even if there is contact resistance between the sensing contact and the pin, its voltage drop is negligible relative to the diagnostic current path. The first voltage drop includes the voltage drop at the two load interfaces and the voltage drop within the shaft's internal path, while the second voltage drop mainly corresponds to the voltage drop within the shaft's internal path. By subtracting the second voltage drop from the first voltage drop in the same key closure event, and then combining it with the diagnostic current, the shaft interface resistance of the corresponding key can be obtained. This value refers to the combined contact resistance between the two load contacts and the corresponding pin, without forcibly separating the two interfaces into a single-ended result.

[0011] The keyboard controller stores a reference value for the interface resistance of the key bearing and event samples for each key position. Multiple sampled values ​​within a single key closure event form only one event sample, and are only included in trend judgment if the voltage drop fluctuation does not exceed the stability limit and the key is not released prematurely. The controller compares the event samples belonging to multiple key closure events with the reference value of the corresponding key. When the increment continuously meets the degradation criterion, it controls the prompt unit of the corresponding key to output a warning.

[0012] In one implementation, the load contact and the sensing contact are composed of two separate, elastic metal sheets, each with an independent soldered end extending from the bottom of the bearing. The two metal sheets abut against the pin at different positions around the pin, with an insulating rib between them. This arrangement avoids the sensing branch sharing the diagnostic current and also allows each of the two contacts some space for elastic displacement.

[0013] In one implementation, the keyboard controller applies diagnostic currents in opposite directions sequentially during the same contact stabilization period. A first and second voltage drop are obtained in each direction, and the signs of the voltage drops are unified according to the current direction. The average of the shaft interface resistance obtained in both directions can mitigate the effects of amplifier offset voltage, thermoelectric potential, and analog-to-digital conversion zero-point offset.

[0014] In one implementation, the contact stabilization period occurs after debouncing confirmation and before button release. During this period, the controller acquires multiple voltage drops. If the range of the first or second voltage drop exceeds the stabilization limit, or if the button is released before the end of sampling, no event sample is generated for this closure event; otherwise, the median of the multiple sets of bearing interface resistance values ​​is used as the representative value for the event.

[0015] In one implementation, the circuit board includes a calibration resistor and a temperature sensing element. A measurement switching circuit switches the diagnostic current to the calibration resistor according to the measurement cycle, and the controller adjusts the current source amplitude accordingly. The temperature sensing element provides the board temperature of the area where the button is located; the controller converts the event sample to a reference temperature and then compares it with the reference value.

[0016] In one implementation, when the controller detects that the shaft has changed from disconnected to inserted, or receives a maintenance reset command after shaft replacement, it sets the corresponding key position to the reference state to be established. After accumulating a predetermined number of qualified event samples, a reference quantity is formed using robust statistical values. After an early warning is output, the reference quantity remains unchanged to prevent degenerate values ​​from being slowly absorbed into the reference and causing the early warning to disappear on its own.

[0017] In one implementation, the degradation criteria are divided into observation criteria and maintenance criteria. The observation criteria use a lower incremental threshold and a longer event observation window to indicate that the hinge contact has deviated from its post-assembly state; the maintenance criteria use a higher incremental threshold to confirm that the contact is approaching the risk of missed detection within a smaller number of events. The per-key illumination device can be reused with the keyboard's original backlight, distinguishing the two levels with different blinking sequences.

[0018] The prompt unit reuses the key-by-key backlight device, which means that the keyboard controller calls the existing backlight device of the target key when a warning is issued, without setting up a separate warning light that occupies the keyboard surface; normal backlight display and warning flashing are distinguished by different timing sequences.

[0019] In one implementation, the measurement switching circuit also has a sensing branch self-test state. In this state, the diagnostic current is disconnected from the two load contacts, and the current-limiting branch provides a small self-test current to the sensing contacts. If the self-test response is outside the path range, the controller records a sensing branch fault and does not update the bearing interface resistance. This avoids mistakenly writing open-circuit sensing contacts or analog switch faults into the bearing degradation record.

[0020] In one implementation, a diagnostic session ends before the next scan stimulus arrives. If another key is newly closed during a stable period, the controller pauses the current diagnostic and continues normal scanning and reporting. Diagnostic scheduling only occupies a short time gap after an existing key is closed and does not change the conditions for key code generation.

[0021] In one implementation, the controller key positions store a reference value, several recent event samples, and an alert level. The maintenance report is output via the keyboard communication interface and includes at least the key coordinates, the increment relative to the reference value, and the alert level. The keyboard can still be used as a regular input device, and the maintenance report is read via a separate query command.

[0022] This invention treats the voltage drop within the shaft's internal path during the same key press event as a common factor in the current measurement, rather than considering the shaft resistance as a fixed value. After this common factor is subtracted from the first voltage drop including the shaft interface, the influence of pressing force and the state of the internal contacts on the result is reduced, making the target of the shaft warning more clearly defined.

[0023] Trend analysis uses button closure events as the counting unit, rather than analog-to-digital conversion sampling points. Multiple relevant spikes during a single press can only affect one event sample, and unstable events are discarded. This reduces continuous false counts caused by touch bounce while preserving early degradation sensitivity.

[0024] Key-by-key reference, reference freeze, and position indication ensure a one-to-one correspondence between maintenance results and actual bearings. For faults requiring only bearing replacement, the first and second pressure drops will change similarly, and the differential will not necessarily increase. For keys where the bearing load interface gradually deteriorates, the differential accumulates across independent events, and the indication unit points to that key. Maintenance personnel no longer need to disassemble and solder each key individually for troubleshooting. Attached Figure Description

[0025] Figure 1 This is a schematic diagram of the overall structure of a keyboard according to an embodiment of the present invention.

[0026] Figure 2 This is an exploded view of the button unit according to an embodiment of the present invention.

[0027] Figure 3 This is a schematic cross-sectional view of a single insertion point of a bearing seat according to an embodiment of the present invention.

[0028] Figure 4 This is a schematic diagram of the wiring topology of the load channel and the sensing channel according to an embodiment of the present invention.

[0029] Figure 5 This is a schematic diagram of the measurement switching state according to an embodiment of the present invention.

[0030] Figure 6This is a schematic diagram of the scanning and measurement timing within a button closure event.

[0031] Figure 7 This is a schematic diagram of the swimlane for the bond-by-bond degradation judgment and processing according to an embodiment of the present invention.

[0032] Figure 8 This is a schematic diagram of the key state storage grid according to an embodiment of the present invention.

[0033] Figure 9 This is a schematic diagram of a partial arrangement of the load contact and the sensing contact according to an embodiment of the present invention.

[0034] Figure 10 This is a schematic diagram of the self-test and early warning output sequence of the sensing branch according to an embodiment of the present invention. Detailed Implementation

[0035] The structure and operation of the present invention will be further described below with reference to the accompanying drawings to make the measurement boundaries, data specifications, and anomaly handling of the present invention clearer. The specific numerical values ​​below are illustrative examples used to illustrate calculations and parameter relationships and do not constitute a limitation on the scope of protection of the present invention. The described embodiments are only for explaining the present invention and are not intended to limit the present invention; without changing the two measurement channels and their differential relationship, the component model, number of keys, and communication method can be adjusted according to product conditions.

[0036] like Figure 1 As shown, the keyboard 100 includes a circuit board 110, a keyboard controller 120, a measurement switching circuit 130, a key-by-key prompting unit 140, and multiple key units 200. Only some keys are shown in the figure; the unshown keys use the same connections. The keyboard controller 120 can be a microcontroller with a multiplexer and timer. Key scanning, USB or wireless keycode reporting are mature technologies in the keyboard field; this manual only describes the connections and timings related to the determination of switch contact degradation.

[0037] The detachable shaft 210 in the button unit 200 has a first pin 211 and a second pin 212. The shaft seat 220 is correspondingly provided with a first insertion position 221 and a second insertion position 222. The first insertion position 221 is provided with a first load contact 231 and a first sensing contact 241, and the second insertion position 222 is provided with a second load contact 232 and a second sensing contact 242. The two load contacts can be collectively referred to as load contacts 230, and the two sensing contacts can be collectively referred to as sensing contacts 240. The insulating base 250 ensures that the two contacts in the same insertion position do not contact each other when the shaft is not inserted, and abut against the same pin when inserted.

[0038] The keyboard described in this invention refers to an input device that generates electrical input using detachable key switches and has multiple independent keys. A detachable key switch refers to a key switch whose two conductive pins can be pulled out of the switch housing and reinserted without disassembling the soldered connection. A switch housing refers to an insulating connector fixed to a circuit board and receiving the two pins with elastic contacts.

[0039] The load contact, as referred to in this manual, is the shaft contact that carries the main circuit current during normal scanning or diagnostics. The sensing contact is another shaft contact that is electrically insulated from the load contact and connected to the high input impedance sampling terminal. High input impedance does not refer to a single nominal resistance value, but rather to a threshold where the input current in the sensing branch during sampling does not exceed one-thousandth of the diagnostic current. When the diagnostic current is 2.00 mA, the total input current in the sensing branch should not exceed 2.00 μA; in practice, an instrumentation amplifier with an input bias current of 50 nanoamps or less can be selected.

[0040] A key press event refers to the period from when the same key transitions from a stable open state to a closed state after debouncing confirmation, until the key becomes stable open again. Multiple analog-to-digital samplings can be performed within a single event, but only one event sample is formed. If the key is pressed again after being released, even if the interval between the two presses is very short, it is treated as two separate events. These event boundaries are defined by the scanning state machine and do not rely on the user's subjective judgment of the press duration.

[0041] The bearing interface resistance is a combined estimate of the contact resistance between the first load contact 231 and the first pin 211, and the contact resistance between the second pin 212 and the second load contact 232. This value does not include the resistance of the closed-circuit path inside the shaft, which is observed by both measurement channels. When the contact spots are unevenly distributed, the interface resistances at the two locations need not be equal, and this invention does not infer the precise resistance of either end based on a single composite value.

[0042] The baseline value is a reference value obtained by taking the median or truncated average of several qualified event samples for a key position after the switch is inserted and the baseline is established. The baseline value is stored separately for each key position and is not replaced by a uniform constant for the entire keyboard. The increment of the event sample is the difference between the event sample converted to the same baseline temperature and the baseline value for that key position. When the increment is less than zero, the original value can be retained for status observation, but it is treated as zero during degradation counting to avoid negative random fluctuations offsetting positive degradation events that have already occurred.

[0043] The degradation criterion refers to a measurable judgment condition defined by the increment of the event sample relative to the baseline quantity and the number of independent closed events. Different increment thresholds and event numbers are used for the observation and maintenance levels; the specific ranges and calibration methods are explained below. The contact stability period refers to the sampling interval after debouncing confirmation and before button release, provided that the voltage drop fluctuation within the event meets the stability limit.

[0044] Figure 2 The exploded view of the button unit 200 is shown. The first pin 211 and the second pin 212 are inserted downwards into the bearing seat 220. The soldered end of the load contact 230 is connected to the button scanning circuit, and the soldered end of the sensing contact 240 is connected to the differential sampling circuit 300. The bearing seat 220 can be injection molded from an insulating material resistant to soldering temperatures, with the four contacts respectively inserted into mutually spaced slots. Unlike ordinary dual-contact terminals, the load contact and sensing contact at the same insertion position are not connected in the finished product via a common strip.

[0045] like Figure 3 As shown, the first insertion point 221 can form two offset spring slots in the insulating base 250. The first load contact 231 applies the main clamping force from one side of the pin, and the first sensing contact 241 lightly presses the pin from the other side or adjacent side. The free ends of the two contacts are circumferentially separated by 40 to 140 degrees, typically 90 degrees. The lower limit of this range is used to maintain the insulation gap, and the upper limit is used to prevent the two contacts from losing contact simultaneously when the pin is misaligned. For narrower pins, an axial offset of one in front of the other can also be used, provided that the two contacts are still led out separately.

[0046] The load contact 230 can be made of phosphor bronze sheet with a thickness of 0.12 mm to 0.25 mm, typically 0.18 mm, with the contact area nickel-plated and then gold-plated or tin-plated. The sensing contact 240 carries a very small current and can be made of flexible metal sheet with a thickness of 0.08 mm to 0.18 mm, typically 0.12 mm. The above materials and dimensions are determined based on the pin width, target insertion and extraction force, and soldering process, and are not necessary conditions for forming two measurement boundaries.

[0047] like Figure 4 As shown, the diagnostic current source 310 is connected to the first load contact 231 via the measurement switching circuit 130. Current enters the closed contact of the shaft 210 from the first pin 211, and then returns via the second pin 212 and the second load contact 232. The differential sampling circuit 300 is configured with a first pair of input terminals and a second pair of input terminals. The first pair of input terminals is connected to the circuit-side nodes of the two load contacts, forming a first voltage drop U_L; the second pair of input terminals is connected to the two sensing contacts, forming a second voltage drop U_S. The calibration resistor 320 and the temperature sensing element 330 are also connected to the keyboard controller 120.

[0048] Let R_A and R_B represent the contact resistances at the two load interfaces, respectively, and R_K represent the resistance of the closed circuit inside the shaft. The diagnostic current is I_D. Ignoring the small input current of the sensing branch, the first voltage drop satisfies U_L = I_D·(R_A + R_K + R_B), and the second voltage drop satisfies U_S = I_D·R_K. Therefore, the shaft interface resistance R_H = (U_L - U_S) / I_D. In the formula, U_L and U_S are obtained during the same stable period, I_D is the calibration current flowing through the load channel, and R_H is the sum of the contact resistances at the two load interfaces.

[0049] Comparative Example 1 uses the same load channel but does not include a sensing contact. Instead, it stores a fixed internal shaft resistance in the controller and subtracts it from the total resistance. During circuit debugging, the inventors discovered that this approach only works when the internal shaft resistance is approximately constant. Once pressure or contact state changes R_K, the change is reflected in the shaft interface resistance, and the controller cannot determine whether the change originates from the shaft or the shaft. This implementation instead obtains U_S in each closing event, making R_K a common term for both measurement channels in that instance, thus eliminating reliance on the fixed shaft resistance assumption. This comparison only illustrates differences in measurement boundaries and does not represent an experimental commitment to product lifespan or failure rate.

[0050] The sensing contact itself also has interface resistance, but the sampling amplifier input current is at least three orders of magnitude lower than the diagnostic current. Assuming a single sensing interface resistance of 5 ohms and an input bias current of 50 nanoamps, the potential error caused by this interface is 0.25 microvolts; at a diagnostic current of 2.00 mA, this error translates to 0.000125 ohms. This value is below the incremental threshold used for bearing degradation assessment and can be further reduced through forward and reverse sampling.

[0051] Figure 5 The measurement switching circuit 130 has three main states. In the scanning state, the load contacts 230 are connected to the row and column scanning network, and the differential sampling loop maintains high resistance. In the diagnostic state, the current key is isolated from other row and column branches, and the diagnostic current source 310 flows only through the two load contacts of the current key. The differential sampling loop 300 reads two pairs of nodes sequentially or in parallel. In the calibration state, the diagnostic current flows through the calibration resistor 320. The state switching can be accomplished by a low on-resistance analog switch located outside the first voltage drop measurement node, so that the switch on-resistance is not included in U_L.

[0052] The measurement switching circuit can also share a set of current sources for each row and a set of return current selection switches for each column. The sensing channel selects the target key position through an analog multiplexer. The shared structure can reduce the number of components. Regardless of whether a dedicated key-by-key or matrix-shared approach is used, the node for obtaining U_L must be located on the circuit board side of the load contact, and the node for obtaining U_S must reach the equivalent potential on the pin side through the sensing contact. The two pairs of inputs cannot be connected to the same copper foil node.

[0053] like Figure 6 As shown, a closing event can sequentially go through T0 to T5. T0 detects a change in row and column state; T1 completes debouncing confirmation; T2 enters the stabilization period; T3 applies a forward diagnostic current and samples; T4 applies a reverse diagnostic current and samples; T5 resumes the scanning state. The debouncing time can be 4 to 12 milliseconds, typically 6 milliseconds. The stabilization period can begin 2 to 10 milliseconds after debouncing, typically 4 milliseconds, to avoid mechanical vibration of the shaft moving contact just passing the actuation point.

[0054] Five to fifteen voltage drop samples are obtained at both T3 and T4, typically nine samples each, with sampling intervals ranging from 40 to 200 microseconds. The stability limit can be represented by the range of interfacial resistance in the same direction, ranging from 0.03 ohms to 0.12 ohms, typically 0.06 ohms. The stability limit is calibrated by the intra-event range distribution of a good keycap at different actuation speeds, taking the 99th percentile of the distribution with a 10% quantization margin. For keyboards used in high-vibration environments, this limit can be increased, but this also increases the number of cross-event acknowledgments.

[0055] During both forward and reverse sampling, the voltage drop is uniformly positive according to the direction of the diagnostic current flow. The arithmetic mean of the forward-sampled R_H+ and the reverse-sampled R_H- is used as the candidate value within the event. If the voltage drop saturates in a certain direction, the difference between the forward and reverse results exceeds 0.10 ohms, or a button release is detected during sampling, the event is marked as unqualified. Rather than triggering an alert with outliers, this invention chooses not to update the trend count.

[0056] The calibration resistor 320 can be a 100-ohm resistor with a temperature coefficient not exceeding 25 ppm / °C and an initial error not exceeding 0.1%. Calibration is performed after every 32 to 256 keystroke diagnostics, typically every 64. If the current measured through the calibration resistor deviates from the set value by more than 1%, the actual measured current is used for subsequent calculations; if the deviation exceeds 5%, degradation assessment is stopped and a fault in the measurement circuit is recorded. The calibration frequency is increased when the temperature changes rapidly and decreased when the battery is powered and the keyboard is not used for extended periods.

[0057] Temperature sensing elements 330 can be configured in one or more per keyboard area. When converting event samples to a 25°C reference temperature, a piecewise linear coefficient calibrated within the range of 10°C to 50°C can be used. The coefficient range can be 0.001 to 0.004 per degree Celsius, typically 0.002 per degree Celsius. This coefficient is obtained by varying the ambient temperature while keeping the good bearings in place and performing a least-squares fit on the slope of R_H as a function of temperature. If the product uses a different plating or spring material, it should be recalibrated.

[0058] like Figure 7 As shown, key-by-key processing is completed collaboratively by the scanning side, measurement side, and status side. Step 701: The scanning side confirms that the target key has formed a new key closure event and provides the key coordinates and closure time to the measurement side. Step 702: The measurement side waits for the contact to stabilize, completing forward and reverse diagnostics and in-event stability checks. Step 703: The measurement side generates a qualified event sample and converts it to a reference temperature. Step 704: The status side reads the reference value for that key and updates the observation count or maintenance count. Step 705: The status side updates the key-by-key prompts and maintenance reports. If any step detects a key release, a new key closure, or sampling out of bounds, the process returns to the scanning side without generating a degraded count.

[0059] Step 701 takes the current scan matrix state and the previous scan cycle state as input and outputs the newly closed key position. The key position coordinates can be written as a tuple of row and column numbers, such as row 3, column 5. The scanning side generates a new event only when a stable closure occurs again after the key has been in an open state for at least two consecutive scan cycles, preventing long-press states from being repeatedly recorded as multiple events. For keyboards supporting full-key rollover, multiple stable closed keys can be reported, but only one key is selected for microresistance diagnostics at a time.

[0060] Step 702 takes key coordinates and closure time as input and outputs forward voltage drop groups, reverse voltage drop groups, and an event pass / fail flag. The measurement side first verifies that the current key is still closed, then switches the key from the normal scan network to the diagnostic network. After switching, a setup time of at least 30 microseconds is maintained to allow the analog switch charge injection to decay. After obtaining a positive sample, the current is disconnected before changing direction; the switch cannot be flipped directly before the current returns to zero to avoid writing the switching transient into U_L or U_S.

[0061] Step 703 performs the function of "common term elimination and single-event single-sample" in the link. For each forward pair, U_L and U_S are paired according to their sampling sequence number. The difference between each pair is calculated first, then divided by the forward measured current. Reverse data is processed in the same way and a unified sign is applied. The median is taken first for each direction, and then the average is calculated for both directions. This pairing-before-statistical approach is used to avoid mismatching the drift of the two sampling channels at different times.

[0062] A set of illustrative calculations is given. At a forward diagnostic current of 2.00 mA for a certain key, the median first voltage drop is 2.486 mV, the median second voltage drop is 1.742 mV, and the difference is 0.744 mV. The forward shaft interface resistance is 0.372 ohms. The reverse diagnostic result is 0.368 ohms, therefore the event sample for this closure event is 0.370 ohms. If the key's reference value is 0.119 ohms, the event increment is 0.251 ohms. The 0.251 ohms obtained in the previous step is directly used as the input for step 704.

[0063] The first voltage drop in this calculation is not equivalent to the voltage drop at the bearing interface. If the resistance of the closed circuit inside the bearing is 0.85 ohms, then at a current of 2.00 mA, a voltage drop of approximately 1.70 mV will occur inside the bearing alone. The second voltage drop measures and subtracts this change in current voltage. If only U_L is observed without reading U_S, a change in the internal resistance of the bearing from 0.85 ohms to 1.25 ohms will result in a change of 0.80 mV, equivalent to an erroneous increase of 0.40 ohms, which is sufficient to exceed the maintenance threshold.

[0064] Step 704 takes the event increment and the current key-by-key status as input and outputs the new count and alert level. The first increment threshold for observation can be selected between 0.15 ohms and 0.30 ohms, typically 0.20 ohms; the second increment threshold for maintenance can be selected between 0.35 ohms and 0.80 ohms, typically 0.50 ohms. Both thresholds are determined by the event increment distribution in the insertion / removal lifespan sample across three segments: "still reporting stably," "starting to show occasional missed reports," and "continuous missed reports." The first increment threshold is a value above the 99th percentile of the stable segment but below the median of the occasional missed report segment, and the second increment threshold is a value near the upper quartile of the occasional missed report segment.

[0065] When the switch contact material is relatively soft and the dispersion after normal insertion and removal is large, the first incremental threshold should be adjusted upwards; for keyboards with low voltage, low scanning current, and more susceptible to small contact resistance, the second incremental threshold can be adjusted downwards. A gap of at least 0.10 ohms should be maintained between the two thresholds to avoid frequent switching between the observation and maintenance levels within the quantization error range. The thresholds are all applied to the converted R_H increment and are not directly applied to U_L.

[0066] The observation window can contain 8 to 24 recent successful closure events, typically 12. The first number can be 4 to 8, typically 5; the second number can be 2 to 5, typically 3. This set of numbers is calibrated by the false trigger rate of a good switch under rapid keystrokes, slow presses, and lateral presses, with the initial requirement being 1000 consecutive closure events without any observation warnings. High-vibration applications can increase the observation window and the first number; gaming keyboards can shorten the observation window for earlier alerts, but reducing the stability check within an event is not recommended.

[0067] Both observation and maintenance counts are calculated using a sliding event window, rather than requiring threshold events to be consecutive in time. "Consecutive satisfaction" here means that after each new qualified event is added, the number of threshold-exceeding events in the most recent event window reaches the condition several times consecutively. Optionally, a continuous threshold-exceeding method can also be used, but event-based deduplication should be retained. A single unqualified event is neither considered a threshold-exceeding nor a non-threshold-exceeding event; it is only recorded as a missed measurement.

[0068] Step 705 controls the prompting unit 140 according to the warning level determined in step 704. For observation warnings, the corresponding key can flash slowly with a low duty cycle, for example, on for 200 milliseconds and off for 1800 milliseconds; for maintenance warnings, a timing sequence of two short flashes followed by a pause can be used, for example, on for 150 milliseconds, off for 150 milliseconds, on again for 150 milliseconds, and off for 1550 milliseconds. The timing parameters can be changed by the firmware; importantly, the prompt remains bound to the key coordinates. If the user turns off the normal backlight, the maintenance warning can still be displayed once during the power-on self-test.

[0069] Figure 8 The key-by-key status storage grid is shown. The key-by-key status memory 400 establishes records according to key coordinates, with each record containing a reference value 410, an event sample 420, and a warning level 430. The event sample 420 can use a fixed-length circular buffer, the same length as the viewing window. The record may also contain the sample validity bit, reference status, most recent insertion time, and sense branch fault bit. For an 87-key keyboard, each key stores 12 16-bit event samples, with the sample area occupying approximately 2088 bytes, which can be accommodated by the on-chip memory of a typical microcontroller.

[0070] The establishment of reference value 410 cannot be completed after the first key event. After detecting switch insertion or maintenance reset, the corresponding key enters the reference establishment state. Establishing the reference requires 8 to 32 qualified event samples, typically 12. If there are fewer than 8 samples, the reference remains in the pending state; once the required number is reached, the maximum and minimum values ​​are removed, and the median of the remaining samples is taken. If the sample range is greater than 0.12 ohms, collection continues until the most recent 12 samples meet the stability condition or indicate that the insertion is not in place.

[0071] The lower limit for the number of baseline samples is used to avoid accidental influence of a single press posture on the baseline, while the upper limit is used to avoid prolonged periods without a defined state after a new switch is installed. Typical values ​​can be adjusted according to the frequency of key usage. For keys with stabilizer bars or satellite axes, such as the spacebar and enter key, where the pressing force distribution varies significantly, 16 to 24 samples can be used; for letter keys, 8 to 12 samples can be used. After the baseline is established, only a very small, slow update is allowed every 128 or more events that do not exceed the threshold, with a single update amount not exceeding 0.005 ohms.

[0072] Once an observation warning is issued, the reference quantity stops slow updates. The reference remains frozen after a maintenance warning, and is only re-established when the shaft is detected to be reinserted or a maintenance reset command is received. Freezing is not to permanently preserve the fault state, but to prevent the slowly increasing contact resistance from being absorbed into the reference quantity. If maintenance personnel clean the shaft housing but do not replace the shaft, a reset command can be explicitly sent using maintenance tools, and a new reference will be established by a subsequent qualified event.

[0073] Switch insertion detection utilizes the change in the state of the sensing branch from open to closed. Replacement occurring during keyboard power-off cannot be observed in real time; however, upon power-up, a low-current path check can be performed on each key, and keys whose positions differ from the previous power-off state can be used as references for future adjustments. To prevent misjudgments caused by users holding down keys during power-up, the controller can wait for all keys to be released before confirming the insertion status.

[0074] Figure 9 The partial structure of the first connector 221 is shown. The first load contact 231 and the first sensing contact 241 each have a contact arc surface. After the pin 211 is inserted, the two contact spots are circumferentially offset. An insulating rib 251 is located between the two contacts, with its top end lower than the pin inlet to prevent scratching the pin. The spacing at the base of the contacts should ensure that the solder paste bridging probability meets assembly requirements; if necessary, solder mask bridges should be added between the circuit board pads.

[0075] The contact force of the sensing contact 241 should not be zero. If the pins accidentally come into contact, slight vibrations can cause U_S to jump and disrupt the common term elimination. The contact force of a single sensing contact can be 0.05 N to 0.25 N, typically 0.12 N; the contact force of a single load contact can be 0.20 N to 0.80 N, typically 0.45 N. Both are determined by the spring cantilever length, thickness, and pre-bending amount. A relatively small contact force on the sensing contact maintains a stable potential without excessively increasing the insertion and extraction force.

[0076] Figure 10 The self-test and warning output sequence of the sensing branch is shown. During keyboard idle or power-on self-test, the measurement switching circuit enters the sensing branch self-test state. The diagnostic current source 310 is disconnected from the load contact, and the current-limiting branch injects a self-test current of 20 µA to 100 µA (typically 50 µA) into the first sensing contact 241, which then returns to the second sensing contact 242. When a key is closed, if the measured equivalent resistance is within the range of 0.1 ohms to 50 ohms, the sensing branch can be used for U_S sampling; if the result is open-circuit or saturated, the sensing branch is set to fault position.

[0077] The self-test current is significantly less than the diagnostic current, and its duration can be limited to within 1 millisecond, and it is not considered as the bearing interface resistance. The upper limit of the path range is used to identify open circuits, analog multiplexer failures, or severe open circuits in the sensing contacts; the lower limit is used to identify bridging between the sensing pads and load pads. The self-test does not attempt to accurately measure the contact resistance of the sensing contacts, but only determines whether the sensing measurement boundary exists. When a fault is present, the indicator unit can display a solid light or a single long flash, different from the degradation warning.

[0078] The scheduling of diagnostics and normal scans needs to avoid key loss. Taking a 1 kHz full matrix scan cycle as an example, each cycle is 1 millisecond. A single unidirectional voltage drop sampling can be completed within 80 microseconds, and the total time for forward and reverse diagnostics and switching is controlled within 350 microseconds. The controller only inserts a diagnostic slot after the target key has been confirmed to be closed, and resumes scanning before the next time that row needs to be stimulated. If another key is newly closed, the current diagnostic immediately terminates, and scanning takes priority.

[0079] Maintenance reports can be output via the feature report of a USB HMI device, a manufacturer-defined endpoint, or a wireless management channel. The communication interface 500 only returns records when the host issues a query, without altering the standard keycode report. For example, a single record may contain row number 3, column number 5, a base value of 0.119 ohms, a recent event sample of 0.370 ohms, an increment of 0.251 ohms, a warning level of "Observation," and the number of valid sample bits. Values ​​can be stored as milliohms and converted to ohms during transmission.

[0080] If multiple keys exhibit approximately the same direction of change within the same time period, the controller can use the result of the calibration resistor 320 to determine whether it is a current source common-mode drift. Alternatively, the median increment from keys that are not in a warning state can be selected as the board-level common-mode value, and then subtracted from the increments of each key, but the subtraction should not exceed 0.05 ohms. This processing only applies to small global offsets caused by power supply or environmental factors and does not cover continuous increases in a specific key's own value.

[0081] The range of the differential sampling loop 300 should be determined according to the expected degradation increment. With a diagnostic current of 2.00 mA and a first increment threshold of 0.20 ohms, the corresponding voltage drop difference is only 0.40 mV. A low-offset instrumentation amplifier with a gain of 20 to 80 times (typically 50 times gain) can be placed before the analog-to-digital converter to convert the 0.40 mV differential to 20 mV. Symmetrical resistors and a low-pass network with the same cutoff frequency should be placed at the amplifier input to prevent the phase difference between the two channels from turning the switching transient into a differential signal.

[0082] The first and second voltage drops should ideally be acquired alternately by the same analog-to-digital converter, or by two channels sampling synchronously. If acquired alternately, the interval between two readings can be controlled within 20 microseconds, and the readings should be performed in the order of U_L, U_S, U_S, U_L, pairing the average of two adjacent readings of the same type with another type of reading. This order can reduce the time deviation caused by the slow drift of the button closing resistance over a short period of time. The reading order is a detail of the sampling implementation and does not change the two measurement boundaries.

[0083] When routing the circuit board, the sensing traces should not carry scanning current and should be separated from the load traces near the bearing pads. Equal length for both sensing traces is not mandatory, but they should be kept away from backlight pulse-width modulation nodes and wireless RF feed lines. Grounding guards can be installed on both sides of the sensing traces, and the differential amplifier should be placed close to the analog multiplexer. If the per-key LED switches brightness during diagnostics, the controller can maintain its duty cycle or pause the pulse-width modulation edge switching once within the 350-microsecond diagnostic time slot.

[0084] The upper limit of the diagnostic current is constrained by the rated current of the switch contacts, the keyboard's power supply capacity, and the heat generated at the pin interface. A range of 1 mA to 5 mA is suitable for most low-voltage keyboards, with a typical value of 2.00 mA. Too low a current will cause a change in current on the order of 0.1 ohms to approach amplifier offset, while too high a current may have a cleaning effect on the contaminated film, altering the contact state of the measurement itself. Calibration can begin with 1 mA and gradually increase the current, stopping once the signal-to-noise ratio of repeated measurements of the standard resistor meets the requirements.

[0085] Measurement uncertainty can be estimated from three parts: current error, voltage drop error, and forward / reverse repeatability. Taking a 2.00 mA current and a total voltage drop error of 10 μV as an example, the voltage drop term is converted to 0.005 ohms; a 1% relative current error applied to a 0.50 ohm measurement is approximately 0.005 ohms. The sum of the squares of these two terms is approximately 0.0071 ohms, which is below the first incremental threshold of 0.20 ohms. If the uncertainty exceeds one-fifth of the first incremental threshold, the gain should be increased, recalibrated, or the sampling period extended before proceeding to trend analysis.

[0086] Insufficient power supply voltage, analog-to-digital converter over-range, abnormal calibration resistor, sensing branch fault, and temperature sensor disconnection are all measurement system faults, not shaft mount degradation. The state memory sets up separate fault bits for these situations. During the fault period, existing reference values ​​and event samples are retained, and no new observation or maintenance counts are generated; after the fault is cleared, a calibration is performed first, and then key-by-key judgment resumes.

[0087] If the internal contacts of the switch are contaminated, both the first and second voltage drops will typically increase. For example, with a diagnostic current of 2.00 mA, when the internal resistance of the switch increases by 0.40 ohms, both U_L and U_S increase by approximately 0.80 mV, with the difference remaining essentially unchanged. In this case, the keyboard may still exhibit key bounce, but the switch interface resistance should not be used as a trigger. The firmware can use a separate indicator to scan the number of bounces to indicate switch malfunction; the two indicators should use different identifiers.

[0088] If the contact between the load contact and the pin deteriorates, while the sensing contact maintains a high-resistance sampling connection, U_L increases while U_S remains essentially unchanged, and R_H rises accordingly. This difference is precisely the measurement boundary utilized in this invention. If both the load contact and the sensing contact are severely contaminated, the sensing branch self-test may report a fault first. In this case, the system stops attributing R_H to the fault and requires maintenance personnel to check the corresponding shaft, instead of outputting a resistance value that appears accurate but whose measurement boundary has failed.

[0089] If a significant contact jump occurs within the same event, the nine candidate R_H values ​​may jump from 0.12 ohms to 0.45 ohms, exceeding the 0.06 ohm stability limit. This event is discarded. Only when three subsequent independent closure events stabilize around 0.40 ohms are they considered as three valid events and included in the observation window. Event deduplication and the stability limit work together to prevent multiple jumps during a long press from being mistaken for multiple degradation indicators.

[0090] When the keyboard is first powered on and there is no reference data, all key positions are set as references to be established, and no degradation warning is output. Some low-frequency key positions may not have accumulated enough samples for a long time; the controller can display "Reference not established" in the maintenance interface, but cannot directly replace it with the reference of adjacent key positions. If the memory is damaged or the verification fails, it will also return to the pending state.

[0091] System clock calibration does not change the event count because the trend window is organized by event sequence number rather than absolute time. Only the timestamps in the maintenance report are affected by the clock. Before a power outage, the baseline value, alert level, and ring buffer checksum can be written to non-volatile memory; after power-on, the checksum is checked first, and then restored. Write counts can be batched by event to reduce flash memory wear.

[0092] This invention also applies to non-matrix direct-connect keyboards. When each key is directly connected to the controller input, the load contacts still form the main current path, and the sensing contacts still form a high-impedance potential observation path. The number of channels and scan scheduling of the measurement switching circuit will change, but the physical boundaries and differential calculations of the two voltage drops remain unchanged.

[0093] Example This embodiment provides an illustrative configuration for an 87-key wired mechanical keyboard, used to coherently explain assembly, baseline establishment, degradation judgment, and non-trigger branching. The keyboard controller 120 employs a microcontroller with a 12-bit analog-to-digital converter; the input bias current of the differential sampling loop 300 is less than 50 nanoamps; and the diagnostic current source 310 is set to 2.00 mA. The calibration resistor 320 is 100 ohms, 0.1%, and is calibrated every 64 diagnostic cycles. The reference temperature is 25 degrees Celsius, with a temperature conversion factor of 0.002 per degree Celsius.

[0094] In this configuration, the button debouncing time is 6 milliseconds, followed by a 4-millisecond delay before entering a stable period. Nine voltage drop sets are taken for both forward and reverse directions. The intra-event range stability limit is 0.06 ohms, and the forward / reverse result difference limit is 0.10 ohms. The baseline is established using the 12 most recent qualified events. The observation window length is 12 events, with a first incremental threshold of 0.20 ohms and a first quantity of 5; a second incremental threshold of 0.50 ohms and a second quantity of 3.

[0095] After a letter key has its switch replaced, the 12 reference event samples are distributed between 0.112 ohms and 0.128 ohms. After removing the maximum and minimum values, the median is 0.119 ohms. The controller writes 0.119 ohms into the reference value 410 for that key position. At this time, the key-by-key prompt unit does not light up, and the circular buffer begins to receive subsequent event samples.

[0096] After a period of use, this key showed five valid event increments of 0.251 ohms, 0.228 ohms, 0.264 ohms, 0.193 ohms, and 0.237 ohms, with seven other event increments below 0.20 ohms. Of the last twelve events, four reached the first increment threshold. Since 0.193 ohms did not reach 0.20 ohms, no observation warning was triggered. The next valid event increment was 0.244 ohms. After the window moved away from a low-increment event, the number reaching the first increment threshold became five, and the observation criterion was met.

[0097] The aforementioned 0.251 ohm event was obtained from the first voltage drop of 2.486 mV, the second voltage drop of 1.742 mV, and the 2.00 mA diagnostic current. The calculated event sample was 0.370 ohms, which was then subtracted from the 0.119 ohm reference value to obtain 0.251 ohms. This value was not recalculated in subsequent counts, and the data specifications remained consistent between steps. The controller changed the warning level 430 of this key to observation and made the corresponding key flash slowly in a sequence of 200 milliseconds on and 1800 milliseconds off.

[0098] After continued use, three increments appeared in the last 12 qualified events: 0.536 ohms, 0.581 ohms, and 0.552 ohms, all reaching the second increment threshold of 0.50 ohms, thus fulfilling the maintenance criterion. The controller froze the 0.119 ohm baseline value, stopped slow updates, and changed the prompt timing to two short flashes. The maintenance report recorded the key coordinates and the most recent increment; other keys remained unchanged.

[0099] When disassembling the keyboard for inspection, if only the switches are replaced without addressing the switch mounts, subsequent event increments will remain above 0.50 ohms, and the maintenance warning will not automatically disappear after switch replacement. After cleaning and restoring the switch mount clamping force, maintenance personnel send a reset command, and the controller re-collects 12 events to form a new baseline. This process reflects that the warning target is the switch mount load interface, not the switch model.

[0100] In the first non-triggered scenario, the internal contacts of another key's switch became contaminated, causing the first voltage drop to increase from 2.10 mV to 2.92 mV, and the second voltage drop to increase from 1.86 mV to 2.68 mV. Both voltage drops increased by 0.82 mV, but the difference was only 0.24 mV. At a diagnostic current of 2.00 mA, the switch interface resistance was 0.120 ohms, and the event increment was close to zero. This key did not trigger the switch warning; the scanning side could report the switch status separately based on key jitter.

[0101] In the second non-triggered scenario, when the user slowly presses a key from the side, the resistance at the interface of the 9th set of bearings in the forward direction varies between 0.14 ohms and 0.31 ohms, with a range of 0.17 ohms, exceeding the 0.06 ohm stability limit. This event is marked as unacceptable and is not included in the 12-event observation window. After the user releases the key and presses it vertically again, the event sample stabilizes at 0.126 ohms, with an increment of 0.007 ohms, and the count remains unchanged.

[0102] At 30 degrees Celsius, the uncalculated R_H of a certain event is 0.132 ohms. Converted to 25 degrees Celsius using a coefficient of 0.002 per degree Celsius, the converted value is approximately 0.131 ohms. If the key reference value is 0.119 ohms, the temperature-corrected increment is 0.012 ohms, far below the first increment threshold. This example illustrates that temperature conversion only corrects for small system changes and does not hide interface degradation values ​​already exceeding 0.20 ohms.

[0103] If the sensing branch is open during the power-on self-test, the controller records a sensing branch fault at this key and does not perform U_S differential calculation. The prompt unit indicates a measurement channel fault with a single long flash, and the maintenance report will state "sensing branch fault" instead of providing the shaft interface resistance. After the fault is repaired and the self-test is passed, this key will return to the pending reference state.

[0104] The parameters in this embodiment cover seven scenarios: normal baseline establishment, observation warning, maintenance warning, no trigger due to changes in internal shaft resistance, no trigger due to instability within an event, minor temperature changes, and sensor branch fault. Each state is determined by measurable voltage drop, event count, or self-test response, and does not depend on user subjective selection. For products with different key counts, diagnostic currents, and observation windows, recalibration can be performed according to the aforementioned range, while the dual measurement boundaries and the elimination relationship of common terms for the same event remain unchanged.

[0105] The above description illustrates the main embodiments of the present invention. Those skilled in the art can adjust the contact shape, sampling device, communication interface, and prompt format without changing the three conditions: the electrical insulation between the load contact and the sensing contact, the different measurement boundaries corresponding to the first and second voltage drops, and the deduplication judgment of button closure events.

Claims

1. A keyboard with key-by-key warning for hot-swappable switch contact degradation, comprising a circuit board, a keyboard controller, a measurement switching circuit, and key units, each key unit comprising a detachable switch and a switch housing that plugs into two pins of the detachable switch, characterized in that, Each of the two plug positions of the aforementioned shaft seat is provided with a load contact and a sensing contact that are electrically insulated from each other and in contact with the same pin. The load contact is connected to the key scanning circuit, and the sensing contact is connected to the differential sampling circuit with an input bias current not greater than one-thousandth of the diagnostic current. During the stable contact period of a key closure event, the keyboard controller controls the measurement switching circuit to allow diagnostic current to flow through the closed contacts of the two load contacts and the detachable shaft, thereby obtaining the first voltage drop between the circuit-side nodes of the two load contacts and obtaining the second voltage drop between the two pins through the two sensing contacts. The keyboard controller determines the key's hinge interface resistance based on the difference between the first and second voltage drops and the diagnostic current. The hinge interface resistance represents the sum of the contact resistances between the two load contacts and the corresponding pins. The keyboard controller compares the interface resistance of the key bearings belonging to multiple key closure events with the reference value of the corresponding key to obtain the increment corresponding to each key closure event. After obtaining a new qualified key closure event, it evaluates the preset degradation criterion based on the increment. When the preset degradation criterion is met for a preset number of consecutive times, it controls the prompt unit corresponding to the key position to output a warning.

2. The keyboard according to claim 1, characterized in that, The load contact and the sensing contact are two independent elastic metal pieces fixed in the insulating base. The two independent elastic metal pieces abut against the pin at different positions around the pin, and each has a solder end leading to the circuit board.

3. The keyboard according to claim 1, characterized in that, The keyboard controller sequentially generates two diagnostic currents in opposite directions during the contact stabilization period, respectively obtaining a first voltage drop and a second voltage drop measured in the same direction as each diagnostic current, and using the average value of the bearing interface resistance obtained in the two directions as the bearing interface resistance of the key closure event.

4. The keyboard according to claim 1, characterized in that, The contact stabilization period is located after button debouncing confirmation and before button release; During this period, the keyboard controller acquires multiple sets of first and second voltage drops. If the voltage drop range exceeds the stability limit or the key is released prematurely, the current key closure event is discarded; otherwise, an event sample is formed by the median of the multiple sets of shaft interface resistance.

5. The keyboard according to claim 1, characterized in that, The circuit board is equipped with a calibration resistor and a temperature sensing element; The keyboard controller switches the diagnostic current through the calibration resistor according to the measurement cycle, and converts the resistance of the key interface to the reference temperature based on the calibration current value and the temperature of the key area.

6. The keyboard according to claim 1, characterized in that, After detecting the insertion or replacement of a switch, the keyboard controller marks the corresponding key as a reference state to be established, and forms the reference quantity by the robust statistical value of a predetermined number of qualified event samples obtained by that key. The reference value is frozen after the warning is issued until the shaft insertion is detected again or a maintenance reset command is received.

7. The keyboard according to claim 1, characterized in that, The preset degradation criteria include observation criteria and maintenance criteria; The observation criterion requires that the number of events reaching the first incremental threshold in the most recent observation window, which consists of a preset number of independent key closure events, is not less than the first number. The maintenance criterion requires that the number of events reaching the second incremental threshold, which is greater than the first incremental threshold, is not less than the second number. The alert unit distinguishes between observation alerts and maintenance alerts by different light emission sequences.

8. The keyboard according to claim 1, characterized in that, The measurement switching circuit has a self-test status for the sensing branch; In the self-test state of the sensing branch, the two load contacts are disconnected from the diagnostic current. The keyboard controller applies a self-test current to the two sensing contacts through the current limiting branch, and outputs a sensing branch fault flag without updating the shaft interface resistance when the self-test response exceeds the path range.

9. The keyboard according to claim 1, characterized in that, After obtaining the first and second voltage drops, the measurement switching circuit resumes the key scanning circuit and ends the current diagnosis before the next line of scanning excitation arrives. If another button is newly closed during the contact stabilization period, pause the current diagnostic and retain the normal button reporting.

10. The keyboard according to claim 1, characterized in that, The prompt unit reuses a key-by-key backlight device.