CN107562350B - Method and device for reporting key event - Google Patents

Method and device for reporting key event Download PDF

Info

Publication number
CN107562350B
CN107562350B CN201710866906.5A CN201710866906A CN107562350B CN 107562350 B CN107562350 B CN 107562350B CN 201710866906 A CN201710866906 A CN 201710866906A CN 107562350 B CN107562350 B CN 107562350B
Authority
CN
China
Prior art keywords
key
reporting
fingerprint information
event
target key
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
CN201710866906.5A
Other languages
Chinese (zh)
Other versions
CN107562350A (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201710866906.5A priority Critical patent/CN107562350B/en
Publication of CN107562350A publication Critical patent/CN107562350A/en
Application granted granted Critical
Publication of CN107562350B publication Critical patent/CN107562350B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Input From Keyboards Or The Like (AREA)
  • Telephone Function (AREA)

Abstract

The disclosure relates to a method and a device for reporting a key event, and belongs to the technical field of electronics. The method comprises the following steps: in the using process of the terminal, the working mode of a sensor corresponding to a detection target key is switched from a reporting mode to a non-reporting mode; and reporting a key lifting event through a sensor corresponding to the target key. With the adoption of the method and the device, the efficiency of executing the operation can be improved.

Description

Method and device for reporting key event
Technical Field
The present disclosure relates to the field of electronic technologies, and in particular, to a method and an apparatus for reporting a key event.
Background
With the development of electronic technology and internet technology, terminals such as mobile phones and computers are widely used, and the functions of the corresponding terminals are more and more abundant. The user may operate the terminal by touching a certain key of the terminal, for example, the user may cause the terminal to display a desktop by touching a home key.
At present, a sensor corresponding to a home key often corresponds to two working modes, namely a navigation mode and a non-reporting mode, wherein when a terminal detects that a screen is turned off and locked, the sensor corresponding to the home key works in the non-reporting mode, when the sensor corresponding to the home key works in the non-reporting mode, the sensor does not report a detected key pressing event and a key lifting event, when the terminal detects that a screen is unlocked, the sensor corresponding to the home key works in the reporting mode, and when the sensor corresponding to the home key works in the reporting mode, the sensor can be used for reporting the key pressing event and the key lifting event.
In carrying out the present disclosure, the inventors found that at least the following problems exist:
at present, when a user wants to lock a screen, the user can press a home key for a long time by fingers to trigger a terminal to execute a screen-off and screen-locking process, wherein before the user presses the home key, a sensor corresponding to the home key works in a point reporting mode, therefore, after the user presses the home key, the sensor corresponding to the home key can report a key press event, often, the fingers of the user lift up after the terminal turns off the screen and locks the screen, the sensor corresponding to the home key switches from the point reporting mode to a non-point reporting mode after the terminal turns off the screen and locks the screen, and after the fingers lift up, the sensor corresponding to the home key does not report the key lift up event.
Due to the matching mechanism of key events, when there are two consecutive identical key events, the key event occurring later will be discarded. After the terminal is unlocked again (wherein the home key enters a reporting mode after the terminal is unlocked again), when the user needs to press the home key, the last time the key press event is reported, so that the detected key press event is discarded, the terminal cannot execute the operation triggered by pressing the home key, and in this case, the user needs to lift the finger and press the finger again to trigger the terminal to execute the operation, so that the efficiency of executing the operation is low.
Disclosure of Invention
In order to overcome the problem of low efficiency of executing operations in the related art, the present disclosure provides a method and an apparatus for reporting a key event. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, a method for reporting a key event is provided, where the method includes:
in the using process of the terminal, the working mode of a sensor corresponding to a detection target key is switched from a reporting mode to a non-reporting mode;
and reporting a key lifting event through a sensor corresponding to the target key.
Optionally, the non-reporting mode is an identification mode.
Optionally, the method further includes:
when a sensor corresponding to the target key is in an identification mode, acquiring currently input first fingerprint information through the sensor when a key pressing event corresponding to the target key is detected through the sensor;
when a key lifting event corresponding to the target key is detected through the sensor, comparing the acquired first fingerprint information with pre-stored reference fingerprint information;
and if the first fingerprint information is matched with the reference fingerprint information, executing screen unlocking processing, and switching the working mode of the sensor corresponding to the target key to a reporting point mode.
Optionally, the method further includes:
when a fingerprint information setting instruction is received, acquiring currently input second fingerprint information through a sensor corresponding to the target key;
storing the second fingerprint information as reference fingerprint information.
Optionally, the reporting a key lifting event through a sensor corresponding to the target key includes:
and reporting a key lifting event to an input program through a main program of a sensor corresponding to the target key.
According to a second aspect of the embodiments of the present disclosure, an apparatus for reporting a key event is provided, where the apparatus includes:
the detection module is used for detecting that the working mode of a sensor corresponding to a target key is switched from a reporting mode to a non-reporting mode in the using process of the terminal;
and the reporting module is used for reporting the key lifting event through the sensor corresponding to the target key.
Optionally, the non-reporting mode is an identification mode.
Optionally, the apparatus further comprises:
the first acquisition module is used for acquiring currently input first fingerprint information through the sensor when a key pressing event corresponding to the target key is detected through the sensor in a state that the sensor corresponding to the target key is in an identification mode;
the comparison module is used for comparing the acquired first fingerprint information with pre-stored reference fingerprint information when the key lifting event corresponding to the target key is detected by the sensor;
and the unlocking module is used for executing screen unlocking processing if the first fingerprint information is matched with the reference fingerprint information, and switching the working mode of the sensor corresponding to the target key to a reporting mode.
Optionally, the apparatus further comprises:
the second acquisition module is used for acquiring currently input second fingerprint information through a sensor corresponding to the target key when a fingerprint information setting instruction is received;
and the storage module is used for storing the second fingerprint information as reference fingerprint information.
Optionally, the reporting module is configured to:
and reporting a key lifting event to a main program of a sensor corresponding to the input through the target key.
According to a third aspect of the embodiments of the present disclosure, there is provided a terminal, where the terminal includes a processor and a memory, where the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the method for reporting a key event according to the first aspect.
According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, in which at least one instruction, at least one program, a code set, or a set of instructions is stored, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by a processor to implement the method for reporting a key event according to the first aspect.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in the embodiment of the disclosure, in the using process of the terminal, the working mode of a sensor corresponding to a detection target key is switched from a reporting mode to a non-reporting mode; and reporting the key lifting event through a sensor corresponding to the target key. Therefore, when a user triggers the terminal to execute the screen-off and screen-locking processing by pressing the target key for a long time, the terminal can actively report the key-up event through the sensor corresponding to the target key. In this case, after the terminal is unlocked again, when the user needs to press the home key in operation, since the key lift event is reported before, the sensor corresponding to the target key reports the detected key press event, and further, the terminal can execute the operation triggered by pressing the target key at this time without pressing the target key again by the user, so that the efficiency of executing the operation can be improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. In the drawings:
FIG. 1 is a flowchart illustrating a method for reporting a key press event according to an example embodiment;
FIG. 2 is a schematic view of a lock screen shown in accordance with an exemplary embodiment;
FIG. 3 is a diagram illustrating an apparatus for reporting a key press event according to an exemplary embodiment;
FIG. 4 is a diagram illustrating an apparatus for reporting a key press event according to an exemplary embodiment;
FIG. 5 is a diagram illustrating an apparatus for reporting a key press event according to an exemplary embodiment;
fig. 6 is a schematic diagram illustrating a structure of a terminal according to an exemplary embodiment.
With the foregoing drawings in mind, certain embodiments of the disclosure have been shown and described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
An exemplary embodiment of the present disclosure provides a method for reporting a key event, which may be used in a terminal, where the terminal may be a terminal with a target key, for example, a mobile terminal such as a mobile phone and a tablet computer with a home key.
The terminal may include a processor, memory, target keys, etc. The processor may be a CPU (central processing Unit), and may be configured to detect a relevant process of switching the operation mode of the target key from the touch-up mode to the non-touch-up mode. The Memory may be a RAM (Random Access Memory), a Flash (Flash Memory), or the like, and may be configured to store received data, data required by a processing procedure, data generated in the processing procedure, or the like, such as reference fingerprint information. The target key may correspond to a sensor, and the sensor may be configured to detect a key event and report the detected key event, so that the terminal executes an operation triggered by the user pressing the target key this time. The terminal may further include a screen, which may be a touch screen, and may be used to detect a touch signal, etc.
The process flow shown in fig. 1 will be described in detail below with reference to the embodiments, and the contents may be as follows:
in step 101, during the use of the terminal, the operation mode of the sensor corresponding to the detection target key is switched from the reporting mode to the non-reporting mode.
In an implementation, a sensor corresponding to a target key in the terminal may have a function of detecting a key event, where the key event may include a key down event (key down event) and a key up event (key up event), where the key down event may be an event triggered when a user finger touches the target key, and the key up event may be an event triggered when the user finger leaves the target key. In the process of using the terminal, when a user wants to lock the screen, the terminal can be triggered to execute the screen locking process through operation, wherein the working mode of the sensor corresponding to the target key is a reporting mode, so that when the user touches the target key through a finger, the corresponding sensor can report a key pressing event, and when the user lifts the finger, the key lifting event can be reported. Specifically, the user may press the target key for a long time, at this time, the sensor corresponding to the target key may detect the key press event and may report the key press event, and when the terminal detects that the duration of the key press event reaches the preset duration, the screen locking process may be executed, and then, the terminal may control the working mode of the sensor corresponding to the target key to be switched from the reporting mode to the non-reporting mode, that is, at this time, the terminal may detect that the working mode of the sensor corresponding to the target key is switched from the reporting mode to the non-reporting mode, as shown in fig. 2.
Optionally, the terminal may further support a fingerprint identification function, and accordingly, the non-reporting mode may be an identification mode (also referred to as a fingerprint identification mode). In the fingerprint identification mode, when a user touches a target key, a sensor corresponding to the target key does not report a key pressing event any more, but collects fingerprint information of the user.
In step 102, a key-up event is reported via a sensor corresponding to the target key.
In implementation, after the terminal detects that the working mode of the sensor corresponding to the target key is switched from the reporting mode to the non-reporting mode, the terminal can actively report the key lifting event through the sensor corresponding to the target key.
Optionally, the target key may report the key up event to the input program, and accordingly, the processing procedure in step 102 may be as follows: and reporting a key lifting event to an input program through a main program of a sensor corresponding to the target key.
In implementation, when the working mode of the sensor corresponding to the target key is switched from the reporting mode to the non-reporting mode, the main program of the sensor corresponding to the target key can actively report a key lifting event to the input program, wherein the input program can be provided with a key event matching mechanism, and when the same key event is continuously received, the input program can discard the subsequent key event without reporting the key event to the frame, so that the frame cannot execute the operation triggered by the key event. In the embodiment of the invention, when the working mode of the sensor corresponding to the target key is detected to be switched from the reporting mode to the non-reporting mode, the main program of the sensor corresponding to the target key can actively transmit (or report) a key lifting event to the input program, so that the input program can match the key lifting event with the key pressing event detected before the screen locking process, and further, when a subsequent user touches the target key again, the key pressing event can be reported to the frame, so that the frame can execute the operation triggered by the user touching the target key at this time. In addition, the user can also trigger the screen locking process by pressing the power key, and for the situation, after the main program of the sensor corresponding to the target key actively reports the key lifting event to the input program, because the input receives the key lifting event before the terminal executes the screen locking process, the input program can discard the key lifting event reported this time after receiving the key lifting event, and other problems cannot be caused.
Optionally, the sensor corresponding to the target key may also actively report the key lifting event when the key event reported last time is not the key lifting event, and correspondingly, the processing procedure in step 102 may be as follows: and if the key event reported last time is a key pressing event, reporting a key lifting event through a sensor corresponding to the target key.
In implementation, after the working mode of the sensor corresponding to the target key is switched from the reporting mode to the non-reporting mode, whether the key event reported last time is a key press event or not can be judged, and if the key event reported last time is the key press event, the terminal can report the key lift event through the sensor corresponding to the target key. If the key event reported last time is a key lifting event, the terminal can not perform any processing.
Optionally, for a situation that the terminal supports fingerprint identification, correspondingly, the terminal may further perform the following processing: when a sensor corresponding to a target key is in an identification mode, acquiring currently input first fingerprint information through the sensor when a key pressing event corresponding to the target key is detected through the sensor; when a key lifting event corresponding to a target key is detected through a sensor, comparing the acquired first fingerprint information with pre-stored reference fingerprint information; and if the first fingerprint information is matched with the reference fingerprint information, executing screen unlocking processing, and switching the working mode of the sensor corresponding to the target key to a reporting mode.
In implementation, when the terminal is in a screen locking state (where at this time, the sensor corresponding to the target key is in the identification mode), when the user wants to continue using the terminal, the user may touch the target key with a finger, at this time, the terminal will detect a key pressing event corresponding to the target key with the sensor, and further, may collect currently input fingerprint information (which may be referred to as first fingerprint information) with the sensor. After a user touches a target key, a finger can be lifted, at the moment, the terminal can detect a key lifting event corresponding to the target key through the sensor, at the moment, the terminal can compare collected first fingerprint information with pre-stored reference fingerprint information, if the first fingerprint information is matched with the reference fingerprint information, the terminal can execute screen unlocking processing and light a screen, and meanwhile, the working mode of the sensor corresponding to the target key can be switched to a point reporting mode. Therefore, the user can operate the terminal through the target key in the process of using the terminal.
Optionally, the reference fingerprint information may be pre-recorded by the user, and accordingly, the processing procedure may be as follows: when a fingerprint information setting instruction is received, acquiring currently input second fingerprint information through a sensor corresponding to a target key; the second fingerprint information is stored as reference fingerprint information.
In implementation, the user may pre-record reference fingerprint information for screen unlocking. Specifically, a user can trigger the terminal to receive a fingerprint information setting instruction through operation, and then when the user touches a target key through a finger, the terminal collects currently input fingerprint information (which may be called as second fingerprint information) through a sensor corresponding to the target key, and further, the terminal can store the second fingerprint information as reference fingerprint information.
In the embodiment of the disclosure, in the using process of the terminal, the working mode of a sensor corresponding to a detection target key is switched from a reporting mode to a non-reporting mode; and reporting the key lifting event through a sensor corresponding to the target key. Therefore, when a user triggers the terminal to execute the screen-off and screen-locking processing by pressing the target key for a long time, the terminal can actively report the key-up event through the sensor corresponding to the target key. In this case, after the terminal is unlocked again, when the user needs to press the home key in operation, since the key lift event is reported before, the sensor corresponding to the target key reports the detected key press event, and further, the terminal can execute the operation triggered by pressing the target key at this time without pressing the target key again by the user, so that the efficiency of executing the operation can be improved.
Another exemplary embodiment of the present disclosure provides an apparatus for reporting a key event, as shown in fig. 3, the apparatus includes:
the detection module 310 is configured to detect that a working mode of a sensor corresponding to a target key is switched from a reporting mode to a non-reporting mode in a using process of the terminal;
and a reporting module 320, configured to report the key up event through the sensor corresponding to the target key.
Optionally, the non-reporting mode is an identification mode.
Optionally, as shown in fig. 4, the apparatus further includes:
a first collecting module 330, configured to collect currently input first fingerprint information through a sensor when a key pressing event corresponding to the target key is detected by the sensor in a state where the sensor corresponding to the target key is in an identification mode;
a comparison module 340, configured to compare the acquired first fingerprint information with pre-stored reference fingerprint information when a key lifting event corresponding to the target key is detected by the sensor;
and an unlocking module 350, configured to execute screen unlocking processing if the first fingerprint information matches the reference fingerprint information, and switch a working mode of the sensor corresponding to the target key to a reporting mode.
Optionally, as shown in fig. 5, the apparatus further includes:
the second acquisition module 360 is configured to acquire currently input second fingerprint information through a sensor corresponding to the target key when a fingerprint information setting instruction is received;
a storage module 370, configured to store the second fingerprint information as reference fingerprint information.
Optionally, the reporting module 320 is configured to:
and reporting a key lifting event to an input program through a main program of a sensor corresponding to the target key.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
In the embodiment of the disclosure, in the using process of the terminal, the working mode of a sensor corresponding to a detection target key is switched from a reporting mode to a non-reporting mode; and reporting the key lifting event through a sensor corresponding to the target key. Therefore, when a user triggers the terminal to execute the screen-off and screen-locking processing by pressing the target key for a long time, the terminal can actively report the key-up event through the sensor corresponding to the target key. In this case, after the terminal is unlocked again, when the user needs to press the home key in operation, since the key lift event is reported before, the sensor corresponding to the target key reports the detected key press event, and further, the terminal can execute the operation triggered by pressing the target key at this time without pressing the target key again by the user, so that the efficiency of executing the operation can be improved.
It should be noted that: the device for reporting a key event according to the above embodiment is exemplified by only dividing the functional modules when reporting a key event, and in practical applications, the function distribution may be completed by different functional modules as needed, that is, the internal structure of the terminal is divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus for reporting a key event provided in the foregoing embodiment and the method embodiment for reporting a key event belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment and will not be described herein again.
Yet another exemplary embodiment of the present disclosure shows a structural diagram of a terminal. The terminal may be a mobile phone or the like.
Referring to fig. 6, terminal 600 may include one or more of the following components: processing component 602, memory 604, power component 606, multimedia component 608, audio component 610, input/output (I/O) interface 612, sensor component 614, and communication component 616.
The processing component 602 generally controls overall operation of the terminal 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing elements 602 may include one or more processors 620 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 602 can include one or more modules that facilitate interaction between the processing component 602 and other components. For example, the processing component 602 can include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602.
The memory 604 is configured to store various types of data to support operations at the terminal 600. Examples of such data include instructions for any application or method operating on terminal 600, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 604 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power component 606 provides power to the various components of terminal 600. Power components 606 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for audio output device 600.
The multimedia component 608 comprises a screen providing an output interface between the terminal 600 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the terminal 600 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 610 is configured to output and/or input audio signals. For example, the audio component 610 includes a Microphone (MIC) configured to receive external audio signals when the audio output device 600 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 604 or transmitted via the communication component 616.
The I/O interface 612 provides an interface between the processing component 602 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 614 includes one or more sensors for providing various aspects of status assessment for the terminal 600. For example, sensor component 614 can detect an open/closed state of terminal 600, relative positioning of components, such as a display and keypad of terminal 600, change in position of terminal 600 or a component of terminal 600, presence or absence of user contact with terminal 600, orientation or acceleration/deceleration of terminal 600, and temperature change of terminal 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 616 is configured to facilitate communications between the terminal 600 and other devices in a wired or wireless manner. The terminal 600 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the terminal 600 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 604 comprising instructions, executable by the processor 620 of the terminal 600 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein which, when executed by a processor of a terminal, enable the terminal to perform a method of reporting a key press event, the method comprising:
in the using process of the terminal, the working mode of a sensor corresponding to a detection target key is switched from a reporting mode to a non-reporting mode;
and reporting a key lifting event through a sensor corresponding to the target key.
Optionally, the non-reporting mode is an identification mode.
Optionally, the method further includes:
when a sensor corresponding to the target key is in an identification mode, acquiring currently input first fingerprint information through the sensor when a key pressing event corresponding to the target key is detected through the sensor;
when a key lifting event corresponding to the target key is detected through the sensor, comparing the acquired first fingerprint information with pre-stored reference fingerprint information;
and if the first fingerprint information is matched with the reference fingerprint information, executing screen unlocking processing, and switching the working mode of the sensor corresponding to the target key to a reporting point mode.
Optionally, the method further includes:
when a fingerprint information setting instruction is received, acquiring currently input second fingerprint information through a sensor corresponding to the target key;
storing the second fingerprint information as reference fingerprint information.
Optionally, the reporting a key lifting event through a sensor corresponding to the target key includes:
and reporting a key lifting event to an input program through a main program of a sensor corresponding to the target key.
In the embodiment of the disclosure, in the using process of the terminal, the working mode of a sensor corresponding to a detection target key is switched from a reporting mode to a non-reporting mode; and reporting the key lifting event through a sensor corresponding to the target key. Therefore, when a user triggers the terminal to execute the screen-off and screen-locking processing by pressing the target key for a long time, the terminal can actively report the key-up event through the sensor corresponding to the target key. In this case, after the terminal is unlocked again, when the user needs to press the home key in operation, since the key lift event is reported before, the sensor corresponding to the target key reports the detected key press event, and further, the terminal can execute the operation triggered by pressing the target key at this time without pressing the target key again by the user, so that the efficiency of executing the operation can be improved.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (8)

1. A method for reporting a key event, the method comprising:
in the using process of the terminal, the working mode of a sensor corresponding to a detection target key is switched from a reporting mode to a non-reporting mode, wherein the non-reporting mode is an identification mode;
reporting a key lifting event through a sensor corresponding to the target key;
the method further comprises the following steps:
when a sensor corresponding to the target key is in an identification mode, acquiring currently input first fingerprint information through the sensor when a key pressing event corresponding to the target key is detected through the sensor;
when a key lifting event corresponding to the target key is detected through the sensor, comparing the acquired first fingerprint information with pre-stored reference fingerprint information;
and if the first fingerprint information is matched with the reference fingerprint information, executing screen unlocking processing, and switching the working mode of the sensor corresponding to the target key to a reporting point mode.
2. The method of claim 1, further comprising:
when a fingerprint information setting instruction is received, acquiring currently input second fingerprint information through a sensor corresponding to the target key;
storing the second fingerprint information as reference fingerprint information.
3. The method of claim 1, wherein reporting a key up event via the sensor corresponding to the target key comprises:
and reporting a key lifting event to an input program through a main program of a sensor corresponding to the target key.
4. An apparatus for reporting a key event, the apparatus comprising:
the detection module is used for detecting that the working mode of a sensor corresponding to a target key is switched from a reporting mode to a non-reporting mode in the using process of the terminal, wherein the non-reporting mode is an identification mode;
the reporting module is used for reporting the key lifting event through the sensor corresponding to the target key;
the device further comprises:
the first acquisition module is used for acquiring currently input first fingerprint information through the sensor when a key pressing event corresponding to the target key is detected through the sensor in a state that the sensor corresponding to the target key is in an identification mode;
the comparison module is used for comparing the acquired first fingerprint information with pre-stored reference fingerprint information when the key lifting event corresponding to the target key is detected by the sensor;
and the unlocking module is used for executing screen unlocking processing if the first fingerprint information is matched with the reference fingerprint information, and switching the working mode of the sensor corresponding to the target key to a reporting mode.
5. The apparatus of claim 4, further comprising:
the second acquisition module is used for acquiring currently input second fingerprint information through a sensor corresponding to the target key when a fingerprint information setting instruction is received;
and the storage module is used for storing the second fingerprint information as reference fingerprint information.
6. The apparatus of claim 4, wherein the reporting module is configured to:
and reporting a key lifting event to an input program through a main program of a sensor corresponding to the target key.
7. A terminal, characterized in that the terminal comprises a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method for reporting a key event according to any one of claims 1 to 3.
8. A computer-readable storage medium, wherein at least one instruction, at least one program, a set of codes, or a set of instructions is stored in the storage medium, and the at least one instruction, the at least one program, the set of codes, or the set of instructions is loaded and executed by a processor to implement the method for reporting a key event according to any one of claims 1 to 3.
CN201710866906.5A 2017-09-22 2017-09-22 Method and device for reporting key event Active CN107562350B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710866906.5A CN107562350B (en) 2017-09-22 2017-09-22 Method and device for reporting key event

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710866906.5A CN107562350B (en) 2017-09-22 2017-09-22 Method and device for reporting key event

Publications (2)

Publication Number Publication Date
CN107562350A CN107562350A (en) 2018-01-09
CN107562350B true CN107562350B (en) 2020-09-04

Family

ID=60982618

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710866906.5A Active CN107562350B (en) 2017-09-22 2017-09-22 Method and device for reporting key event

Country Status (1)

Country Link
CN (1) CN107562350B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110691403A (en) * 2019-09-25 2020-01-14 出门问问信息科技有限公司 Information processing method, electronic equipment and computer readable storage medium
CN111291653B (en) * 2020-01-21 2023-06-16 Oppo(重庆)智能科技有限公司 Fingerprint event reporting method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8875263B1 (en) * 2012-03-29 2014-10-28 Emc Corporation Controlling a soft token running within an electronic apparatus
CN106133736A (en) * 2016-06-27 2016-11-16 北京小米移动软件有限公司 Fingerprint authentication method and device
CN106951759A (en) * 2017-03-07 2017-07-14 青岛海信移动通信技术股份有限公司 Unlocked by fingerprint control method and device
CN107018226A (en) * 2017-03-08 2017-08-04 广东欧珀移动通信有限公司 Unlocking screen method and mobile terminal
CN107025022A (en) * 2017-03-08 2017-08-08 广东欧珀移动通信有限公司 The control method and terminal device of terminal device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8144947B2 (en) * 2008-06-27 2012-03-27 Palo Alto Research Center Incorporated System and method for finding a picture image in an image collection using localized two-dimensional visual fingerprints

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8875263B1 (en) * 2012-03-29 2014-10-28 Emc Corporation Controlling a soft token running within an electronic apparatus
CN106133736A (en) * 2016-06-27 2016-11-16 北京小米移动软件有限公司 Fingerprint authentication method and device
CN106951759A (en) * 2017-03-07 2017-07-14 青岛海信移动通信技术股份有限公司 Unlocked by fingerprint control method and device
CN107018226A (en) * 2017-03-08 2017-08-04 广东欧珀移动通信有限公司 Unlocking screen method and mobile terminal
CN107025022A (en) * 2017-03-08 2017-08-08 广东欧珀移动通信有限公司 The control method and terminal device of terminal device

Also Published As

Publication number Publication date
CN107562350A (en) 2018-01-09

Similar Documents

Publication Publication Date Title
EP3331226B1 (en) Method and device for reading messages
EP3125531B1 (en) Control method and device for adjusting shooting function
EP3151117B1 (en) Method and device for delaying information broadcasting
CN106815546B (en) Fingerprint identification method and device
US20170060320A1 (en) Method for controlling a mobile terminal using a side touch panel
CN106357934B (en) Screen locking control method and device
CN107643818B (en) Function opening method and device
EP3506164B1 (en) Fingerprint recognition method and apparatus and computer readable storage medium
EP3232301B1 (en) Mobile terminal and virtual key processing method
EP3173963B1 (en) Unlocking method and apparatus, computer program and recording medium
CN107132983B (en) Split-screen window operation method and device
CN107562350B (en) Method and device for reporting key event
CN107608614B (en) Application program starting method and device and storage medium
CN113361305B (en) Fingerprint acquisition method, electronic device and computer readable storage medium
CN106650569B (en) Fingerprint input method and device
CN107580142B (en) Method and device for executing processing
CN108491834B (en) Fingerprint identification method and device
US10671827B2 (en) Method and device for fingerprint verification
CN114724196A (en) False touch prevention method and device, electronic equipment and storage medium
CN109144587B (en) Terminal control method, device, equipment and storage medium
CN112445363A (en) Electronic device, control method and device for electronic device, and storage medium
CN106547444B (en) Method and device for realizing screen capture and mobile terminal
CN112799497B (en) Fingerprint module working mode control method, fingerprint module working mode control device and storage medium
US11402994B2 (en) Method and apparatus for calling shortcut function, and storage medium
CN111382609B (en) Fingerprint identification method and terminal

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