Input control method, apparatus and electronic device
Patent Information
- Application Number
- CN202211463311.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-21
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2042-11-21
AI Technical Summary
[0003]本申请提供了一种输入控制方法、装置及电子设备,以至少解决现有技术中存在的以上技术问题。
Smart Images

Figure CN115826772B_ABST
Abstract
Description
Technical Field
[0001] This application relates to an input control method, apparatus, and electronic device. Background Technology
[0002] In input devices such as keyboards, keys are arranged adjacent to each other, and different keys have different functions. In response to key presses, the electronic device executes the corresponding function. How to achieve accurate key press responses has become a pressing problem to be solved. Summary of the Invention
[0003] This application provides an input control method, apparatus, and electronic device to at least solve the above-mentioned technical problems existing in the prior art.
[0004] According to a first aspect of this application, an input control method is provided, comprising:
[0005] In a first state, a first input signal generated by a first button is obtained, and a first operation is performed in response to the first input signal; and / or a second input signal generated by a second button is obtained, and a second operation is performed in response to the second input signal.
[0006] If the switching condition is met, the system switches from the first state to the second state. In the second state, the system obtains the first input signal generated by the first button and performs the first operation in response to the first input signal. The system also obtains the second input signal generated by the second button and performs the first operation in response to the second input signal. The first button and the second button satisfy a preset positional relationship.
[0007] In one possible implementation, the step of obtaining a second input signal generated by the second button in the second state, and performing the first operation in response to the second input signal, includes:
[0008] If, in the second state, there is a second input signal generated by the second button and a first input signal generated by the first button that satisfies the preset positional relationship with the second button, then the first operation is performed in response to at least one of the first input signal and the second input signal.
[0009] In one possible implementation, performing the first operation in response to at least one of the first input signal and the second input signal includes:
[0010] The first operation is performed in response to one of the first input signal and the second input signal, according to the generation order of the first input signal and the second input signal.
[0011] In one possible implementation, the second input signal is generated based on a scan of the second key, and the first input signal is generated based on a scan of the first key;
[0012] The step of performing the first operation in response to at least one of the first input signal and the second input signal includes:
[0013] Based on the scanning order of the second button and the first button, the first operation is performed in response to one of the first input signal and the second input signal.
[0014] In one possible implementation, the second input signal and the first input signal are generated based on the received message descriptor;
[0015] The step of performing the first operation in response to at least one of the first input signal and the second input signal includes:
[0016] The first operation is performed in response to either the first input signal or the second input signal, based on the response order of the message descriptor.
[0017] In one possible implementation, the step of obtaining a second input signal generated by the second button in the second state, and performing the first operation in response to the second input signal, includes:
[0018] If, in the second state, there exists a second input signal generated by the second button and a third input signal generated by the third button that does not satisfy the preset positional relationship, and the third button does not have a button that satisfies the preset positional relationship with it, then the first operation is performed in response to the second input signal.
[0019] In one possible implementation, the step of obtaining a second input signal generated by the second button in the second state, and performing the first operation in response to the second input signal, includes:
[0020] If, in the second state, there is a second input signal generated by the second button and a third input signal generated by the third button that does not satisfy the preset positional relationship, according to the target response sequence, in response to the second input signal, a first operation corresponding to at least one of the first buttons that have the preset positional relationship with the second button and the first button that has the preset positional relationship with the third button is executed.
[0021] In one possible implementation, if the number of first buttons that satisfy the preset positional relationship with the second button is at least two,
[0022] In the second state, performing the first operation in response to the second input signal includes:
[0023] Based on the priority information of each of the at least two first buttons, in response to the second input signal, a first operation corresponding to one of the first buttons is executed;
[0024] The priority information of the first button is obtained based on at least one of the historical usage information and weight information of the first button.
[0025] According to a second aspect of this application, an input control device is provided, comprising:
[0026] The first processing unit is configured to, in a first state, obtain a first input signal generated by a first key and perform a first operation in response to the first input signal, and / or obtain a second input signal generated by a second key and perform a second operation in response to the second input signal;
[0027] The second processing unit is configured to switch from the first state to the second state if the switching condition is met; in the second state, it obtains the first input signal generated by the first button, performs the first operation in response to the first input signal, and obtains the second input signal generated by the second button, performs the first operation in response to the second input signal; wherein the first button and the second button satisfy a preset positional relationship.
[0028] According to a third aspect of this application, an electronic device is provided, comprising:
[0029] At least one processor; and
[0030] A memory communicatively connected to the at least one processor; wherein,
[0031] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the input control method described in this application.
[0032] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0033] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of this application are illustrated in the drawings by way of example and not limitation, in which:
[0034] In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
[0035] Figure 1 This paper illustrates the implementation flow of the input control method according to an embodiment of the present application. Figure 1 ;
[0036] Figure 2 This paper illustrates the implementation flow of the input control method according to an embodiment of the present application. Figure 2 ;
[0037] Figure 3 A schematic diagram of the first and second keys in the keyboard of an embodiment of this application is shown;
[0038] Figure 4 A schematic diagram of the composition structure of the input control device according to an embodiment of this application is shown;
[0039] Figure 5 A schematic diagram of the composition structure of an electronic device according to an embodiment of this application is shown. Detailed Implementation
[0040] To make the objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0041] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0042] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0043] In the following description, the terms "first" and "second" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first" and "second" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0044] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0045] It should be understood that in the various embodiments of this application, the sequence number of each implementation process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0046] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.
[0047] In this application, the first and second buttons are buttons on an input device that satisfy a preset positional relationship. The input device can be a keyboard. The keyboard can be a physical keyboard or a virtual keyboard, preferably a physical keyboard. In practical applications, the keyboard can be a keyboard built into an electronic device, such as the one in a laptop computer. The keyboard can also be an external keyboard connected to the electronic device. The electronic device can be any terminal or server capable of responding to keys on the keyboard. Terminals include, but are not limited to, laptops, desktops, all-in-one computers, and smartphones. Servers include, but are not limited to, ordinary servers and cloud servers. Preferably, the electronic device is a terminal.
[0048] The first and second keys are keys on the input device that satisfy a preset positional relationship. In practical applications, the first key can be one or more keys designated on the keyboard. Figure 3 As shown, considering that the keyboard can be divided into two main areas based on the tactile "F" mark, taking the area containing the key F and all keys to its left as an example, at least one of the keys A, S, D, and W can be designated as the first key within this area. The second key can be a key located within this area that is adjacent to the designated key in that area and is not another designated key. In other words, satisfying the preset positional relationship refers to the adjacent positional relationship between the designated key in this area and the keys adjacent to the designated key in that area that are not other designated keys.
[0049] For example, taking the first key as designated key A, the second key of key A includes at least one of key Z, key Shift, key Caps Lock, and key Q. Taking the first key as designated key W, the second key of key W includes at least one of key 2, key 3, key Q, and key E. Taking the first key as designated key D, the second key of key D includes at least one of key E, key R, key F, key C, and key X. Taking the first key as designated key S, the second key of key S includes at least one of key Z, key X, and key E.
[0050] It should be noted that, Figure 3 The keys shown are only a portion of the keys on a complete keyboard. Any other reasonable keys (such as F1-F12, Insert, Page Up, Page Down, etc.) can be used in conjunction with them. Figure 3 The keys shown constitute a complete keyboard. Figure 3 As shown, all the buttons to the right of the blind spot "F" can also be assigned as the first button and the second button adjacent to the first button but not another first button, using the same scheme as above. Please refer to the explanation for details, which will not be elaborated here.
[0051] The processing logic in this application embodiment is deployed in an electronic device. The electronic device in this application has two states (two response modes to the input device): a first state (first response mode) and a second state (second response mode). For different states, corresponding responses are executed to the first and second buttons on the input device, enabling accurate button responses and avoiding inaccurate responses and poor user experience caused by erroneous responses. Please refer to the following description for details.
[0052] The first embodiment of the input control method of this application is applied to an electronic device. For example... Figure 1 As shown, the method includes:
[0053] S101: In a first state, a first input signal generated by a first button is obtained, and a first operation is performed in response to the first input signal; and / or a second input signal generated by a second button is obtained, and a second operation is performed in response to the second input signal.
[0054] In this step, in the first state of the electronic device, the electronic device can obtain the first input signal and the second input signal by receiving the first input signal and the second input signal, or by generating the first input signal and the second input signal when the first button and the second button are detected to be operated, such as by touch or pressing.
[0055] In layman's terms, in the first state, if the first button is pressed, the electronic device responds to the first input signal and performs the first operation; if the second button is pressed, the electronic device responds to the second input signal and performs the second operation.
[0056] Executing the first operation in response to the first input signal can be considered as the electronic device realizing the inherent function of the first button. Executing the second operation in response to the second input signal can be considered as the electronic device realizing the inherent function of the second button. The inherent function of the button can be the function that the button can perform in one or more application scenarios.
[0057] For example, taking button S as the first key and X as the second key of button S, in a character input application scenario, the inherent function of button S can be the input of character S, and the inherent function of button X can be the input of character X. In a game application scenario, the inherent function of button S is to control a virtual object, such as a virtual character, to move forward in the game. Button X is an invalid key in the game scenario; in the game scenario, the inherent function of button X is that operating button X will not perform any operation on the virtual object.
[0058] The aforementioned scheme can be seen as follows: in the first state, based on the application scenarios of the first button and the second button, the electronic device responds to the first input signal and the second input signal to execute the inherent functions of the first button and the second button in the application scenario.
[0059] S102: If the switching condition is met, switch from the first state to the second state. In the second state, obtain the first input signal generated by the first button, and perform the first operation in response to the first input signal. Obtain the second input signal generated by the second button, and perform the first operation in response to the second input signal. The first button and the second button satisfy a preset positional relationship.
[0060] The method for obtaining the first and second input signals when the electronic device is in the second state is the same as the method for obtaining the first and second input signals when the electronic device is in the first state, and will not be repeated here. When the electronic device is in the second state, it responds to the first input signal generated by the first button and performs the same operation as the first button in the first state - the first operation; when it responds to the second input signal generated by the second button, it performs the same operation as the first button in both the second and first states - the first operation.
[0061] In layman's terms, in this step, in the application scenario where the first button and the second button are in the first state, when in the second state, the electronic device responds to the first input signal generated by the first button and the second input signal generated by the second button by performing the first operation, so as to avoid the problem of response error caused by accidental button operation.
[0062] In S101 to S102, the electronic device includes two states. For the same button (first button, second button) in different states, the corresponding response in different states is executed, which can realize accurate button response and avoid problems such as inaccurate response and poor user experience caused by incorrect response.
[0063] In the aforementioned S102, the input device or electronic device is equipped with a switching button. Upon detecting an operation on the switching button, the electronic device determines that the switching conditions are met and switches from the first state to the second state. In practical applications, if the switching button is located in the input device, it is a physical button, which can be specially designed or reused with other existing buttons. If the switching button is located in the electronic device, it can be a physical button or a virtual button. Furthermore, the electronic device can switch from the first state to the second state when a specific application is running, such as a game. It can be understood that if an operation on the switching button is detected in the second state, the electronic device can switch from the second state to the first state. The switching between the two states of the electronic device can be implemented according to actual needs.
[0064] To illustrate the aforementioned solution, two application scenarios will be provided.
[0065] Application scenario 1: Scenarios involving character input.
[0066] Taking button S as the first button and button X as the second button of button S as an example, in a character input application scenario, in the first state, the electronic device responds to the first input signal generated by button S, executes the function of button S, and realizes the input of character S into the electronic device. The electronic device responds to the second input signal generated by button X, executes the function of button X, and realizes the input of character X into the electronic device.
[0067] The electronic device switches from a first state to a second state. In the second state, the electronic device responds to the first input signal generated by key S, executing the function of key S to input the character S into the electronic device. Considering that in practical applications, the second key—key X—is very close to key S on the keyboard, and users can easily accidentally press key X while operating key S, this solution aims to avoid erroneous responses to key X. In the second state, for accidentally pressed key X, the system responds to the second input signal generated by key X, but does not execute key X's function. Instead, it executes the function of key S, which is very close to key X, to replace key X's function, thus inputting the character S into the electronic device. This avoids erroneous responses to key X in the second state, ensuring accurate response to the desired key S and improving the user experience.
[0068] Application Scenario 2: For game scenarios.
[0069] Taking button S as the first button and X as the second button of button S as an example, in a game application scenario, the function of button S is to control the virtual object, such as a virtual character, to move forward in the game. Button X is an invalid button in the game scenario. In the game scenario, in the first state, the electronic device responds to the first input signal generated by button S and executes the function of button S to control the virtual character in the game to move forward. When the electronic device responds to the second input signal generated by button X, it executes the function of button X but does not perform any control over the virtual character in the game.
[0070] The electronic device switches from a first state to a second state. In the second state, the electronic device responds to the first input signal generated by button S, executing the inherent function of button S to control the virtual character in the game. Considering that in practical applications, the second button—button X—is very close to button S on the keyboard, users can easily accidentally press button X while operating button S. To avoid the poor user experience caused by responding to button X, in the second state, the electronic device responds to the second input signal generated by button X, but does not execute the inherent function of button X. Instead, it executes the inherent function of button S (which is very close to button X) in the second state to control the virtual character in the game, thus avoiding the problem of ineffective control of the virtual object caused by the operation of button X being invalid. In this scenario, for button X, which was originally an invalid button in the first state, putting it in the second state is equivalent to responding to the inherent function of button S (the first button that meets the preset positional relationship with button X). This avoids the problem of users accidentally pressing button X when they want to operate button S, resulting in response errors and improving the user experience.
[0071] In some embodiments, such as Figure 2As shown, in the second state, a second input signal generated by the second button is obtained, and the scheme for performing the first operation in response to the second input signal can be implemented through the following scheme:
[0072] S202: If in the second state there is a second input signal generated by the second button and a first input signal generated by the first button that satisfies the preset positional relationship with the second button, then the first operation is performed in response to at least one of the first input signal and the second input signal.
[0073] In S202, in the second state of the electronic device, if there is a second input signal generated by the second button and a first input signal generated by the first button that satisfies a preset positional relationship with the second button, then the first operation can be performed in response to the first input signal, or in response to the second input signal, or in response to both the first and second input signals, thus avoiding the problem of response errors caused by accidental touch.
[0074] It should be noted that, in Figure 2 S101 shown is related to Figure 1 The scheme for S101 is the same, so I will not go into details.
[0075] In some embodiments, the scheme for performing the first operation in response to at least one of the first input signal and the second input signal in the aforementioned S202 can be implemented in at least one of the following ways.
[0076] Implementation Method 1:
[0077] In practical applications, there are situations where there is a time difference between the operation of the first button and the second button. Naturally, the generation times of the first input signal corresponding to the first button and the second input signal corresponding to the second button will differ, meaning the generation order of the first and second input signals is different. In this case, the first operation can be performed in response to one of the first and second input signals, according to their generation order.
[0078] For example, in the second state of the electronic device, given a first input signal and a second input signal with different generation sequences, the first operation can be performed in response to the input signal generated earlier, or in response to the input signal generated later. Alternatively, the first operation can be performed in response to both the input signal generated earlier and the input signal generated later.
[0079] For example, in a game scenario, taking button X as the second button and button S as the first button that satisfies a preset positional relationship with button X, when the electronic device is in a second state, if button X is pressed before button S, then the second input signal is generated before the first input signal, and the function of button S in controlling the virtual character in the game to move forward is executed in response to the second input signal. If button S is pressed before button X, then the first input signal is generated before the second input signal, and the function of button S in controlling the virtual character in the game to move forward is executed in response to the first input signal.
[0080] In the aforementioned implementation, the first operation is performed in response to one of the first and second input signals according to the generation order of the first and second input signals. This is easy to implement in engineering and can effectively avoid the problem of inaccurate response caused by erroneous response.
[0081] Implementation Method Two:
[0082] In practical applications, electronic devices can be laptops, which come with a built-in keyboard including a keyboard controller. The principle of keyboard scanning in a laptop is as follows: each key on the keyboard corresponds to a scan code. Based on the position of each key on the keyboard, the scan codes of all keys are collected to form a scan code matrix. The keyboard controller scans this matrix. The purpose of the scan is to determine which key is pressed. In the first state of the electronic device, if a key is detected as pressed, the keyboard controller sends the scan code corresponding to that key to the laptop's operating system (OS). The OS then responds to the input signal generated based on this scan and executes the function of the scanned key.
[0083] Based on the aforementioned keyboard scanning principle of a laptop computer, in the second state of this application, the second input signal is generated based on the scanning of the second key, and the first input signal is generated based on the scanning of the first key. Thus, the scheme for executing the first operation in response to at least one of the first and second input signals can be: the electronic device, specifically the OS of the electronic device, executes the first operation in response to one of the first and second input signals based on the scanning order of the second and first keys. It can be understood that the keyboard controller scans the scan code matrix in a certain order, such as scanning from top to bottom or from bottom to top. The order in which the first and second keys are scanned may be the same as or different from the order in which the user presses the first and second keys. In this implementation, the first operation is executed on one of the first and second input signals according to the order in which the second and first keys are scanned. If the second key is scanned first, the second input signal is responded to and the first operation is executed. If the first key is scanned first, the first input signal is responded to and the first operation is executed.
[0084] For example, in a game scenario, taking button X as the second button and button S as the first button that satisfies a preset positional relationship with button X, when the electronic device is in the second state, if button X is scanned by the keyboard controller before button S, then the second input signal generated by button X is responded to, and button S is executed to control the virtual character in the game to move forward. If button S is scanned by the keyboard controller before button X, then the first input signal generated by button S is responded to, and button S is executed to control the virtual character in the game to move forward.
[0085] It should be noted that even if the first button and the second button are pressed at the same time, the first operation must be performed by responding to one of the first input signals and the second input signal according to the scanning order of the first button and the second button.
[0086] In the aforementioned implementation, the first operation is performed in response to either the first input signal or the second input signal according to the scanning order of the second button and the first button. This is easy to implement in engineering and can effectively avoid the problem of inaccurate response caused by erroneous response.
[0087] Implementation method three:
[0088] In practical applications, electronic devices can connect to external keyboards, such as via Universal Serial Bus (USB) or Bluetooth. When one or more keys on the external keyboard are pressed, the external keyboard sends a message descriptor (HID, Human Interface Device) of the pressed key to the electronic device in the form of a report. The electronic device receives the report, which will contain information about one or more keys being operated. Typically, for multiple keys operated in the same report, the response (priority) order of each key appearing in the same report can be preset. That is, the response (priority) order of each message descriptor corresponding to each key appearing in the same report can be preset, and the input signal corresponding to each key will be responded to according to the response (priority) order of each message descriptor.
[0089] In this scenario, the electronic device receives message descriptors from an external keyboard and generates a first input signal based on the received message descriptor of a first key and a second input signal based on the received message descriptor of a second key. That is, the second input signal and the first input signal are generated by the electronic device based on the received message descriptors. The first operation is performed in response to either the first or second input signal, based on the response (priority) order of the message descriptors. In the response (priority) order, if the response order of the message descriptor of the first key is higher than that of the message descriptor of the second key, then the first operation is performed in response to the first input signal. If the response order of the message descriptor of the second key is higher than that of the message descriptor of the first key, then the first operation is performed in response to the second input signal.
[0090] For example, in a game scenario, taking button X as the second button and button S as the first button that satisfies a preset positional relationship with button X, when the electronic device is in a second state, if the HID response (priority) order of button X is higher than that of button S, then the second input signal generated by button X is used to execute the function of button S to control the virtual character in the game to move forward. If the HID response (priority) order of button S is higher than that of button X, then the first input signal generated by button S is used to execute the function of button S to control the virtual character in the game to move forward.
[0091] It should be noted that even if the first button and the second button are pressed at the same time, the first operation must be performed by responding to one of the first input signals and the second input signal according to the HID response order of the first button and the second button.
[0092] In the aforementioned implementation, the first operation is performed in response to one of the first and second input signals according to the response (priority) order of the message descriptor. This is easy to implement in engineering and can effectively avoid the problem of inaccurate response caused by erroneous response.
[0093] In some embodiments, such as Figure 1 The scheme shown, wherein in the second state, obtaining a second input signal generated by the second button and performing the first operation in response to the second input signal includes: if in the second state there is a second input signal generated by the second button and a third input signal generated by a third button that does not satisfy the preset position relationship, and the third button does not have a button that satisfies the preset position relationship with it, then the first operation is performed in response to the second input signal.
[0094] For example, taking a game scenario, with button W as the first button and its default function being the shooting function, and button E as the second button, in the second state of the electronic device, the user wants to press button W to shoot the soccer ball, but accidentally presses button E and button 4 (the button corresponding to the number 4). Of the two buttons accidentally pressed, button E is the second button with the preset positional relationship to the first buttons such as button W, button S, and D. Since button 4 is neither qualified as a first button nor a second button in the soccer game scenario, the electronic device blocks the third input signal generated by button 4 and responds to the second input signal generated by button E to execute the first operation corresponding to button W, thus realizing the default function of button W - the soccer shooting function. It can be seen that this solution can effectively avoid the problem of unsuccessful shooting caused by accidentally pressing button E and button 4. Even if the pressed button is the wrong button, not the correct button - button W, a normal shot is still achieved, improving the user's experience in the game.
[0095] In some embodiments, such as Figure 1 The scheme shown, wherein in the second state, obtaining a second input signal generated by the second button and performing the first operation in response to the second input signal includes: if in the second state there is a second input signal generated by the second button and a third input signal generated by a third button that does not satisfy the preset positional relationship, according to the target response order, in response to the second input signal, performing a first operation corresponding to at least one of the first buttons that have the preset positional relationship with the second button and the first button that has the preset positional relationship with the third button.
[0096] For example, taking a game scenario as an example, and using button E as the second button, in the second state of the electronic device, the user wants to press a first button, such as button W, but accidentally presses both button E and button A (which does not satisfy the preset positional relationship with button E and is used as a third button). Since button E is the second button on the keyboard, and button A is the first button, the first button usually has higher priority than the second button. Therefore, the target response order is determined based on the roles of buttons E and A on the keyboard. That is, in this target response order, the response to button A takes precedence over the response to button E. For the accidentally pressed buttons E and A, the electronic device, according to the target response order, first responds to the third input signal generated by button A to execute button A's own function, such as the turning function, and then responds to the second input signal generated by button E to execute the shooting function of the first button corresponding to button E—button W (button W's own function). This avoids the situation where the football game cannot be controlled due to accidental presses of buttons E and A.
[0097] Alternatively, the target response sequence can only record the order of the keys that need to be responded to, and only respond to the second input signal generated by key E to execute the function of the first key corresponding to key E - key W. Alternatively, only respond to the third input signal generated by key A to execute the function of key A, such as the steering function. This can avoid situations where accidental touches lead to a lack of timely control in the football game.
[0098] The example above determines the target response order based on the roles corresponding to buttons E and A. Alternatively, the target response order can be determined based on the triggering order of buttons E and A, such as the pressing order. If the user presses button E first and then button A, the electronic device, according to the target response order, first responds to the second input signal generated by button E to execute the function of the first button corresponding to button E (button W), and then responds to the third input signal generated by button A to execute the function of button A, such as the turning function. Alternatively, the target response order can only record the order of the buttons that need to be responded to, such as only responding to the second input signal generated by button E to execute the function of the first button corresponding to button E (button W). Or, only responding to the third input signal generated by button A to execute the function of button A, such as the turning function. This avoids accidental touches that could cause the inability to control the football game.
[0099] For example, taking a game scenario as an example, and taking button E as the second button, in the second state of the electronic device, the user wants to press a first button, such as button W, but accidentally presses button E and button X (which do not satisfy the preset positional relationship with button E and are used as the third button). Both button E and button X are second buttons on the keyboard, and there are first buttons on the keyboard that satisfy the preset positional relationship with them. In this case, the target response order can be determined based on the adjacency of the second and third buttons with their respective corresponding first buttons. On the keyboard, the first buttons corresponding to button E include buttons W, S, and D. The left edge of button E is entirely adjacent to button W. The first buttons corresponding to button X include buttons S and D. A certain edge of button X is not entirely adjacent to at least one of buttons S and D. In terms of adjacency, button E is higher than button X. The target response order is generated based on the adjacency of buttons E and X. The electronic device responds to the second input signal generated by button E, executing the function corresponding to button W – the shoot function – in descending order of adjacency in the target response sequence. Then, it responds to the third input signal generated by button X, executing the function corresponding to button S or button D. This avoids situations where accidental presses of buttons E and X would prevent the game from becoming uncontrollable.
[0100] Understandably, in the game scenario, in the first state, the keys on the keyboard that can be used as primary keys are valid and have control functions for the football game. Second keys on the keyboard, which have a preset positional relationship with the primary keys, can be considered invalid keys in the football game; when an invalid key is pressed, no control is activated. However, when the electronic device switches from the first state to the second state, when a second key is pressed, pressing the previously invalid second key can be treated as pressing a primary key with a preset positional relationship to it. This allows for timely control of the game and avoids the problem of untimely game control caused by accidental pressing of the second key, or by the second and third keys, in the second state.
[0101] It is understood that the first button in this application includes at least one of button A, button S, button D, and button W. The second buttons that satisfy the preset positional relationship with the above first buttons are described in the foregoing relevant descriptions and will not be repeated here. For the same second button, the number of first buttons that satisfy the preset positional relationship with it can be one, such as button Shift, where the first button that satisfies the preset positional relationship with it is button A. It can also be two or more, such as button X, where the first button that satisfies the preset positional relationship with it can be button S or button D. For the second case, i.e., when the number of first buttons that satisfy the preset positional relationship with the second button is at least two, the scheme for performing the first operation in response to the second input signal in the second state can be: based on the priority information of each of the at least two first buttons, performing the first operation corresponding to one of the first buttons in response to the second input signal; wherein the priority information of the first button is obtained based on at least one of the historical usage information and weight information of the first button.
[0102] For example, taking button X as the second button, and buttons S and D satisfying a preset positional relationship with button X as examples, the priority information of buttons S and D can be determined based on the historical usage rate or frequency of buttons S and D. Among buttons S and D, the button with a higher historical usage rate or frequency has a higher priority than the button with a lower usage rate or frequency. If, based on historical usage information, it is known that button D has a higher priority than button S, then the electronic device responds to the second input signal generated by button X and executes the first operation corresponding to button D. Alternatively, relative to the time when button X is pressed, the button that was last used between buttons S and D has a higher priority than the other button. If, relative to the time when button X is pressed, button S was last used, then the electronic device responds to the second input signal generated by button X and executes the first operation corresponding to button S.
[0103] Taking button X as the second button, and buttons S and D satisfying a preset positional relationship with button X as an example, weight information is determined for buttons S and D based on the adjacency of button X with buttons S and D. Combined with... Figure 3 As shown, the right half of the upper boundary of button X is adjacent to button D, and the weight information of button D is determined to be 0.5. The left half of the upper boundary of button X is adjacent to button S, and the weight information of button S is determined to be 0.5. When the weight information of buttons S and D is the same, the priority order of buttons S and D can be obtained by prioritizing historical usage information or a combination of historical usage information and weight information. The first operation corresponds to the first button with the higher priority order.
[0104] For example, taking button Q as the second button and buttons A and W as first buttons that satisfy a preset positional relationship with button Q, weight information is determined for buttons A and W based on the adjacency of button Q with buttons A and W. Combined with... Figure 3 As shown, the entire left boundary of button Q is adjacent to button W, determining the weight information of button W to be 1. Three-quarters of the lower boundary of button Q is adjacent to button A, determining the weight information of button A to be 0.75. The priority information of buttons A and W can be determined based on the magnitude of their weight information. A larger weight information indicates higher priority. In the second state, in response to the second input signal generated by button Q, the electronic device executes the first operation corresponding to the higher-priority first button, that is, executes the first operation corresponding to button W.
[0105] In practical applications, taking a game scenario like a football match as an example, assume that button W's default function is to shoot, and button A's default function is to control the virtual character's direction on the field. Button Q is an invalid button. When the electronic device is in its first state, when button W and / or button A are pressed, the electronic device executes the shooting function of button W (button W's default function) and / or executes the turning function of button A (button A's default function). However, in the first state, if the user intends to press button W but accidentally presses button Q instead, it means an invalid button has been pressed, and the electronic device does not respond to the invalid button. For the user, this accidental press results in a missed shooting opportunity, potentially leading to a loss in the game. Clearly, this experience is undesirable for the user.
[0106] The electronic device switches from a first state to a second state based on the user's operation of the switching keys. In the second state, when key W and / or key A are pressed, the electronic device executes the shooting function of key W and / or the turning function of key A. If the user intends to press key W but accidentally presses key Q, although key Q is set to be an invalid key in the football game, in the second state, because key W and key A are valid keys that satisfy the preset positional relationship with key Q, pressing key Q can be approximated as pressing key W or key A. Based on the priority information of key W and key A, it is determined whether pressing key Q is approximated as pressing key W or key A. Among key W and key A, if, based on historical usage information, the key with the higher usage rate or the key most recently used (compared to the time key Q was pressed) is key W, then pressing key Q is approximated as pressing key W. In response to the second input signal generated by key Q, the first operation corresponding to key W is executed, i.e., the shooting operation is performed. Between buttons W and A, the weight information is determined based on the adjacency between the buttons. Since button W has a higher weight than button A, its priority is higher. Therefore, pressing button Q is approximated as pressing button W. In response to the second input signal generated by button Q, the first operation corresponding to button W is executed, i.e., a shot is taken. This avoids missed scoring opportunities due to accidental button presses, greatly improving the user's gaming experience.
[0107] This application provides an embodiment of an input control device, such as... Figure 4 As shown, the device includes:
[0108] The first processing unit 401 is configured to, in a first state, obtain a first input signal generated by a first key and perform a first operation in response to the first input signal, and / or obtain a second input signal generated by a second key and perform a second operation in response to the second input signal;
[0109] The second processing unit 402 is configured to switch from the first state to the second state if the switching condition is met. In the second state, it obtains the first input signal generated by the first button and performs the first operation in response to the first input signal. It also obtains the second input signal generated by the second button and performs the first operation in response to the second input signal. The first button and the second button satisfy a preset positional relationship.
[0110] In some embodiments, the second processing unit 402 is used for
[0111] If, in the second state, there is a second input signal generated by the second button and a first input signal generated by the first button that satisfies the preset positional relationship with the second button, then the first operation is performed in response to at least one of the first input signal and the second input signal.
[0112] In some embodiments, the second processing unit 402 is configured to perform at least one of the following:
[0113] The first operation is performed in response to one of the first input signal and the second input signal, according to the generation order of the first input signal and the second input signal;
[0114] The second input signal is generated based on scanning the second key, and the first input signal is generated based on scanning the first key; the first operation is performed in response to either the first input signal or the second input signal, based on the scanning order of the second key and the first key;
[0115] The second input signal and the first input signal are generated based on the received message descriptor; the first operation is performed in response to one of the first input signal and the second input signal based on the response order of the message descriptor.
[0116] In some embodiments, the second processing unit 402 is used for
[0117] If, in the second state, there exists a second input signal generated by the second button and a third input signal generated by the third button that does not satisfy the preset positional relationship, and the third button does not have a button that satisfies the preset positional relationship with it, then the first operation is performed in response to the second input signal.
[0118] In some embodiments, the second processing unit 402 is used for
[0119] If, in the second state, there is a second input signal generated by the second button and a third input signal generated by the third button that does not satisfy the preset positional relationship, according to the target response sequence, in response to the second input signal, a first operation corresponding to at least one of the first buttons that have the preset positional relationship with the second button and the first button that has the preset positional relationship with the third button is executed.
[0120] In some embodiments, if the number of first buttons that satisfy the preset positional relationship with the second button is at least two...
[0121] The second processing unit 402 is configured to perform a first operation corresponding to one of the first buttons in response to the second input signal based on the priority information of each of the at least two first buttons; wherein the priority information of the first button is obtained based on at least one of the historical usage information and weight information of the first button.
[0122] It should be noted that the input control device in this application embodiment solves the problem in a similar way to the aforementioned input control method. Therefore, the implementation process and implementation principle of the input control device can be found in the description of the implementation process and implementation principle of the aforementioned input control method, and the repeated parts will not be repeated.
[0123] It should be noted that the description of the electronic device in the embodiments of this application is similar to the description of the input control method embodiments described above, and has similar beneficial effects as the method embodiments, therefore, it will not be repeated. For any technical details not covered in the electronic device provided in the embodiments of this application, please refer to... Figures 1 to 3 The meaning is understood in accordance with the description of any of the accompanying drawings.
[0124] According to embodiments of this application, this application also provides an electronic device and a readable storage medium. The computer instructions are used to cause the computer to perform the methods described in this application.
[0125] Figure 5 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of this application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the application described and / or claimed herein.
[0126] like Figure 5 As shown, device 800 includes a computing unit 801, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 802 or a computer program loaded from storage unit 808 into random access memory (RAM) 803. RAM 803 may also store various programs and data required for the operation of device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via bus 804. Input / output (I / O) interface 805 is also connected to bus 804.
[0127] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of monitors, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0128] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as input control methods. For example, in some embodiments, the input control method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the input control method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform input control methods by any other suitable means (e.g., by means of firmware).
[0129] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0130] The program code used to implement the methods of this application may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0131] In the context of this application, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0132] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0133] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0134] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0135] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this application can be achieved, and this is not limited herein.
[0136] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An input control method, comprising: In a first state, a first input signal generated by a first button is obtained, and a first operation is performed in response to the first input signal; and / or a second input signal generated by a second button is obtained, and a second operation is performed in response to the second input signal. If the switching condition is met, the system switches from the first state to the second state. In the second state, the system obtains the first input signal generated by the first button and performs the first operation in response to the first input signal. The system also obtains the second input signal generated by the second button and performs the first operation in response to the second input signal. The first button and the second button satisfy a preset positional relationship. The first key is one or more keys specified on the input device; In the second state, obtaining the second input signal generated by the second button and performing the first operation in response to the second input signal includes: If, in the second state, there exists a second input signal generated by the second button and a third input signal generated by the third button, and the third button does not have a first button that satisfies the preset positional relationship with it, and the third button and the first button are not the same button, then the first operation is performed in response to the second input signal.
2. The method according to claim 1, wherein in the second state, obtaining the second input signal generated by the second button and performing the first operation in response to the second input signal includes: If, in the second state, there is a second input signal generated by the second button and a first input signal generated by the first button that satisfies the preset positional relationship with the second button, then the first operation is performed in response to at least one of the first input signal and the second input signal.
3. The method of claim 2, wherein performing the first operation in response to at least one of the first input signal and the second input signal comprises: The first operation is performed in response to one of the first input signal and the second input signal, according to the generation order of the first input signal and the second input signal.
4. The method according to claim 2, wherein the second input signal is generated based on scanning the second key, and the first input signal is generated based on scanning the first key; in, The operation of performing the first operation in response to at least one of the first input signal and the second input signal includes: Based on the scanning order of the second button and the first button, the first operation is performed in response to one of the first input signal and the second input signal.
5. The method according to claim 2, wherein the second input signal and the first input signal are generated based on the received message descriptor; in, The operation of performing the first operation in response to at least one of the first input signal and the second input signal includes: The first operation is performed in response to either the first input signal or the second input signal, based on the response order of the message descriptor.
6. The method of claim 1, wherein in the second state, obtaining the second input signal generated by the second button and performing the first operation in response to the second input signal comprises: If, in the second state, there is a second input signal generated by the second button and a third input signal generated by a third button that does not satisfy the preset positional relationship with the second button, then, according to the target response sequence, in response to the second input signal, a first operation corresponding to at least one of the first buttons that have the preset positional relationship with the second button and the first button that has the preset positional relationship with the third button is executed.
7. The method according to claim 1, wherein if the number of first buttons that satisfy the preset positional relationship with the second button is at least two, In the second state, performing the first operation in response to the second input signal includes: Based on the priority information of each of the at least two first buttons, in response to the second input signal, a first operation corresponding to one of the first buttons is executed; The priority information of the first button is obtained based on at least one of the historical usage information and weight information of the first button.
8. An input control device, comprising: The first processing unit is configured to, in a first state, obtain a first input signal generated by a first key and perform a first operation in response to the first input signal, and / or obtain a second input signal generated by a second key and perform a second operation in response to the second input signal; The second processing unit is configured to switch from the first state to the second state if a switching condition is met; in the second state, it obtains the first input signal generated by the first button and performs the first operation in response to the first input signal; it also obtains a second input signal generated by the second button and performs the first operation in response to the second input signal; wherein the first button and the second button satisfy a preset positional relationship; the first button is one or more buttons specified on the input device. The second processing unit is used for: If, in the second state, there exists a second input signal generated by the second button and a third input signal generated by the third button, and the third button does not have a first button that satisfies the preset positional relationship with it, and the third button and the first button are not the same button, then the first operation is performed in response to the second input signal.
9. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
Citation Information
Patent Citations
Input error correction method and device, and device for input error correction
CN107229348A
Photoelectric intelligent error correction keyboard
CN115291737A