A method for executing keyboard keys
The key displacement ratio is detected by the main controller and the key sensor, and the key switch is realized between a single-time and a repeat mode, and the repetition frequency is adjusted, solving the problem that the key pressing depth cannot be adjusted in real time in the prior art, and improving operation efficiency and accuracy.
Patent Information
- Application Number
- CN202211385026.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-07
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2042-11-07
AI Technical Summary
In the prior art, users cannot adjust the repeat output speed in real time by pressing the button stroke depth, resulting in poor operation efficiency and accuracy in different application scenarios, especially in the movement of focus cells and game operations.
The main controller and a key sensor that detects the change in analog quantity are used to detect the ratio of the displacement distance and the total displacement stroke of the key structure, the key switches between a single conduction and a repetition mode, and adjusts the repetition frequency according to the ratio, which is compatible with the automatic repetition rate control of the keys in various application scenarios.
It realizes the adjustment of the repetition frequency with the button press depth, improves operation convenience and efficiency, is compatible with traditional input methods, adapts to the needs of different operating scenarios, and improves user experience.
Smart Images

Figure CN115586838B_ABST
Abstract
Description
Technical Field
[0001] The present invention is applied to the technical field of input device triggering methods, and particularly relates to a keyboard key execution method. Background Art
[0002] Traditional keyboard key presses are divided into two main working states: single press and continuous press. When the user presses a key and releases it quickly, a single character input or command input will be formed on the host computer; when the user continuously presses a key for more than a certain period of time, the host computer will produce continuous input. For example, when the A key is single-pressed and released within a short time, the host computer will input a single A character; as Figure 1 shown, when the A key is continuously pressed, after the host computer inputs the first A, it will delay for a specified time (such as 0.5 seconds) and then continuously and quickly output characters such as 'AAAAAAA…' until the key is released. During the above process, the key is always in the conducting state, and the continuously output instructions are implemented by modules inside the host computer system.
[0003] In fact, the keyboard reports the on / off status of the switch to the host computer through a communication interface such as USB according to the on / off situation of the switch. The host computer determines whether the function is single input or continuous input based on the pressing time of the reported key. When continuous repeated key input is required, the user can continuously press the key to let the system automatically produce continuous input, and the user does not need to repeatedly press and release the key continuously, thereby improving the use efficiency.
[0004] However, when the user continuously keeps the key depressed, the repeated output speed generated by the system is the default of the system or can be adjusted in the system settings, and the user cannot adjust the repeated output speed in real time through the pressing stroke depth of the key.
[0005] Adjusting the repeat delay and repeat speed by opening the control panel of the operating system brings a lot of inconvenience in use. It cannot adjust the repeat speed according to the input requirements at any time, which greatly affects the use efficiency. For example, in a large Excel table, when it is necessary to move the current focus cell, the arrow keys need to be pressed; but when the arrow keys are continuously pressed, the moving speed is too fast, which will cause the user to lose the position and affect the working idea; if the arrow keys are repeatedly pressed and released, although the position of the focus cell can be accurately controlled, in many cases, the efficiency is affected due to the slow speed and fatigue. In addition, in some game applications, such as the direction control of a racing game, the user has to avoid the key depression time exceeding the repeat delay time to prevent entering the fast repeat mode of the system, resulting in excessive steering. Therefore, only according to the amount of steering, the user manually controls the pressing frequency of the arrow keys to achieve the purpose of adjusting a small amount of steering. Such control has poor accuracy and requires too many hand movements, which will damage the wrist after a long time.
[0006] As for the Chinese patent with the publication number CN105742098B, it discloses an optoelectronic linear control keyboard key switch. The optoelectronic sensor receives optical signals, and different illumination states are provided according to different key pressing depths, causing the optoelectronic sensor to generate corresponding current signals. Although a key scheme with linear adjustment is disclosed in this solution, in this solution, the key always outputs trigger signals through linearly varying currents, which can be well adapted to the movement and driving scenarios of games. However, it cannot be well adapted to scenarios such as single-shot shooting or precise movement of cells in shooting games. Summary of the Invention
[0007] The technical problem to be solved by the present invention is to overcome the deficiencies of the prior art and provide a keyboard key execution method that can be compatible with various application scenarios and can conveniently control the automatic repetition rate of keys.
[0008] The technical solution adopted by the present invention is as follows: The present invention includes a main controller, a key sensor for detecting analog quantity changes, and a key structure cooperating with the key sensor. The key sensor detects the displacement distance d of the key structure. The key sensor is electrically connected to the main controller. The keyboard key execution method further includes the following specific working steps:
[0009] Step S1. The main controller obtains the ratio k of the displacement distance d of the key structure to the total displacement stroke s through the key sensor.
[0010] Step S2. When the ratio k is greater than the set trigger displacement ratio ka, the key switches to the pressed state and performs a single conduction and disconnection.
[0011] Step S3. The main controller detects the pressing duration t when the key is in the pressed state. When the pressing duration t is greater than the set trigger duration ta, the key enters the repeat mode. In the repeat mode, the key cycles between conduction and disconnection, and the main controller adjusts the cycle switching frequency f according to the ratio k.
[0012] Step S4. When the ratio k is less than the set trigger displacement ratio ka, the key state remains off.
[0013] As can be seen from the above solution, button sensors capable of detecting analog quantities, such as magnetic sensors, photoelectric sensors, pressure sensors, etc., are triggered by structures such as magnets, light-shielding holes, springs, or struts corresponding to the button structure. The main controller matches the detected values of the sensors with the corresponding parameter table of the sensors, and then obtains the real-time value of the button displacement distance d. According to the ratio k between the displacement distance d and the total displacement stroke s, the pressing ratio when the user presses the button is obtained. When the ratio k is greater than the trigger displacement ratio ka, it is determined that the user intends to operate the button, and a conduction-disconnection is performed once to achieve the output of characters or instructions. When the ratio k is greater than the trigger displacement ratio ka and this state persists for more than the trigger duration ta, the repeat mode is entered to achieve cyclic switching between conduction and disconnection. At this time, characters or instructions can be continuously input to the computer device or terminal, and the cycle frequency f is adjusted by the main controller according to the pressing depth of the user. Thus, the user can obtain the desired repeat character input speed by adjusting the pressing depth of the button. This meets the repeated input requirements of the user in operation scenarios such as moving in the focus cell, moving or driving in the game, improving the operation convenience and efficiency. At the same time, it is compatible with traditional input methods, enabling the user to quickly and conveniently adapt to this operation mode. Moreover, the solution of this application can not only be adapted to mobile buttons but also to character input buttons, with better compatibility.
[0014] A preferred solution is that in step S3, when the ratio k is greater than the set full-open limit value kb, the button remains in a continuous conduction state until the ratio k is less than the full-open limit value kb, and then the main controller resumes the state of adjusting the frequency f according to the ratio k.
[0015] A preferred solution is that before step S1, it further includes: step S0. The user sets the trigger displacement ratio ka, the trigger duration ta, and the frequency f range through the main controller.
[0016] A preferred solution is that in step S0, the user sets the frequency f range by adjusting the proportionality coefficient x. The relationship between the frequency f and the ratio k satisfies f = kx. The maximum frequency fmax satisfies f = x, and the minimum frequency fmin satisfies f = ka * x.
[0017] A preferred solution is that in step S0, the user directly sets the maximum value fmax and the minimum value fmin of the frequency f. The relationship between the frequency f and the ratio k satisfies f = fmax * k, and f ≥ fmin. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a schematic diagram of the repeat mode operation of a traditional keyboard;
[0019] Figure 2 is the flowchart of the operation of Embodiment 1 of the present invention;
[0020] Figure 3 It is a schematic diagram of the working state of the first embodiment of the present invention;
[0021] Figure 4 It is a flowchart of the working process of the second embodiment of the present invention;
[0022] Figure 5 It is a schematic diagram of the working state of the second embodiment of the present invention. Detailed implementation manners
[0023] Embodiment 1:
[0024] In this embodiment, the present invention includes a main controller, a key sensor for detecting analog quantity changes, and a key structure cooperating with the key sensor. The key sensor detects the displacement distance d of the key structure. The key sensor is electrically connected to the main controller, and the main controller communicates with a computer device or a terminal to output a key signal.
[0025] The main controller is a microprocessor for control in a keyboard device; the key sensor is a Hall sensor, an optoelectronic sensor, or a pressure sensor; when the key sensor is a Hall sensor, a magnet cooperating with the Hall sensor is arranged on the key structure. The Hall sensor obtains the displacement distance of the key structure by detecting the magnetic field change and converts it into a corresponding electrical signal for output to the main controller; when the key sensor is an optoelectronic sensor, a light-shielding hole is arranged on the key structure. By pressing the key structure, the passing amount of the light-shielding hole changes, so as to convert it into a corresponding electrical signal to obtain the displacement distance d; when the key sensor is a pressure sensor, a pressure spring is correspondingly arranged on the key structure. By the change of the elastic force during the compression of the pressure spring, the pressure sensor is converted into a corresponding electrical signal to obtain the displacement distance d.
[0026] As Figure 2 shown, the keyboard key execution method includes the following working steps:
[0027] Step S0. The user interacts with the main controller through the visual interface of the computer device, and sets the trigger displacement ratio ka, the trigger duration ta, and the frequency f range through the main controller. The main controller stores the above parameters in the memory of the keyboard device;
[0028] Step S1. The main controller obtains the ratio k of the displacement distance d to the total displacement stroke s after the user presses the key structure through the key sensor, where 0≤d≤s, and the total displacement stroke s is the maximum movable distance of the key structure;
[0029] Step S2. When the ratio k is greater than the set trigger displacement ratio ka, the key switches to the pressed state and performs a single conduction and disconnection. After the computer device acquires the signal, it inputs a corresponding character or instruction once.
[0030] Step S3. The main controller detects the pressing duration t of the key in the pressed state. When the pressing duration t is greater than the set trigger duration ta, the key enters the repeat mode. In the repeat mode, the key switches between conduction and disconnection in a cycle, and the main controller adjusts the cycle switching frequency f according to the ratio k.
[0031] Step S4. When the ratio k is less than the set trigger displacement ratio ka, the key state remains off.
[0032] Among them, in Step S0, the user sets the frequency f range by adjusting the proportionality coefficient x. The relationship between the frequency f and the ratio k satisfies f = kx. The maximum frequency fmax satisfies f = x, and the minimum frequency fmin satisfies f = ka * x.
[0033] In addition, in Step S0, by storing the parameters in the memory of the keyboard device, it is realized that when switching the computer device, it can also execute the set repeat mode without repeated setting, improving the convenience of use.
[0034] As Figure 3 shown, let the trigger displacement ratio ka be 0.1 and the trigger duration ta be 100 ms. The working process of this application is as follows:
[0035] The user starts pressing the key structure uniformly at time t0.
[0036] When the key structure is at time t1, the ratio k of the displacement distance d to the total displacement stroke s is greater than 0.1. At this time, the main controller outputs a conduction signal to the computer device once.
[0037] The user continues to press uniformly and at time t2, which is 100 ms after time t1, the main controller executes the repeat mode and starts to simulate the repeated on-off signal.
[0038] Between time t2 and time t3 when the key structure reaches the maximum stroke, the user keeps pressing uniformly, that is, the displacement distance d continues to increase. During this process, the frequency f increases with the increase of the displacement distance d to increase the repeat frequency.
[0039] Between time t3 and time t4 when the ratio k of the displacement distance d to the total displacement stroke s is less than 0.1, the user keeps releasing the key structure uniformly. During this process, the frequency f decreases with the decrease of the displacement distance d to decrease the repeat frequency until the key state switches to off at time t4.
[0040] During the process from time t4 until the user completely releases the key, the key remains in the off state.
[0041] During actual use, the main controller adjusts the frequency f according to the preset relationship function between the ratio k and the frequency f.
[0042] Embodiment 2:
[0043] As Figure 4 shown, the difference between this embodiment and Embodiment 1 is:
[0044] In step S3, when the ratio k is greater than the set fully open limit value kb, the key remains in the continuously on state until the ratio k is less than the fully open limit value kb, and then the main controller resumes the state of adjusting the frequency f according to the ratio k.
[0045] As Figure 5 shown, at time t5 between time t2 and time t3, the ratio k is greater than the fully open limit value kb, and at time t6 between time t3 and time t4, the ratio k is less than the fully open limit value kb. Between time t5 and time t6, the key enters the continuously on state. At this time, the repetition of the key is not executed by the keyboard device, and the computer operating system automatically enters the traditional repetition mode after recognizing the continuously on signal.
[0046] By the above method, compatibility with the traditional repetition mode is achieved, enabling users to freely select different operation methods and improving the operation freedom.
[0047] Embodiment 3:
[0048] The difference between this embodiment and Embodiment 1 is:
[0049] In step S0, the user directly sets the maximum value fmax and the minimum value fmin of the frequency f. The relationship between the frequency f and the ratio k satisfies f = fmax * k, and f ≥ fmin.
[0050] The main controller adjusts the frequency f through the above functional relationship.
[0051] Although the embodiments of the present invention are described with actual solutions, they do not constitute a limitation to the meaning of the present invention. For those skilled in the art, modifications to its implementation solutions according to this specification and combinations with other solutions are obvious.
Claims
1. A keyboard key execution method, which includes a main controller, a key sensor for detecting analog quantity changes, and a key structure cooperating with the key sensor. The key sensor detects the displacement distance d of the key structure, and the key sensor is electrically connected to the main controller. It is characterized in that, It includes the following working steps: Step S1. The main controller obtains the ratio k of the displacement distance d to the total displacement stroke s of the key structure through the key sensor; Step S2. When the ratio k is greater than the set trigger displacement ratio ka, the key switches to the pressed state and performs a single conduction and disconnection; Step S3. The main controller detects the pressing duration t when the key is in the pressed state. When the pressing duration t is greater than the set trigger duration ta, the key enters the repeat mode. In the repeat mode, the key cycles between conduction and disconnection, and the main controller adjusts the cycle switching frequency f according to the ratio k; Step S4. When the ratio k is less than the set trigger displacement ratio ka, the key state remains off.
2. The method for executing a keyboard key according to claim 1, wherein In Step S3, when the ratio k is greater than the set full-open limit value kb, the key remains in the continuous conduction state until the ratio k is less than the full-open limit value kb, and then the main controller resumes the state of adjusting the frequency f according to the ratio k.
3. A keyboard key execution method according to claim 1, characterized in that, Before Step S1, it also includes: Step S0. The user sets the trigger displacement ratio ka, the trigger duration ta, and the frequency f range through the main controller.
4. A keyboard key execution method according to claim 3, characterized in that: In Step S0, the user sets the frequency f range by adjusting the proportionality coefficient x. The relationship between the frequency f and the ratio k satisfies f = kx. The maximum frequency fmax satisfies f = x, and the minimum frequency fmin satisfies f = ka * x.
5. A keyboard key execution method according to claim 3, characterized in that: In Step S0, the user directly sets the maximum value fmax and the minimum value fmin of the frequency f. The relationship between the frequency f and the ratio k satisfies f = fmax * k, and f ≥ fmin.
Citation Information
Patent Citations
A photoelectric linear control keyboard key switch
CN105742098B
Optical axis keyboard key, trigger travel setting method thereof, and optical axis keyboard
CN106656146A
Device and method for realizing single click or double click of mouse through single click and mouse
CN113791697A