CN107193553B - Key control method and device - Google Patents
Key control method and device Download PDFInfo
- Publication number
- CN107193553B CN107193553B CN201710288740.3A CN201710288740A CN107193553B CN 107193553 B CN107193553 B CN 107193553B CN 201710288740 A CN201710288740 A CN 201710288740A CN 107193553 B CN107193553 B CN 107193553B
- Authority
- CN
- China
- Prior art keywords
- key
- application
- enter
- foreground
- state
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0489—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using dedicated keyboard keys or combinations thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/02—Input arrangements using manually operated switches, e.g. using keyboards or dials
- G06F3/023—Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
- H04M1/72463—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions to restrict the functionality of the device
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72466—User interfaces specially adapted for cordless or mobile telephones with selection means, e.g. keys, having functions defined by the mode or the status of the device
Landscapes
- Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Telephone Function (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The disclosure relates to a key control method and device, and belongs to the technical field of mobile terminals. The method comprises the following steps: when detecting that the application running in the foreground belongs to the target application, controlling at least one key positioned on the machine body to enter a locking state, wherein the at least one key comprises at least one touch key and/or at least one physical key; under the condition that the key is in a locked state, if the operation corresponding to the key is acquired, judging whether the operation is an unlocking operation, wherein the unlocking operation is the operation of triggering the key to be switched from the locked state to the unlocked state; if the operation is unlocking operation, controlling the key to enter an unlocking state; and if the operation is not the unlocking operation, not responding to the operation. The method and the device can avoid misoperation caused by accidental touch of the key on the body in the process of using the target application.
Description
Technical Field
The present disclosure relates to the field of mobile terminal technologies, and in particular, to a key control method and device.
Background
A body of a terminal such as a mobile phone is usually provided with keys, which may be touch keys or physical keys. The terminal responds to the operation acted on the key to realize the corresponding function of the key.
In the related art, it is assumed that three touch keys, namely a menu key, a Home key, and a return key, are arranged on a front panel (i.e., a panel on which a screen is located) of the terminal. And when the terminal acquires the operation corresponding to any one touch key, responding to the operation and executing the function corresponding to the touch key. For example, when the terminal acquires an operation corresponding to a return key, the terminal displays a page displayed last time in the screen.
Disclosure of Invention
The embodiment of the disclosure provides a key control method and a key control device, and the technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a key control method, including:
when detecting that the application running in the foreground belongs to the target application, controlling at least one key positioned on the machine body to enter a locking state, wherein the at least one key comprises at least one touch key and/or at least one physical key;
under the condition that the key is in the locking state, if the operation corresponding to the key is acquired, judging whether the operation is an unlocking operation, wherein the unlocking operation is the operation for triggering the key to be switched from the locking state to the unlocking state;
if the operation is the unlocking operation, controlling the key to enter the unlocking state;
and if the operation is not the unlocking operation, not responding to the operation.
Optionally, when it is detected that the application running in the foreground belongs to the target application, controlling at least one key located on the main body to enter a locked state includes:
obtaining a type label of the application running in the foreground, wherein the type label is used for indicating the type of the application;
determining whether the type of the application running in the foreground is a game type according to the type label of the application running in the foreground, wherein the target application is the application of the game type;
and if the type of the application operated by the foreground is the game type, controlling at least one key positioned on the machine body to enter the locking state.
Optionally, when it is detected that the application running in the foreground belongs to the target application, controlling at least one key located on the main body to enter a locked state includes:
acquiring an identifier of the application running in the foreground;
acquiring target configuration information corresponding to the identifier of the application running in the foreground according to a preset corresponding relationship, wherein the preset corresponding relationship comprises the corresponding relationship between the identifier of the application and the configuration information, the configuration information is used for indicating whether the application controls the keys on the machine body to enter the locking state when the application runs in the foreground, at least two pieces of configuration information corresponding to the application indicate different keys to enter the locking state, and the target application refers to the application of which the corresponding configuration information indicates that the corresponding keys on the machine body are controlled to enter the locking state;
and if the target configuration information indicates that at least one key positioned on the body is controlled to enter the locking state, controlling the at least one key to enter the locking state. Optionally, the unlocking operation is different from an operation responded by the key in the unlocked state.
Optionally, the method further comprises:
and under the condition that the key is in the unlocking state, if the application running in the foreground still keeps running in the foreground and the duration time is greater than a preset threshold value, controlling the key to enter the locking state.
Optionally, the method further comprises:
when detecting that the application running in the foreground belongs to the target application, controlling the side menu to enter a locking state;
and under the condition that the side menu is in the locked state, if a calling-out instruction corresponding to the side menu is acquired, the side menu is not displayed.
Optionally, the method further comprises:
and when the unlocking operation corresponding to the key is acquired, controlling the side menu to be switched from the locking state to the unlocking state.
According to a second aspect of the embodiments of the present disclosure, there is provided a key control device, the device including:
the first control module is configured to control at least one key positioned on the machine body to enter a locked state when detecting that an application running in the foreground belongs to a target application, wherein the at least one key comprises at least one touch key and/or at least one physical key;
the operation judging module is configured to judge whether the operation is an unlocking operation when the operation corresponding to the key is acquired under the condition that the key is in the locked state, wherein the unlocking operation is an operation for triggering the key to be switched from the locked state to the unlocked state;
a second control module configured to control the key to enter the unlocked state when the operation is the unlocking operation;
a third control module configured to not respond to the operation when the operation is not the unlocking operation.
Optionally, the first control module includes:
the label obtaining sub-module is configured to obtain a type label of the application running in the foreground, and the type label is used for indicating the type of the application;
the type determining submodule is configured to determine whether the type of the foreground running application is a game type according to the type tag of the foreground running application, and the target application refers to the application of the game type;
and the locking control sub-module is configured to control at least one key positioned on the machine body to enter the locking state when the type of the application operated in the foreground is the game type.
Optionally, the first control module includes:
an identifier obtaining sub-module configured to obtain an identifier of the foreground-running application;
the information acquisition sub-module is configured to acquire target configuration information corresponding to the identifier of the application running on the foreground according to a preset corresponding relationship, wherein the preset corresponding relationship comprises the corresponding relationship between the identifier of the application and the configuration information, the configuration information is used for indicating whether the application controls the key positioned on the machine body to enter the locking state when the foreground runs, at least two pieces of configuration information corresponding to the application indicate different keys to enter the locking state, and the target application refers to the application in which the corresponding configuration information indicates the key positioned on the machine body to enter the locking state;
the locking control submodule is configured to control at least one key positioned on the body to enter the locking state when the target configuration information indicates that the at least one key is controlled to enter the locking state. Optionally, the unlocking operation is different from an operation responded by the key in the unlocked state.
Optionally, the apparatus further comprises:
and the fourth control module is configured to control the key to enter the locked state when the application running in the foreground still keeps running in the foreground and the duration is greater than a preset threshold under the condition that the key is in the unlocked state.
Optionally, the apparatus further comprises:
the fifth control module is configured to control the side menu to enter a locked state when detecting that the application running in the foreground belongs to the target application;
a sixth control module, configured to, when the side menu is in the locked state, if a call-out instruction corresponding to the side menu is acquired, not display the side menu.
Optionally, the apparatus further comprises:
and the seventh control module is configured to control the side menu to be switched from the locking state to the unlocking state when the unlocking operation corresponding to the key is acquired.
According to a third aspect of the embodiments of the present disclosure, there is provided a key control device, the device including:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to:
when detecting that the application running in the foreground belongs to the target application, controlling at least one key positioned on the machine body to enter a locking state, wherein the at least one key comprises at least one touch key and/or at least one physical key;
under the condition that the key is in the locking state, when the operation corresponding to the key is acquired, judging whether the operation is an unlocking operation, wherein the unlocking operation is the operation for triggering the key to be switched from the locking state to the unlocking state;
when the operation is the unlocking operation, controlling the key to enter the unlocking state;
when the operation is not the unlocking operation, the operation is not responded.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
when the application running in the foreground is detected to belong to the target application, at least one key positioned on the machine body is controlled to enter a locking state, and the key can be triggered to be switched from the locking state to an unlocking state only through specific unlocking operation, so that the phenomenon of misoperation caused by the fact that the key positioned on the machine body is touched by accident in the process of using the target application is avoided.
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.
FIG. 1 is a flow chart illustrating a method of key control according to an exemplary embodiment;
FIG. 2 is a diagram illustrating a terminal in accordance with an exemplary embodiment;
FIG. 3 is a flow chart illustrating a method of key control according to another exemplary embodiment;
FIG. 4 is a block diagram illustrating a key control device in accordance with an exemplary embodiment;
FIG. 5 is a block diagram illustrating a key control device according to another exemplary embodiment;
FIG. 6 is a block diagram illustrating an apparatus in accordance with an example embodiment.
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.
Because the keys are usually arranged on the front panel of the terminal (i.e. the panel on the side where the screen is located), users often touch the keys carelessly in the process of playing games and watching videos by using the terminal, which causes misoperation. Based on the method, the embodiment of the disclosure provides a key control method and a device based on the method. In the embodiment of the disclosure, when the terminal detects that the application running in the foreground belongs to the target application, the terminal controls the key positioned on the machine body to enter the locking state, and only when the preset unlocking operation is obtained, the key can be triggered to be switched from the locking state to the unlocking state, so that the occurrence of misoperation caused by the fact that the key is touched unintentionally is avoided.
In the method provided by the embodiment of the present disclosure, the execution subject of each step may be a terminal, such as a mobile terminal device, e.g., a mobile phone, a tablet computer, an e-book reader, a multimedia playing device, a PDA (Personal Digital Assistant), a wearable device, and the like.
FIG. 1 is a flow chart illustrating a method of key control according to an exemplary embodiment. The method may include the steps of:
in step 101, when detecting that the application running in the foreground belongs to the target application, controlling at least one key positioned on the machine body to enter a locking state.
The foreground-running application refers to an application program currently displayed in the screen of the terminal. The target application refers to a preset application, and the target application may be one or more applications or may be one or more types of applications. For example, the target application may be an application named "xx games"; as another example, the target application may be a game-type application.
The terminal comprises a terminal body and at least one key, wherein the terminal body is provided with at least one key, and the at least one key comprises at least one touch key and/or at least one physical key. The touch key is a key for triggering a corresponding function through touch operation. The touch operation is usually a touch operation. For example, the touch key may be formed of a capacitive or resistive touch sensing electrode, and is capable of detecting and responding to a touch operation of a user. Of course, the touch operation may be a pressing operation in other possible cases. The physical keys are also called entity keys, the corresponding functions are triggered by pressing operation of a user, and the physical keys can give pressing feedback for pressing and bouncing of the user.
In the embodiment of the present disclosure, the position of the key on the body is not limited, for example, the key may be disposed in a non-screen region of a front panel of the body (e.g., below a screen), and for example, the key may also be disposed on a back panel of the body, or the key may also be disposed on a middle frame of the body. In addition, in the embodiment of the present disclosure, the number of the keys and the functions thereof are not limited, and may be set according to actual requirements. In one example, as shown in fig. 2, the terminal 20 is provided with the following 3 keys 22: the menu key, Home key and return key, above-mentioned 3 button 22 are the touch-control button, and these 3 buttons 22 all set up in the screen 21 below of fuselage front panel.
And when detecting that the application running in the foreground belongs to the target application, the terminal controls all or part of keys on the machine body to enter a locking state. In one example, when detecting that the application running in the foreground belongs to the target application, the terminal controls all touch keys on the body to enter a locked state. In another example, when detecting that the application running in the foreground belongs to the target application, the terminal controls a part of touch keys on the main body to enter a locking state. In yet another example, when it is detected that the application running in the foreground belongs to the target application, the terminal controls all physical keys located on the main body to enter a locked state. In yet another example, when it is detected that the application running in the foreground belongs to the target application, the terminal controls a part of physical keys located on the main body to enter a locked state. Optionally, the terminal controls different keys located on the body to enter a locked state for different applications. In practice, which key or keys need to be controlled to enter the locked state may be preset, for example, by default of the terminal or by user.
In the case where the key is in the locked state, the key does not respond to any operation. For example, when a certain touch key is in an unlocked state, a function corresponding to the touch key can be triggered through single touch and click operation, and when a user touches and clicks the touch key at a single time under the condition that the touch key is in a locked state, the function corresponding to the touch key cannot be triggered, and the terminal does not respond to the single touch and click operation of the user.
In one example, step 101 includes the following sub-steps:
1. acquiring a type label of an application running in a foreground;
the type tag is used to indicate the type of application. Type tags include, but are not limited to, gaming, social, life service, entertainment, travel, reading, video, etc. tags. Illustratively, the type tag of the application named "XX bicycle" is a life service, and the type tag of the application named "XX flying vehicle" is a game.
Optionally, when the terminal downloads and installs the application from an application store, the identifier of the application and the type tag are stored correspondingly, so as to obtain the corresponding relationship between the identifier of the application and the type tag. And the terminal searches the corresponding relation according to the identification of the application running in the foreground to obtain the type label of the application running in the foreground.
2. And determining whether the type of the application running in the foreground is a game type or not according to the type label of the application running in the foreground.
In the present embodiment, it is considered that the user is likely to mistakenly touch the keys on the main body when playing the game, and therefore the game-type application can be set as the target application. When the type label of the application running on the foreground is a game, the terminal determines that the type of the application running on the foreground is a game type, namely determines that the application running on the foreground belongs to a target application.
Of course, in other possible implementations, the target application may be any one or more types of applications, which may be preset by the system or customized by the user. For example, the target application is a game type application and a video type application.
If the type of the application running in the foreground is a game type, controlling at least one key positioned on the machine body to enter a locking state; and if the type of the application running in the foreground is not the game type, ending the process.
In another example, step 101 includes the following sub-steps:
1. acquiring an identifier of an application running in a foreground;
2. acquiring target configuration information corresponding to the identifier of the application operated by the foreground according to the preset corresponding relation;
the preset corresponding relation comprises a corresponding relation between an application identifier and configuration information, and the configuration information is used for indicating whether the application controls a key on the machine body to enter a locking state when the application runs in a foreground. Accordingly, the target application refers to an application whose corresponding configuration information indicates to control a key located on the body to enter a locked state. The preset corresponding relationship can be preset by a system or set by a user in a self-defined way. For example, a function of setting configuration information of each application is provided in a setting option of the terminal, and a user can set and modify the configuration information of the application using the function.
Optionally, the configuration information is further used to indicate that the application needs to control a key to enter the locked state when running in the foreground, for example, using a key identifier for indication. Optionally, there are at least two pieces of configuration information corresponding to the application to instruct different keys to enter the locked state, that is, for different applications, the corresponding configuration information may be the same or different. For example, for the game application a, the corresponding configuration information is used for instructing and controlling a touch key located on a front panel of the main body to enter a locked state; for the game application B, the corresponding configuration information is used for indicating and controlling all the touch keys and the physical keys on the machine body to enter a locking state.
If the target configuration information indicates that at least one key positioned on the machine body is controlled to enter a locking state, controlling at least one key positioned on the machine body to enter the locking state; and if the target configuration information indicates that the key positioned on the machine body does not enter the locking state, ending the process.
In other possible examples, when the terminal detects that the application running in the foreground belongs to the target application, one side of the screen displays a virtual key for controlling at least one key located on the body to enter a locked state, and when the terminal acquires a touch operation acting on the virtual key in the screen, the terminal executes a step of controlling the at least one key located on the body to enter the locked state.
In other possible examples, when the terminal detects that the screen is in a horizontal state and the frequency and/or the number of times of touch operations acquired by the screen exceed a preset threshold, it is determined that the application running in the foreground belongs to the target application, and the step of controlling at least one key located on the body to enter a locked state is performed.
In step 102, when the key is in the locked state, if the operation corresponding to the key is acquired, it is determined whether the operation is an unlocking operation. If yes, go to step 103; if not, the following step 104 is executed.
For any key on the body, under the condition that the key is in a locked state, if the operation corresponding to the key is acquired, the terminal judges whether the operation is an unlocking operation. The unlocking operation refers to an operation of triggering the key to be switched from the locking state to the unlocking state. The key can normally respond to operation in an unlocking state.
Optionally, the unlocking operation is different from an operation in which the key is in an unlocked state. The unlocking operation corresponding to the key may be a touch operation or a pressing operation applied to the key, or may be other user operations, such as a pressing operation applied to a physical key (also referred to as a physical key), a specific voice signal, and the like.
In one example, assuming that the operation responded by the touch key in the unlocked state is a single touch click operation, the unlocking operation may be an operation of pressing the touch key for a long time; or, the operation of pressing the touch key for a long time and the operation of clicking the touch key by a single touch may be combined, and the interval duration between the operation of pressing the touch key for a long time and the operation of clicking the touch key by a single touch needs to be less than a preset duration, for example, the preset duration is 1 s.
In step 103, the control key enters an unlocked state.
And if the operation is unlocking operation, the terminal controls the key in the locking state to enter the unlocking state. Under the condition that the key is in the unlocking state, the terminal can normally respond to the operation acted on the key.
In an example, with reference to fig. 2, when any touch key 22 in the terminal 20 obtains the unlocking operation, the terminal 20 controls the touch key 22 to enter the unlocking state, and at this time, the terminal 20 can normally respond to the touch operation applied to the touch key 22.
In step 104, the above operation is not responded to.
And if the operation is not the unlocking operation, the terminal does not respond to the operation, so that misoperation is avoided.
Optionally, after step 103, the following steps are further included:
and under the condition that the key is in the unlocking state, if the application running in the foreground still keeps running in the foreground and the duration time is greater than a preset threshold value, controlling the key to enter the locking state. The preset threshold may be set according to practical experience, and is exemplarily 5 s. Through the mode, the terminal can automatically control the keys to be switched from the unlocking state to the locking state, and the user operation is simplified.
To sum up, according to the method provided by the embodiment of the present disclosure, when it is detected that an application running in the foreground belongs to a target application, at least one key located on a body is controlled to enter a locked state, and only through a specific unlocking operation, the key can be triggered to be switched from the locked state to an unlocked state, so that an occurrence of a misoperation caused by an inadvertent touch of the key located on the body in a process of using the target application is avoided.
In an alternative embodiment provided based on the embodiment shown in fig. 1, as shown in fig. 3, when detecting that an application running in the foreground belongs to a target application, the terminal, in addition to controlling at least one key located on the main body to enter a locked state, performs the following steps:
in step 301, when it is detected that the foreground running application belongs to the target application, the control side menu enters a locked state.
The side menu refers to a menu that can be displayed by calling out from the screen side by a slide operation. Optionally, the side menu includes at least one of a pull-down displayed notification bar or menu bar, a pull-left displayed notification bar or menu bar, a pull-up displayed notification bar or menu bar. The side menu cannot be displayed by the outgoing call after entering the locked state.
In addition to the possibility of accidentally triggering the key, the user may also accidentally trigger the side menu during the process of playing games and watching videos by using the terminal. In this embodiment, the side menu is controlled to enter the locked state, so that the side menu is prevented from being triggered by mistake.
In step 302, when the side menu is in the locked state, if a call-out instruction corresponding to the side menu is acquired, the side menu is not displayed.
In step 303, when an unlocking operation corresponding to the key is acquired, the side menu is controlled to be switched from the locked state to the unlocked state.
And when the key is switched from the locking state to the unlocking state, the terminal control side menu is also switched from the locking state to the unlocking state. Therefore, the user can simultaneously switch the states of the keys and the side menu through one-time unlocking operation, and the operation is simple and efficient.
To sum up, in the method provided in the embodiment of the present disclosure, when detecting that an application running in the foreground belongs to a target application, the terminal controls the side menu to enter the locked state in addition to controlling at least one key located on the body to enter the locked state, so as to prevent the side menu from being triggered by mistake.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
Fig. 4 is a block diagram illustrating a key control device according to an exemplary embodiment. The device has the functions of realizing the method examples, and the functions can be realized by hardware or by hardware executing corresponding software. The apparatus may include: a first control module 401, an operation determination module 402, a second control module 403, and a third control module 404.
The first control module 401 is configured to control at least one key located on the main body to enter a locked state when it is detected that the application running in the foreground belongs to the target application, where the at least one key includes at least one touch key and/or at least one physical key.
The operation determining module 402 is configured to, when the key is in the locked state and an operation corresponding to the key is obtained, determine whether the operation is an unlocking operation, where the unlocking operation is an operation that triggers the key to be switched from the locked state to an unlocked state.
A second control module 403 configured to control the key to enter the unlocked state when the operation is the unlocking operation.
A third control module 404 configured not to respond to the operation when the operation is not the unlocking operation.
To sum up, the device provided in the embodiment of the present disclosure controls at least one key located on the body to enter the locked state when detecting that the application running in the foreground belongs to the target application, and only through a specific unlocking operation, the key can be triggered to be switched from the locked state to the unlocked state, so that the occurrence of a misoperation caused by unintentionally touching the key located on the body in the process of using the target application is avoided.
In an alternative embodiment provided based on the embodiment in fig. 4, referring to fig. 5, the first control module 401 includes: a tag acquisition sub-module 401a, a type determination sub-module 401b, and a lock control sub-module 401 c.
The tag obtaining sub-module 401a is configured to obtain a type tag of the foreground-running application, where the type tag is used to indicate a type of the application.
The type determining sub-module 401b is configured to determine whether the type of the foreground-running application is a game type according to the type tag of the foreground-running application, where the target application is an application of the game type.
A locking control sub-module 401c configured to control at least one key located on the main body to enter the locking state when the type of the application running in the foreground is the game type.
In an alternative embodiment provided based on the embodiment of fig. 4, referring to fig. 5, the locking control module 401 includes: an identification acquisition submodule 401d, an information acquisition submodule 401e and a lock control submodule 401 c.
And the identifier obtaining sub-module 401d is configured to obtain an identifier of the foreground-running application.
The information obtaining sub-module 401e is configured to obtain target configuration information corresponding to an identifier of the application running in the foreground according to a preset corresponding relationship, where the preset corresponding relationship includes a corresponding relationship between the identifier of the application and the configuration information, the configuration information is used to indicate whether the application controls a key located on the body to enter the locked state when the application runs in the foreground, there are at least two pieces of configuration information corresponding to the application and indicate to control different keys to enter the locked state, and the target application is an application in which the corresponding configuration information indicates to control the key located on the body to enter the locked state.
A locking control sub-module 401c configured to control at least one key located on the body to enter the locked state when the target configuration information indicates that the at least one key is controlled to enter the locked state. In an alternative embodiment provided based on the embodiment of fig. 4, the unlocking operation is different from the operation to which the key is in the unlocked state.
In an alternative embodiment provided based on the embodiment of fig. 4, please refer to fig. 4, the apparatus further includes: a fourth control module 405.
A fourth control module 405 configured to, when the key is in the unlocked state, and when the application running in the foreground is still running in the foreground and the duration is greater than a preset threshold, control the key to enter the locked state.
In an optional embodiment provided based on the embodiment of fig. 4, the apparatus further includes: a fifth control module and a sixth control module (not shown).
And the fifth control module is configured to control the side menu to enter a locked state when detecting that the application running in the foreground belongs to the target application.
A sixth control module, configured to, when the side menu is in the locked state, if a call-out instruction corresponding to the side menu is acquired, not display the side menu.
Optionally, the apparatus further comprises: a seventh control module (not shown).
And the seventh control module is configured to control the side menu to be switched from the locking state to the unlocking state when the unlocking operation corresponding to the key is acquired.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, only the division of the above functional modules is illustrated, and in practical applications, the above functions may be distributed by different functional modules according to actual needs, that is, the content structure of the device is divided into different functional modules, so as to complete all or part of the functions described above.
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.
An exemplary embodiment of the present disclosure further provides a key control device, which can implement the method provided by the embodiment of the present disclosure. The device includes: a processor, and a memory for storing executable instructions for the processor. Wherein the processor is configured to:
when detecting that the application running in the foreground belongs to the target application, controlling at least one key positioned on the machine body to enter a locking state, wherein the at least one key comprises at least one touch key and/or at least one physical key;
under the condition that the key is in the locking state, when the operation corresponding to the key is acquired, judging whether the operation is an unlocking operation, wherein the unlocking operation is the operation for triggering the key to be switched from the locking state to the unlocking state;
when the operation is the unlocking operation, controlling the key to enter the unlocking state;
when the operation is not the unlocking operation, the operation is not responded.
Optionally, the processor is configured to:
obtaining a type label of the application running in the foreground, wherein the type label is used for indicating the type of the application;
determining whether the type of the application running in the foreground is a game type according to the type label of the application running in the foreground, wherein the target application is the application of the game type;
and when the type of the application operated by the foreground is the game type, controlling a key positioned on the machine body to enter the locking state.
Optionally, the processor is configured to:
acquiring an identifier of the application running in the foreground;
acquiring target configuration information corresponding to the identifier of the application running in the foreground according to a preset corresponding relationship, wherein the preset corresponding relationship comprises the corresponding relationship between the identifier of the application and the configuration information, the configuration information is used for indicating whether the application controls the keys on the machine body to enter the locking state when the foreground runs, at least two pieces of configuration information corresponding to the application indicate different keys to enter the locking state, and the target application refers to the application of which the corresponding configuration information indicates that the corresponding keys on the machine body are controlled to enter the locking state;
and when the target configuration information indicates that at least one key positioned on the body is controlled to enter the locking state, controlling the at least one key to enter the locking state. Optionally, the unlocking operation is different from an operation responded by the key in an unlocked state.
Optionally, the processor is further configured to:
and under the condition that the key is in the unlocking state, when the application running in the foreground still keeps running in the foreground and the duration time is more than a preset threshold value, controlling the key to enter the locking state.
Optionally, the processor is further configured to:
when detecting that the application running in the foreground belongs to the target application, controlling the side menu to enter a locking state;
and under the condition that the side menu is in the locked state, if a calling-out instruction corresponding to the side menu is acquired, the side menu is not displayed.
Optionally, the processor is further configured to:
and when the unlocking operation corresponding to the key is acquired, controlling the side menu to be switched from the locking state to the unlocking state.
Fig. 6 is a block diagram illustrating an apparatus 600 according to an example embodiment. For example, the apparatus 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 6, apparatus 600 may include one or more of the following components: a processing component 602, a memory 604, a power component 606, a multimedia component 608, an audio component 610, an input/output (I/O) interface 612, a sensor component 614, and a communication component 616.
The processing component 602 generally controls overall operation of the device 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 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 apparatus 600. Examples of such data include instructions for any application or method operating on device 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.
The multimedia component 608 includes a screen that provides an output interface between the device 600 and a 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 device 600 is in an operating mode, such as a shooting 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, audio component 610 includes a Microphone (MIC) configured to receive external audio signals when apparatus 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. In some embodiments, audio component 610 further includes a speaker for outputting audio signals.
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 status assessment of various aspects of the apparatus 600. For example, the sensor component 614 may detect an open/closed state of the device 600, the relative positioning of components, such as a display and keypad of the device 600, the sensor component 614 may also detect a change in position of the device 600 or a component of the device 600, the presence or absence of user contact with the device 600, orientation or acceleration/deceleration of the device 600, and a change in temperature of the device 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 apparatus 600 and other devices in a wired or wireless manner. The apparatus 600 may access a wireless network based on a communication standard, such as Wi-Fi, 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 apparatus 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 key control method described above.
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 device 600 to perform the key control method described above 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, wherein instructions, when executed by a processor of the apparatus 600, enable the apparatus 600 to perform one of the above-described key control methods.
It should be understood that reference to "a plurality" herein means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
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 (12)
1. A key control method, the method comprising:
when detecting that an application running in a foreground belongs to a target application, controlling all or part of keys on a machine body to enter a locked state, and controlling a side menu to enter a locked state, wherein all or part of the keys comprise all or part of touch keys and/or all or part of physical keys, the side menu comprises at least one of a notification bar or a menu bar displayed in a pull-down mode, a notification bar or a menu bar displayed in a left-right mode, and a notification bar or a menu bar displayed in a pull-up mode, and under the condition that the side menu is in the locked state, if a calling instruction corresponding to the side menu is acquired, the side menu is not displayed;
under the condition that the key is in the locking state, if the operation corresponding to the key is acquired, judging whether the operation is an unlocking operation, wherein the unlocking operation is the operation for triggering the key to be switched from the locking state to the unlocking state;
if the operation is the unlocking operation, controlling the key to enter the unlocking state;
if the operation is not the unlocking operation, not responding to the operation;
the method further comprises the following steps:
and when the unlocking operation corresponding to the key is acquired, controlling the side menu to be switched from the locking state to the unlocking state.
2. The method according to claim 1, wherein when detecting that the application running in the foreground belongs to the target application, controlling all or part of keys on the main body to enter a locked state comprises:
obtaining a type label of the application running in the foreground, wherein the type label is used for indicating the type of the application;
determining whether the type of the application running in the foreground is a game type according to the type label of the application running in the foreground, wherein the target application is the application of the game type;
and if the type of the application operated by the foreground is the game type, controlling all or part of keys on the machine body to enter the locking state.
3. The method according to claim 1, wherein when detecting that the application running in the foreground belongs to the target application, controlling all or part of keys on the main body to enter a locked state comprises:
acquiring an identifier of the application running in the foreground;
acquiring target configuration information corresponding to the identifier of the application running in the foreground according to a preset corresponding relationship, wherein the preset corresponding relationship comprises the corresponding relationship between the identifier of the application and the configuration information, the configuration information is used for indicating whether the application controls the keys on the machine body to enter the locking state when the application runs in the foreground, at least two pieces of configuration information corresponding to the application indicate different keys to enter the locking state, and the target application refers to the application of which the corresponding configuration information indicates that the corresponding keys on the machine body are controlled to enter the locking state;
and if the target configuration information indicates that all or part of keys on the body are controlled to enter the locking state, controlling all or part of keys to enter the locking state.
4. The method according to any one of claims 1 to 3, wherein the unlocking operation is different from an operation to which the key is responded in the unlocked state.
5. The method according to any one of claims 1 to 3, further comprising:
and under the condition that the key is in the unlocking state, if the application running in the foreground still keeps running in the foreground and the duration time is greater than a preset threshold value, controlling the key to enter the locking state.
6. A key control device, the device comprising:
the first control module is configured to control all or part of keys positioned on the machine body to enter a locked state when detecting that the application running in the foreground belongs to a target application, wherein all or part of the keys comprise all or part of touch keys and/or all or part of physical keys;
the operation judging module is configured to judge whether the operation is an unlocking operation if the operation corresponding to the key is acquired under the condition that the key is in the locked state, wherein the unlocking operation is an operation for triggering the key to be switched from the locked state to the unlocked state;
a second control module configured to control the key to enter the unlocked state when the operation is the unlocking operation;
a third control module configured not to respond to the operation when the operation is not the unlocking operation;
the fifth control module is configured to control a side menu to enter a locked state when detecting that the foreground running application belongs to a target application, wherein the side menu comprises at least one of a notification bar or a menu bar displayed in a pull-down mode, a notification bar or a menu bar displayed in a pull-left and right mode, and a notification bar or a menu bar displayed in a pull-up mode;
a sixth control module, configured to, when the side menu is in the locked state, if a call-out instruction corresponding to the side menu is acquired, not display the side menu;
and the seventh control module is configured to control the side menu to be switched from the locking state to the unlocking state when the unlocking operation corresponding to the key is acquired.
7. The apparatus of claim 6, wherein the first control module comprises:
the label obtaining sub-module is configured to obtain a type label of the application running in the foreground, and the type label is used for indicating the type of the application;
the type determining submodule is configured to determine whether the type of the foreground running application is a game type according to the type tag of the foreground running application, and the target application refers to the application of the game type;
and the locking control sub-module is configured to control at least one key positioned on the machine body to enter the locking state when the type of the application operated in the foreground is the game type.
8. The apparatus of claim 6, wherein the third control module comprises:
an identifier obtaining sub-module configured to obtain an identifier of the foreground-running application;
the information acquisition sub-module is configured to acquire target configuration information corresponding to the identifier of the application running on the foreground according to a preset corresponding relationship, wherein the preset corresponding relationship comprises the corresponding relationship between the identifier of the application and the configuration information, the configuration information is used for indicating whether the application controls the keys on the machine body to enter the locking state when the foreground runs, at least two pieces of configuration information corresponding to the application indicate different keys to enter the locking state, and the target application refers to the application in which the corresponding configuration information indicates the keys on the machine body to enter the locking state;
the locking control submodule is configured to control at least one key positioned on the body to enter the locking state when the target configuration information indicates that the at least one key is controlled to enter the locking state.
9. The apparatus according to any one of claims 6 to 8, wherein the unlocking operation is different from an operation to which the key is responded in the unlocked state.
10. The apparatus of any one of claims 6 to 8, further comprising:
and the fourth control module is configured to control the key to enter the locked state if the foreground running application is still kept running in the foreground and the duration time is greater than a preset threshold value under the condition that the key is in the unlocked state.
11. A key control device, the device comprising:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to:
when detecting that an application running in a foreground belongs to a target application, controlling all or part of keys on a machine body to enter a locked state, and controlling a side menu to enter a locked state, wherein all or part of the keys comprise all or part of touch keys and/or all or part of physical keys, the side menu comprises at least one of a notification bar or a menu bar displayed in a pull-down mode, a notification bar or a menu bar displayed in a left-right mode, and a notification bar or a menu bar displayed in a pull-up mode, and under the condition that the side menu is in the locked state, if a calling instruction corresponding to the side menu is acquired, the side menu is not displayed;
under the condition that the key is in the locking state, when the operation corresponding to the key is acquired, judging whether the operation is an unlocking operation, wherein the unlocking operation is the operation for triggering the key to be switched from the locking state to the unlocking state;
when the operation is the unlocking operation, controlling the key to enter the unlocking state;
when the operation is not the unlocking operation, not responding to the operation;
the processor is further configured to:
and when the unlocking operation corresponding to the key is acquired, controlling the side menu to be switched from the locking state to the unlocking state.
12. A computer-readable storage medium having instructions stored thereon, wherein the instructions, when executed by a processor, implement the steps of the method of any of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710288740.3A CN107193553B (en) | 2017-04-27 | 2017-04-27 | Key control method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710288740.3A CN107193553B (en) | 2017-04-27 | 2017-04-27 | Key control method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107193553A CN107193553A (en) | 2017-09-22 |
CN107193553B true CN107193553B (en) | 2020-09-15 |
Family
ID=59872546
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710288740.3A Active CN107193553B (en) | 2017-04-27 | 2017-04-27 | Key control method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107193553B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107493396A (en) * | 2017-09-28 | 2017-12-19 | 努比亚技术有限公司 | Button screen method, terminal and computer-readable recording medium |
CN109002438A (en) * | 2018-07-02 | 2018-12-14 | 北京分音塔科技有限公司 | False-touch prevention method, apparatus and translator |
CN109151181A (en) * | 2018-07-27 | 2019-01-04 | 南昌黑鲨科技有限公司 | Control method, device and the terminal of smart phone function key |
CN110825293A (en) * | 2018-08-07 | 2020-02-21 | 西安中兴新软件有限责任公司 | Control method, terminal and storage medium |
CN109597501A (en) * | 2018-12-10 | 2019-04-09 | 深圳市网心科技有限公司 | A kind of shortcut key management method and relevant apparatus |
CN109857305B (en) * | 2018-12-26 | 2021-02-23 | 维沃移动通信有限公司 | Input response method and mobile terminal |
CN109847369B (en) * | 2019-03-18 | 2023-05-16 | 网易(杭州)网络有限公司 | Method and device for switching postures of virtual roles in game |
CN112016076A (en) * | 2019-05-28 | 2020-12-01 | 北京小米移动软件有限公司 | Method and device for controlling computer and electronic device |
CN112506452A (en) * | 2020-12-02 | 2021-03-16 | 珠海奔图电子有限公司 | Control method of control panel for image forming apparatus, and image forming apparatus |
CN114879876B (en) * | 2022-04-22 | 2024-03-12 | 湖南孝文电子科技有限公司 | Key mode switching method and device, storage medium and electronic equipment |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101608673B1 (en) * | 2009-10-30 | 2016-04-05 | 삼성전자주식회사 | Operation Method for Portable Device including a touch lock state And Apparatus using the same |
CN102495768B (en) * | 2011-12-14 | 2014-04-02 | 华为终端有限公司 | Instruction processing method and terminal equipment |
CN102981717B (en) * | 2012-11-12 | 2016-01-13 | 东莞宇龙通信科技有限公司 | Terminal and touch key-press locking means |
CN103699298A (en) * | 2013-12-16 | 2014-04-02 | 联想(北京)有限公司 | Information processing method and electronic equipment |
CN105138272B (en) * | 2015-09-14 | 2018-12-07 | Tcl移动通信科技(宁波)有限公司 | A kind of the key activation control device and its method of touch screen |
CN106325594A (en) * | 2016-08-04 | 2017-01-11 | 北京奇虎科技有限公司 | Locking method and locking device for virtual keys and mobile terminal |
CN106598630A (en) * | 2016-12-30 | 2017-04-26 | 深圳天珑无线科技有限公司 | Key control method and apparatus, and terminal |
-
2017
- 2017-04-27 CN CN201710288740.3A patent/CN107193553B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN107193553A (en) | 2017-09-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107193553B (en) | Key control method and device | |
CN107908351B (en) | Application interface display method and device and storage medium | |
CN104866179B (en) | Terminal application program management method and device | |
CN105975166B (en) | Application control method and device | |
CN104866749B (en) | Operate response method and device | |
CN107102772B (en) | Touch control method and device | |
CN105487805B (en) | Object operation method and device | |
CN106570442A (en) | Fingerprint identification method and device | |
CN104317402B (en) | Description information display method and device and electronic equipment | |
CN106201292A (en) | Terminal false-touch prevention method and apparatus | |
CN106547461B (en) | Operation processing method, device and equipment | |
EP3232301B1 (en) | Mobile terminal and virtual key processing method | |
CN107885418B (en) | Terminal, split screen display method and device | |
CN107390977A (en) | Button operation method, apparatus and storage medium | |
EP3232325B1 (en) | Method and device for starting application interface | |
CN109521923B (en) | Floating window control method and device and storage medium | |
CN108829473B (en) | Event response method, device and storage medium | |
CN107491238B (en) | Display method and device of push information | |
CN106940653B (en) | Method, apparatus and computer-readable storage medium for controlling application program | |
CN106126050B (en) | Menu display method and device | |
CN107315517B (en) | Method and device for preventing false touch, mobile terminal and intelligent terminal | |
CN105373318A (en) | Information display method and apparatus | |
CN108037875B (en) | Method, device and storage medium for switching input modes | |
CN115129203A (en) | Interface display method and device of application program | |
CN109445672B (en) | Sliding cover event response method and device and storage medium |
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 |