+

CN111537871B - Key testing method and device, electronic equipment and storage medium - Google Patents

Key testing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111537871B
CN111537871B CN202010277348.0A CN202010277348A CN111537871B CN 111537871 B CN111537871 B CN 111537871B CN 202010277348 A CN202010277348 A CN 202010277348A CN 111537871 B CN111537871 B CN 111537871B
Authority
CN
China
Prior art keywords
key
keys
trigger instruction
test
generating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010277348.0A
Other languages
Chinese (zh)
Other versions
CN111537871A (en
Inventor
黄长斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN202010277348.0A priority Critical patent/CN111537871B/en
Publication of CN111537871A publication Critical patent/CN111537871A/en
Application granted granted Critical
Publication of CN111537871B publication Critical patent/CN111537871B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/327Testing of circuit interrupters, switches or circuit-breakers
    • G01R31/3277Testing of circuit interrupters, switches or circuit-breakers of low voltage devices, e.g. domestic or industrial devices, such as motor protections, relays, rotation switches

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the application discloses a key test method, which comprises the following steps: when the electronic equipment does not enter a key test stage, obtaining a detection result of a trigger instruction; if the detection result represents that the trigger instruction is not detected, obtaining the test operation of the key of the electronic equipment; responding to the test operation and generating a trigger instruction; and generating a test result based on the trigger instruction. The embodiment of the application also discloses a key testing device, electronic equipment and a storage medium.

Description

Key testing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of key testing technologies, and in particular, to a key testing method, a key testing apparatus, an electronic device, and a storage medium.
Background
Electronic devices with physical keys, such as mobile terminals, desktop computers, notebook computers, point of sale (POS), and the like, perform key testing before shipment, so as to ensure that the key functions of the terminal devices are normal after shipment.
However, the problem of misjudgment of the key test caused by the failure of the physical key exists in the related art.
Disclosure of Invention
The embodiment of the application is expected to provide a key test method, a key test device, electronic equipment and a storage medium, and solve the problem that misjudgment occurs in key test due to the fact that a physical key breaks down in the related technology.
The technical scheme of the application is realized as follows:
a method of key testing, the method comprising:
when the electronic equipment does not enter a key test stage, obtaining a detection result of a trigger instruction;
if the detection result represents that the trigger instruction is not detected, obtaining the test operation of the key of the electronic equipment;
responding to the test operation and generating a trigger instruction;
and generating a test result based on the trigger instruction.
Optionally, if the detection result indicates that the trigger instruction is not detected, obtaining a test operation on a key of the electronic device includes:
and if the detection result represents that the trigger instruction is not detected, obtaining a test operation on a first key in all keys of the electronic equipment, wherein the first key is any key in all keys.
Optionally, the generating a test result based on the trigger instruction includes:
analyzing the trigger instruction to obtain the number of second keys in a display area of the electronic equipment related to the trigger instruction, wherein the trigger instruction is used for adjusting display parameters corresponding to the second keys;
if the number of the first keys is the same as that of the second keys, responding to the trigger instruction, and adjusting display parameters corresponding to the second keys;
obtaining display parameters of the adjusted second key corresponding to each key in all the keys;
and if the adjusted display parameters of the second key are preset display parameters, generating the test result for representing that the test passes.
Optionally, the method further includes:
and if the number of the second keys is larger than that of the first keys, generating the test result for representing that the test fails.
Optionally, the method further includes:
if the number of the second keys is larger than that of the first keys, generating first prompt information, wherein the first prompt information is used for prompting that the first keys have a first fault;
and outputting the first prompt message.
Optionally, the method further includes:
if the detection result represents that the trigger instruction is detected, generating second prompt information, wherein the second prompt information is used for prompting that a second fault exists;
and outputting the second prompt message.
Optionally, if the detection result indicates that the trigger instruction is not detected, obtaining a test operation on a first key of all keys of the electronic device includes:
if the detection result represents that the trigger instruction is not detected, generating third prompt information and outputting the third prompt information, wherein the third prompt information is used for prompting that the number of the test objects is one;
and obtaining the test operation of the first key.
A key test device, the device comprising:
the obtaining unit is used for obtaining the detection result of the trigger instruction when the electronic equipment does not enter a key test stage;
the first processing unit is used for obtaining the test operation of the key of the electronic equipment if the detection result represents that the trigger instruction is not detected;
the generating unit is used for responding to the test operation and generating a trigger instruction;
and the second processing unit is used for generating a test result based on the trigger instruction. .
An electronic device, the electronic device comprising: a processor, a memory, and a communication bus;
the communication bus is used for realizing communication connection between the processor and the memory;
the processor is used for executing the key test program stored in the memory so as to realize the following steps:
when the electronic equipment does not enter a key test stage, obtaining a detection result of a trigger instruction;
if the detection result represents that the trigger instruction is not detected, obtaining the test operation of the key of the electronic equipment;
responding to the test operation and generating a trigger instruction;
and generating a test result based on the trigger instruction.
A storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the key press testing method of any one of the above.
According to the key testing method, the key testing device, the electronic equipment and the storage medium, when the electronic equipment does not enter the key testing stage, a detection result of a trigger instruction is obtained; if the detection result represents that the trigger instruction is not detected, obtaining the test operation of the key of the electronic equipment; responding to the test operation and generating a trigger instruction; generating a test result based on the trigger instruction; that is to say, the electronic device detects whether a trigger instruction is received or not in the test preparation stage, and then enters the key test stage when the trigger instruction is not received, so that the misjudgment phenomenon caused by the fault of the key is avoided, and the reliability of the key test is improved.
Drawings
Fig. 1 is a schematic flowchart of a key testing method according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of another key testing method according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of another key testing method according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a key testing device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
It should be appreciated that reference throughout this specification to "an embodiment of the present application" or "an embodiment described previously" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrase "in an embodiment of the present application" or "in the foregoing embodiment" appearing in various places throughout the specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application. The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The embodiment of the application provides a key test method, which is applied to electronic equipment and shown in fig. 1, and comprises the following steps:
step 101, when the electronic device does not enter a key test stage, obtaining a detection result of a trigger instruction.
In the embodiment of the present application, the electronic device may include a mobile terminal device such as a mobile phone, a tablet computer, a notebook computer, a Personal Digital Assistant (PDA), a camera, a wearable device, and the like.
In the embodiment of the application, the electronic device is provided with physical keys, and the physical keys can also be called as entity keys. Here, the number of the physical keys is plural, and the functions of the plural physical keys are different. Illustratively, the entity keys include a volume key, a lock screen key, a character input key, and a Home key. In the embodiment of the application, the electronic device further comprises a display area, and under some trigger operations, virtual keys can be displayed in the display area, and the virtual keys and the entity keys have corresponding relations.
In the embodiment of the application, when the electronic device does not enter the key test stage, the physical key in the electronic device is not triggered, which may be referred to as a preparation stage at this time, and in the preparation stage, the electronic device executes the detection operation of the trigger instruction, determines whether the trigger instruction is acquired, and further preliminarily determines whether the misjudgment occurs.
In some embodiments, after the electronic device enters the preparation phase, the detection result of the trigger instruction is obtained within a first time length, and the first time length is a maximum time length of the duration of the preparation phase.
In the embodiment of the application, the electronic device obtains the detection result of the trigger instruction, and at least the following two situations exist: in the first situation, when the electronic equipment does not enter a key test stage, a key in the electronic equipment is not triggered, and the detection result of the trigger instruction is obtained as the trigger instruction is not detected; in the second case, when the electronic device does not enter the key test stage, although the key in the electronic device is not triggered, the detection result of obtaining the trigger instruction is that the trigger instruction is detected, and the electronic device determines that the physical key has an abnormality, which may be caused by the physical key having a stuck, a short circuit, a poor contact, and the like. Therefore, the electronic equipment can quickly determine the abnormal phenomenon, the detection efficiency is improved, and the possibility of misjudgment is reduced.
And 102, if the detection result represents that the trigger instruction is not detected, obtaining the test operation of the key of the electronic equipment.
In the embodiment of the application, when the electronic device determines that the detection result of the trigger instruction is that the trigger instruction is not detected, when an operation object executes a test operation on a key of the electronic device, the electronic device detects the test operation. In some embodiments, the test operation comprises a pressing operation of a key.
And 103, responding to the test operation and generating a trigger instruction.
Here, the trigger instruction is used to change the display parameter of the identification information corresponding to the key.
In the embodiment of the present application, the identification information is information that is presented in a display area of the electronic device and is used for identifying the virtual keys corresponding to the physical keys, and it should be noted that the identification information corresponding to each virtual key is unique.
For example, both a physical key and a unique virtual key corresponding to the physical key may have the same identification information. Of course, both the physical key and the unique virtual key corresponding to the physical key may have different identification information. Here, the display parameters of the identification information include, but are not limited to, color, size, brightness of the identification information.
In some embodiments, the trigger instruction is for changing at least one of a color, a size, and a brightness of the identification information presented in the display area.
In practical applications, an example of a case where the electronic device generates a trigger instruction for changing a display parameter of the identification information in the display area corresponding to the physical key is as follows: example one: after the electronic equipment responds to the test operation, a trigger instruction is generated, the trigger instruction is used for changing the color of the identification information in the display area, if the initial color of the identification information in the display area is black, the trigger instruction is used for changing the current color of the identification information to red; example two: after the electronic equipment responds to the test operation, a trigger instruction is generated, the trigger instruction is used for changing the brightness of the identification information in the display area, if the initial brightness of the identification information in the display area corresponds to a first brightness value, the trigger instruction is used for changing the current brightness of the identification information into the brightness corresponding to a second brightness value, and the second brightness value is larger than the first brightness value; in an example three, after the electronic device responds to the test operation, a trigger instruction is generated, the trigger instruction is used for changing the size of the identification information in the display area, for example, the initial size of the identification information presented in the display area corresponds to a first size, and the trigger instruction is used for changing the current size of the identification information to correspond to a second size, where the second size is larger than the first size.
And step 104, generating a test result based on the trigger instruction.
Here, the test result includes a result of test passing or test failing; all the keys in the electronic equipment are normal in function after passing the test, and the keys in the electronic equipment are abnormal when not passing the test.
In an implementation scenario, the electronic device lights all virtual keys corresponding to each key in the display area of the electronic device based on a trigger instruction, and then generates a test result that the test is passed.
According to the key testing method provided by the embodiment of the application, when the electronic equipment does not enter the key testing stage, the detection result of the trigger instruction is obtained; if the detection result represents that the trigger instruction is not detected, obtaining the test operation of the key of the electronic equipment; responding to the test operation and generating a trigger instruction; generating a test result based on the trigger instruction; that is to say, the electronic device detects whether a trigger instruction is received or not in the test preparation stage, and then enters the key test stage when the trigger instruction is not received, so that the misjudgment phenomenon caused by the fault of the key is avoided, and the reliability of the key test is improved.
An embodiment of the present application provides a key test method, which is applied to an electronic device, and as shown in fig. 2, the electronic device may perform steps 201 to 207 to implement the key test method, or the electronic device may also perform steps 201 to 204 and 208 to implement the key test method, or the electronic device may also perform steps 201 and 209 to 210;
step 201, when the electronic device does not enter the key test stage, obtaining a detection result of the trigger instruction.
Step 202, if the detection result indicates that the trigger instruction is not detected, obtaining a test operation on a first key in all keys of the electronic device.
The first key is any one of all keys.
In the embodiment of the application, when the electronic device does not enter the key test stage, the physical keys in the electronic device are not triggered, which may be called a preparation stage, after the electronic device enters the preparation stage, the detection result of the trigger instruction is obtained within a first time period, and when the detection result indicates that the electronic device does not detect the trigger instruction, the electronic device enters the key test stage, and the test operation on any key in all keys of the electronic device is obtained.
In this embodiment of the application, before the test operation on the first key of all keys of the electronic device is obtained in step 202, the following method may be further implemented:
and S1, if the detection result represents that the trigger instruction is not detected, generating third prompt information and outputting the third prompt information.
And the third prompt message is used for prompting that the number of the test objects is one.
Here, the test object is a physical key in the electronic device.
And S2, obtaining the test operation of the first key.
In the embodiment of the application, after the electronic device generates the third prompt message and outputs the third prompt message, the electronic device obtains the test operation performed by the operation object on the first key based on the third prompt message.
Step 203, responding to the test operation, and generating a trigger instruction.
And 204, analyzing the trigger instruction to obtain the number of the second keys in the display area of the electronic equipment related to the trigger instruction.
And the triggering instruction is used for adjusting the display parameters corresponding to the second key.
Here, the second key may be understood as a virtual key in a display area of the electronic device.
And step 205, if the number of the first keys is the same as that of the second keys, responding to the trigger instruction and adjusting the display parameters corresponding to the second keys.
In the embodiment of the application, the electronic device obtains the number of the second keys in the display area of the electronic device associated with the trigger instruction, and if the number of the first keys is the same as the number of the second keys, that is, if the operation object presses one physical key, the electronic device determines that the number of the second keys associated with the generated trigger instruction is also one, and at this time, responds to the trigger instruction and adjusts the display parameters corresponding to the second keys based on the trigger instruction.
And step 206, obtaining the adjusted display parameters of the second key corresponding to each key in all keys.
In the embodiment of the application, the display parameters of the adjusted second key are different from the display parameters of the second key before adjustment, and the display parameters of the adjusted second key are used for highlighting the second key, for example, the brightness of the adjusted second key is obviously greater than the brightness of the second key before adjustment in a visual effect.
And step 207, if the adjusted display parameters of the second key are preset display parameters, generating a test result for representing that the test passes.
Here, the preset display parameter may be understood as a display parameter corresponding to a second key pre-stored in the electronic device. The preset display parameter may be at least one of a preset color, a preset size, and a preset brightness corresponding to the second key in the display area of the electronic device.
In the embodiment of the application, the display parameters of the adjusted second keys corresponding to each key in all keys in the electronic device are preset display parameters, and a test result used for representing that the key test passes is generated.
And step 208, if the number of the second keys is larger than that of the first keys, generating a test result for representing that the test fails.
In the embodiment of the application, the electronic device acquires the number of second keys in a display area of the electronic device associated with the trigger instruction, and if the number of the second keys is larger than the number of the first keys, a test result used for representing that the key test fails is generated.
In this embodiment of the application, if the number of the second keys is greater than the number of the first keys, in step 208, a test result used for representing that the test fails is generated, which may also be implemented by the following steps:
and S1, if the number of the second keys is larger than that of the first keys, generating first prompt information.
The first prompt message is used for prompting that the first key has a first fault.
Here, the first failure may be understood as a key linkage failure of a physical key in the electronic device.
In the embodiment of the application, the electronic equipment acquires the number of second keys in a display area of the electronic equipment, which is associated with the trigger instruction, and if the number of the second keys is larger than that of the first keys, first prompt information for prompting the first keys that key linkage exists is generated.
And S2, outputting first prompt information.
And 209, if the detection result represents that the trigger instruction is detected, generating second prompt information.
And the second prompt message is used for prompting the existence of the second fault.
Here, the second failure may be understood as a failure such as a jam or a short circuit of a physical key in the electronic device, and the second failure may be understood as a failure such as a contact failure of a physical key in the electronic device.
In the embodiment of the application, when the electronic equipment does not enter a key test stage, the electronic equipment obtains a detection result of the trigger instruction and generates second prompt information for prompting that the key is stuck, short-circuited and/or the key has poor contact if the trigger instruction is detected.
And step 210, outputting second prompt information.
It should be noted that, for the description of the same steps and the same contents in this embodiment as those in other embodiments, reference may be made to the description in the other embodiments, which is not repeated herein.
An embodiment of the present application provides a key testing method, which is shown in fig. 3 and includes the following steps:
step 301, under the condition that the electronic device enters the test preparation stage but does not enter the key test stage, the electronic device detects whether a key trigger instruction exists.
Step 302, the electronic device detects a key triggering instruction, outputs a prompt message for prompting that whether a card key exists in the key is checked, sets the parameter of the flag bit in the register as a parameter representing the key test failure, and then ends the key test process.
Step 303, the electronic device does not detect the key triggering instruction, and the time interval is specific, for example, 2 seconds.
And step 304, under the condition that the operation object presses the first key, the electronic equipment judges whether a key triggering instruction is detected or not.
The first key is one of the physical keys.
Step 305, the electronic device detects a key triggering instruction, analyzes the number of keys of the second key in the display area associated with the triggering instruction, and determines whether the number of keys of the second key is two or more.
Step 306, when the electronic device determines that the number of the second keys is two or more, outputting a prompt message for prompting "do not press two keys at the same time", setting the parameter of the flag bit in the register as a parameter for indicating that the key test fails, and then ending the key test process.
Step 307, when the electronic device determines that the number of the second key is one, lighting up the identification information of the second key, such as an icon of the second key.
Step 308, the electronic device determines whether the icons of the second keys in the display areas corresponding to all the physical keys in the physical keys are all lighted.
Step 309, the electronic device determines that icons of second keys in display areas corresponding to all the physical keys in the physical keys are lighted, outputs prompt information for prompting that the key functions are normal, sets parameters of flag bits in a register as parameters representing successful key test, and then ends the key test process.
It should be noted that, for the descriptions of the same steps and the same contents in this embodiment as those in other embodiments, reference may be made to the descriptions in other embodiments, which are not described herein again.
An embodiment of the present application provides a key testing apparatus, which may be applied to a key testing method provided in the embodiment corresponding to fig. 1 to 2, and as shown in fig. 4, the key testing apparatus 4 includes:
the obtaining unit 41 is configured to obtain a detection result of the trigger instruction when the electronic device does not enter the key test stage;
the first processing unit 42 is configured to, if the detection result indicates that the trigger instruction is not detected, obtain a test operation on a key of the electronic device;
a generating unit 43, configured to generate a trigger instruction in response to the test operation;
and the second processing unit 44 is used for generating a test result based on the trigger instruction.
In other embodiments of the present application, the first processing unit 42 is further configured to, if the detection result indicates that the trigger instruction is not detected, obtain a test operation on a first key of all keys of the electronic device, where the first key is any key of all keys.
In other embodiments of the present application, the second processing unit 44 is further configured to analyze the trigger instruction to obtain the number of second keys in the display area of the electronic device associated with the trigger instruction, where the trigger instruction is used to adjust the display parameters corresponding to the second keys; if the number of the first keys is the same as that of the second keys, responding to a trigger instruction and adjusting display parameters corresponding to the second keys; obtaining display parameters of the adjusted second key corresponding to each key in all keys; and if the adjusted display parameters of the second key are preset display parameters, generating a test result for representing that the test is passed.
In other embodiments of the present application, the second processing unit 44 is further configured to generate a test result for indicating that the test fails if the number of the second keys is greater than the number of the first keys.
In other embodiments of the present application, the second processing unit 44 is further configured to generate first prompt information if the number of the second keys is greater than the number of the first keys, where the first prompt information is used to prompt that the first key has the first fault; and outputting the first prompt message.
In other embodiments of the present application, the first processing unit 42 is further configured to generate second prompt information if the detection result represents that the trigger instruction is detected, where the second prompt information is used to prompt that a second fault exists; and outputting the second prompt message.
In other embodiments of the present application, the first processing unit 42 is further configured to generate third prompt information and output the third prompt information if the detection result indicates that the trigger instruction is not detected, where the third prompt information is used to prompt that the number of the test objects is one; and obtaining the test operation of the first key.
Based on the foregoing embodiments, an embodiment of the present application provides an electronic device, which may be applied to a key test method provided in the embodiments corresponding to fig. 1 to 2, and as shown in fig. 5, the electronic device 5 (the electronic device 5 in fig. 5 corresponds to the key test apparatus 4 in fig. 4) includes: a processor 51, a memory 52 and a communication bus 53, wherein:
the communication bus 53 is used to realize a communication connection between the processor 51 and the memory 52.
The processor 51 is configured to execute the key test program stored in the memory 52 to implement the following steps:
when the electronic equipment does not enter a key test stage, obtaining a detection result of a trigger instruction;
if the detection result represents that the trigger instruction is not detected, obtaining the test operation of the key of the electronic equipment;
responding to the test operation and generating a trigger instruction;
and generating a test result based on the trigger instruction.
In other embodiments of the present application, the processor 51 is configured to execute the key test program stored in the memory 52 to implement the following steps:
and if the detection result represents that the trigger instruction is not detected, obtaining the test operation of a first key in all keys of the electronic equipment, wherein the first key is any key in all keys.
In other embodiments of the present application, the processor 51 is configured to execute the key test program stored in the memory 52 to implement the following steps:
analyzing the trigger instruction to obtain the number of second keys in a display area of the electronic equipment related to the trigger instruction, wherein the trigger instruction is used for adjusting display parameters corresponding to the second keys;
if the number of the first keys is the same as that of the second keys, responding to a trigger instruction and adjusting display parameters corresponding to the second keys;
obtaining display parameters of the adjusted second key corresponding to each key in all keys;
and if the adjusted display parameters of the second key are preset display parameters, generating a test result for representing that the test is passed.
In other embodiments of the present application, the processor 51 is configured to execute the key test program stored in the memory 52 to implement the following steps:
and if the number of the second keys is larger than that of the first keys, generating a test result for representing that the test fails.
In other embodiments of the present application, the processor 51 is configured to execute the key test program stored in the memory 52 to implement the following steps:
if the number of the second keys is larger than that of the first keys, generating first prompt information, wherein the first prompt information is used for prompting that the first keys have a first fault;
and outputting the first prompt message.
In other embodiments of the present application, the processor 51 is configured to execute the key test program stored in the memory 52 to implement the following steps:
if the detection result represents that the trigger instruction is detected, generating second prompt information, wherein the second prompt information is used for prompting that a second fault exists;
and outputting the second prompt message.
In other embodiments of the present application, the processor 51 is configured to execute the key test program stored in the memory 52 to implement the following steps:
if the detection result represents that the trigger instruction is not detected, generating third prompt information and outputting the third prompt information, wherein the third prompt information is used for prompting that the number of the test objects is one;
and obtaining the test operation of the first key.
It should be noted that, for the descriptions of the same steps and the same contents in this embodiment as those in other embodiments, reference may be made to the descriptions in other embodiments, which are not described herein again.
Based on the foregoing embodiments, embodiments of the present application provide a computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the steps of:
when the electronic equipment does not enter a key test stage, obtaining a detection result of a trigger instruction;
if the detection result represents that the trigger instruction is not detected, obtaining the test operation of the key of the electronic equipment;
responding to the test operation and generating a trigger instruction;
and generating a test result based on the trigger instruction.
In other embodiments of the present application, the one or more programs are executable by the one or more processors and further implement the steps of:
and if the detection result represents that the trigger instruction is not detected, obtaining the test operation of a first key in all keys of the electronic equipment, wherein the first key is any key in all keys.
In other embodiments of the present application, the one or more programs are executable by the one or more processors and further implement the steps of:
analyzing the trigger instruction to obtain the number of second keys in a display area of the electronic equipment related to the trigger instruction, wherein the trigger instruction is used for adjusting display parameters corresponding to the second keys;
if the number of the first keys is the same as that of the second keys, responding to a trigger instruction and adjusting display parameters corresponding to the second keys;
obtaining display parameters of the adjusted second key corresponding to each key in all keys;
and if the adjusted display parameters of the second key are preset display parameters, generating a test result for representing that the test is passed.
In other embodiments of the present application, the one or more programs are executable by the one or more processors and further implement the steps of:
and if the number of the second keys is larger than that of the first keys, generating a test result for representing that the test fails.
In other embodiments of the present application, the one or more programs are executable by the one or more processors and further implement the steps of:
if the number of the second keys is larger than that of the first keys, generating first prompt information, wherein the first prompt information is used for prompting that the first keys have a first fault;
and outputting the first prompt message.
In other embodiments of the present application, the one or more programs are executable by the one or more processors and further implement the steps of:
if the detection result represents that the trigger instruction is detected, generating second prompt information, wherein the second prompt information is used for prompting that a second fault exists;
and outputting the second prompt message.
In other embodiments of the present application, the one or more programs are executable by the one or more processors and further implement the steps of:
if the detection result indicates that the trigger instruction is not detected, generating third prompt information and outputting the third prompt information, wherein the third prompt information is used for prompting that the number of the test objects is one;
and obtaining the test operation of the first key.
It should be noted that, for the description of the same steps and the same contents in this embodiment as those in other embodiments, reference may be made to the description in the other embodiments, which is not repeated herein.
The computer storage medium/Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read Only Memory (EPROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a magnetic Random Access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read-Only Memory (CD-ROM), and the like; and may be various terminals such as mobile phones, computers, tablet devices, personal digital assistants, etc., including one or any combination of the above-mentioned memories.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of a unit is only one logical function division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or in other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all functional units in the embodiments of the present application may be integrated into one processing module, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit. Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as a removable Memory device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The methods disclosed in the several method embodiments provided in the present application may be combined arbitrarily without conflict to obtain new method embodiments.
Features disclosed in several of the product embodiments provided in the present application may be combined in any combination to yield new product embodiments without conflict.
The features disclosed in the several method or apparatus embodiments provided herein may be combined in any combination to arrive at a new method or apparatus embodiment without conflict.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (9)

1. A key test method is applied to electronic equipment, and is characterized by comprising the following steps:
when the electronic equipment does not enter a key test stage, obtaining a detection result of a trigger instruction;
if the detection result represents that the trigger instruction is not detected, obtaining a test operation on a first key in all keys of the electronic equipment, wherein the first key is any key in all keys;
responding to the test operation and generating a trigger instruction;
generating a test result based on the trigger instruction;
wherein the generating a test result based on the trigger instruction comprises:
analyzing the trigger instruction to obtain the number of second keys in a display area of the electronic equipment related to the trigger instruction, wherein the trigger instruction is used for adjusting display parameters corresponding to the second keys;
generating a test result based on the number relation between the first key and the second key; the number relation comprises that the number of the first keys is the same as that of the second keys, and the number of the second keys is larger than that of the first keys.
2. The method for testing keys according to claim 1, wherein the generating the test result based on the number relationship between the first key and the second key comprises:
if the number of the first keys is the same as that of the second keys, responding to the trigger instruction and adjusting display parameters corresponding to the second keys;
obtaining display parameters of the adjusted second key corresponding to each key in all the keys;
and if the adjusted display parameters of the second key are preset display parameters, generating the test result for representing that the test passes.
3. The method for testing key-press according to claim 1, wherein the generating a test result based on the number relationship between the first key-press and the second key-press comprises:
and if the number of the second keys is larger than that of the first keys, generating the test result for representing that the test fails.
4. The key press testing method of claim 3, further comprising:
if the number of the second keys is larger than that of the first keys, generating first prompt information, wherein the first prompt information is used for prompting that the first keys have a first fault;
and outputting the first prompt message.
5. The key test method according to any one of claims 1 to 4, wherein the method further comprises:
if the detection result represents that the trigger instruction is detected, generating second prompt information, wherein the second prompt information is used for prompting that a second fault exists;
and outputting the second prompt message.
6. The key test method according to any one of claims 1 to 4, wherein if the detection result indicates that the trigger instruction is not detected, obtaining a test operation on a first key of all keys of the electronic device includes:
if the detection result represents that the trigger instruction is not detected, generating third prompt information and outputting the third prompt information, wherein the third prompt information is used for prompting that the number of the test objects is one;
and obtaining the test operation of the first key.
7. A key test device, the device comprising:
the obtaining unit is used for obtaining the detection result of the trigger instruction when the electronic equipment does not enter a key test stage;
the first processing unit is used for obtaining a test operation on a first key in all keys of the electronic equipment if the detection result represents that the trigger instruction is not detected, wherein the first key is any key in all keys;
the generating unit is used for responding to the test operation and generating a trigger instruction;
the second processing unit is used for analyzing the trigger instruction to obtain the number of second keys in a display area of the electronic equipment related to the trigger instruction, wherein the trigger instruction is used for adjusting display parameters corresponding to the second keys; generating a test result based on the number relation between the first key and the second key; the number relationship comprises that the number of the first keys is the same as that of the second keys, and the number of the second keys is larger than that of the first keys.
8. An electronic device, characterized in that the electronic device comprises: a processor, a memory, and a communication bus;
the communication bus is used for realizing communication connection between the processor and the memory;
the processor is used for executing the key test program stored in the memory so as to realize the following steps:
when the electronic equipment does not enter a key test stage, obtaining a detection result of a trigger instruction;
if the detection result represents that the trigger instruction is not detected, obtaining a test operation on a first key in all keys of the electronic equipment, wherein the first key is any key in all keys;
responding to the test operation and generating a trigger instruction;
analyzing the trigger instruction to obtain the number of second keys in a display area of the electronic equipment, wherein the number of the second keys is associated with the trigger instruction, and the trigger instruction is used for adjusting display parameters corresponding to the second keys;
generating a test result based on the number relation between the first key and the second key; the number relationship comprises that the number of the first keys is the same as that of the second keys, and the number of the second keys is larger than that of the first keys.
9. A storage medium, characterized in that the storage medium stores one or more programs executable by one or more processors to implement the keystroke testing method of any of claims 1 to 6.
CN202010277348.0A 2020-04-10 2020-04-10 Key testing method and device, electronic equipment and storage medium Active CN111537871B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010277348.0A CN111537871B (en) 2020-04-10 2020-04-10 Key testing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010277348.0A CN111537871B (en) 2020-04-10 2020-04-10 Key testing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111537871A CN111537871A (en) 2020-08-14
CN111537871B true CN111537871B (en) 2022-10-18

Family

ID=71974904

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010277348.0A Active CN111537871B (en) 2020-04-10 2020-04-10 Key testing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111537871B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201876868U (en) * 2010-10-08 2011-06-22 东莞宝元数控科技有限公司 Self-diagnosis system for keyboard key functions

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10311030A1 (en) * 2003-03-13 2004-09-23 Siemens Ag Keyboard for triggering control processes
CN102750811B (en) * 2012-03-09 2015-01-28 张伟明 Misoperation-preventing remote control component, intelligent system and method
CN104251949A (en) * 2013-06-27 2014-12-31 鸿富锦精密工业(深圳)有限公司 Test system and method of touch keys
TWI515556B (en) * 2013-10-09 2016-01-01 緯創資通股份有限公司 Detecting metohd for touch device and system thereof
CN104034990B (en) * 2014-06-30 2017-02-01 珠海格力电器股份有限公司 Remote controller testing method and system
CN110471806A (en) * 2019-07-23 2019-11-19 九阳股份有限公司 A kind of exception button processing method and a kind of cooking apparatus

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201876868U (en) * 2010-10-08 2011-06-22 东莞宝元数控科技有限公司 Self-diagnosis system for keyboard key functions

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
手机测试系统的研究与实现;曲天柱;《中国优秀博硕士学位论文全文数据库(硕士) 信息科技辑》;20110315;全文 *

Also Published As

Publication number Publication date
CN111537871A (en) 2020-08-14

Similar Documents

Publication Publication Date Title
CN109492378B (en) Identity verification method based on equipment identification code, server and medium
CN105117663B (en) The encrypted object display methods and device of a kind of application
CN105549843A (en) Application display method and terminal device
CN101799719B (en) Keyboard and mouse switcher and switching method thereof
CN112541181A (en) Method and device for detecting server security
CN108984234B (en) Calling prompt method for mobile terminal and camera device
CN109062667A (en) A kind of simulator recognition methods, identification equipment and computer-readable medium
CN110908702A (en) Version switching method, version switching device, computer equipment and storage medium
CN108563578B (en) SDK compatibility detection method, device, equipment and readable storage medium
CN106021010A (en) Processing method and device when proximity sensor is abnormal
CN108174018A (en) A kind of information processing method and terminal
CN113138888A (en) Function detection method and device, electronic equipment and storage medium
CN111537871B (en) Key testing method and device, electronic equipment and storage medium
CN106682512A (en) Method, device and system for preventing programs from being corrected
CN110020531A (en) Internet of things equipment risk checking method and device
WO2016127040A1 (en) Method and apparatus for providing security information of user device
CN110570830B (en) Device adjustment method, device, storage medium and electronic device
CN110851055A (en) Robot, method, terminal equipment and storage medium for switching display
CN105243315B (en) Method, apparatus and system for the input of single type picture validation code
CN108984238B (en) Gesture processing method and device of application program and electronic equipment
US20100185797A1 (en) Keyboard-mouse switch and switching method thereof
CN105335657B (en) A kind of program bug detection method and device
CN104935752B (en) A kind of mobile terminal-opening method, device and mobile terminal
CN110568985A (en) Method, medium and device for displaying identification and computing equipment
US11163885B2 (en) Firmware outputted keyboard code to enter operating system state

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载