Method for starting shortcut function, electronic device, readable medium and computer program product
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-02-26
- Publication Date
- 2026-08-07
AI Technical Summary
[0003]在相关技术中,对于电子设备的这些功能,当用户需要使用时,用户需要输入一系列的操作,例如查找并点击该应用的图标,如此不利于功能的快捷启动
Smart Images

Figure CN119248171B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video processing technology, and in particular to a method for enabling shortcut functions, electronic devices, computer program products, and computer-readable storage media. Background Technology
[0002] Currently, electronic devices have become an indispensable part of people's lives. When using them, users may use certain functions of electronic devices very frequently, such as installing a large number of applications on the device. The function of the electronic device refers to certain functions of the applications, for example, launching the camera application, launching the camera application and taking a picture, etc.
[0003] In related technologies, when users need to use these functions of electronic devices, they need to input a series of operations, such as finding and clicking the application icon, which is not conducive to the quick launch of functions. Summary of the Invention
[0004] This application provides a method for enabling shortcut functions, an electronic device, a computer program product, and a computer-readable storage medium, with the aim of quickly and conveniently launching application functions.
[0005] To achieve the above objectives, this application provides the following technical solution:
[0006] In a first aspect, this application provides a method for activating a shortcut function in an electronic device. The electronic device includes a first button, which differs from a traditional mechanical button and is capable of detecting user sliding operations and pressing operations of varying force. The method for activating the shortcut function includes: receiving a user pressing operation on the first button; responding to the user pressing operation on the first button by running a first function of an application installed on the electronic device; receiving a user sliding operation on the first button; and responding to the user sliding operation on the first button by running a second function of an application installed on the electronic device. The first function and the second function may be the same or different. The difference between the first function and the second function may include: the first function and the second function being different functions of the same application installed on the electronic device, or the first function and the second function being functions of different applications installed on the electronic device.
[0007] As can be seen from the above, the electronic device is equipped with a first button that can detect user swipe operations and press operations of varying pressure. Based on this, the electronic device can be configured to map user operations on the first button to the functions of the applications installed on the device. When the user presses the first button, the electronic device can activate the function corresponding to that press operation; when the user swipes the first button, the electronic device can activate the function corresponding to that swipe operation. This achieves quick activation of application functions.
[0008] In one possible implementation, receiving a user's press operation on the first button includes: receiving a user's long press operation on the first button; responding to the user's press operation on the first button, running a first function of an application installed on the electronic device includes: responding to the user's long press operation on the first button, running the first function of the application installed on the electronic device; based on this, the method for activating the shortcut function further includes: receiving a user's long press operation on the first button; responding to the user's long press operation on the first button, running a third function of the application installed on the electronic device, wherein the first function and the third function may be the same or different.
[0009] In this possible implementation, the first button supports the detection of different pressure levels applied by the user. Based on this, different pressure levels can correspond to different application functions. Combining the scenarios of pressure intensity and pressing duration, a user pressing the first button hard can activate the application function corresponding to the hard press operation, and a user pressing the first button long-press can activate the application function corresponding to the long-press operation. This expands the number of functions that can be quickly launched.
[0010] In one possible implementation, receiving a user's press operation on the first button includes: receiving a user's press operation on a first position of the first button; responding to the user's press operation on the first button, running a first function of an application installed on the electronic device includes: responding to the user's press operation on the first position of the first button, running the first function of the application installed on the electronic device; based on this, the method for activating shortcut functions further includes: receiving a user's press operation on a second position of the first button; responding to the user's press operation on the second position of the first button, running a fourth function of the application installed on the electronic device, wherein the first function and the fourth function may be the same or different, thus realizing the function of launching the application by the user inputting a press operation at different positions of the first button, and also expanding the number of shortcut launch functions. Furthermore, a press operation can also refer to a hard press operation or a long press operation.
[0011] In one possible implementation, receiving a user's sliding operation on a first button includes: receiving a user's sliding operation on the first button along a first direction; responding to the user's sliding operation on the first button, running a second function of an application installed on the electronic device includes: responding to the user's sliding operation on the first button along the first direction, running the second function of the application installed on the electronic device; based on this, the method for activating shortcut functions further includes: receiving a user's sliding operation on the first button along a second direction; responding to the user's sliding operation on the first button along the second direction, running a fifth function of the application installed on the electronic device, wherein the first function and the fifth function may be the same or different, thus realizing the function of launching the application by the user inputting a sliding operation on the first button in different directions, and also expanding the number of shortcut launch functions.
[0012] In one possible implementation, in response to a user pressing a first button, running a first function of an application installed on the electronic device includes: generating a press event in response to the user pressing the first button; and running the first function of the application installed on the electronic device based on the press event.
[0013] In one possible implementation, before running the first function of the application installed on the electronic device based on the press event, the method further includes: determining that the pressure value included in the press event is greater than a first value, which can enable the user input operation to be determined as a press operation or a swipe operation by whether the pressure value is greater than the first value.
[0014] In one possible implementation, in response to a user pressing a first button, a press event is generated, including: sequentially generating a press-down event and a release event in response to the user pressing the first button; based on the press event, a first function of an application installed on the electronic device is executed, including: based on the press-down event and the release event, executing the first function of the application installed on the electronic device. The user-input press operation includes pressing the button and releasing the button. The electronic device executes the first function of the application installed on the electronic device based on the press-down event and the release event, enabling accurate response to the user pressing the first button and activating the application's function, avoiding false responses.
[0015] In one possible implementation, before running the first function of an application installed on the electronic device based on a press event and a release event, the method further includes: determining that the pressure value of the press event is greater than a first value, and determining that the pressure value of the release event is less than a second value, where the second value is less than the first value. The pressure value of a user's press operation on the first button is typically relatively large. After the user presses the first button, releasing it causes a change in pressure value, resulting in a smaller pressure value. By determining whether the pressure value of the press event is greater than the first value and whether the pressure value of the release event is less than the second value, the system can more accurately respond to the user's press operation on the first button, activate the application's function, and avoid erroneous responses.
[0016] In one possible implementation, based on the press event and the release event, the first function of the application installed on the electronic device is executed, including: when it is determined that the pressure value of the press event meets the pressing force requirement of the first button, the first function of the application installed on the electronic device is executed based on the press event and the release event, thus realizing the function of launching the application in response to the user's heavy press operation.
[0017] In one possible implementation, based on the press-down and release-up events, the first function of an application installed on the electronic device is executed, including: obtaining the duration of the press event based on the timestamps of the press-down and release-up events; determining that the pressure value of the press-down event meets the pressure requirement of a first button, and determining that the duration of the press event meets the press duration requirement of the first button, and then, based on the press-down and release-up events, executing the first function of the application installed on the electronic device, thus realizing the function of launching the application in response to the user's long press operation.
[0018] In one possible implementation, in response to a user's sliding operation on a first button, running a second function of an application installed on the electronic device includes: generating a sliding event in response to the user's sliding operation on the first button; and running the second function of the application installed on the electronic device based on the sliding event.
[0019] In one possible implementation, in response to a user's sliding operation on the first button, a sliding event is generated, including: in response to the user's sliding operation on the first button, obtaining the sliding distance and starting point coordinates of the sliding operation; and generating a sliding event based on the sliding distance and starting point coordinates of the sliding operation.
[0020] In one possible implementation, before running the second function of the application installed on the electronic device based on the swipe event, the method further includes: determining whether the swipe operation is a valid swipe operation based on the swipe event, which can achieve accurate response to the user's swipe operation, start the application's function, and avoid false responses.
[0021] In one possible implementation, determining whether a sliding operation is a valid sliding operation based on a sliding event includes: determining that the event information of the sliding event satisfies any one or any combination of the following three conditions; wherein the three conditions include: the sliding stroke of the sliding event is less than the full stroke of the sliding operation and greater than the minimum stroke of the sliding operation, and the score of the sliding stroke of the sliding event is higher than a first threshold; the sliding speed of the sliding event is greater than the lower limit of the speed of the sliding operation and less than the upper limit of the speed of the sliding operation, and the score of the sliding speed of the sliding event is higher than a second threshold; and the score of the sliding pressure of the sliding event is higher than a third threshold.
[0022] In one possible implementation, if the event information of a button event satisfies three conditions, the score of the sliding travel of the sliding event is higher than a first threshold, the score of the sliding speed of the sliding event is higher than a second threshold, and the score of the sliding pressure of the sliding event is higher than a third threshold, including: the weighted sum of the scores of the sliding travel, the sliding speed, and the sliding pressure of the sliding event is greater than the sliding threshold.
[0023] In one possible implementation, before obtaining the sliding distance and starting point coordinates of the sliding operation, the method further includes: determining whether the sliding operation meets the sliding stop condition based on the sliding event corresponding to the sliding operation. Since the user-inputted sliding operation is a continuous operation including a sliding start and a sliding end, obtaining the sliding distance and starting point coordinates only after determining that the sliding operation meets the sliding stop condition, thus forming a sliding event, enables the function of launching the application corresponding to the sliding operation after the user has fully input the sliding operation.
[0024] In one possible implementation, the method for enabling the shortcut function further includes: based on the swipe event corresponding to the swipe operation, if it is determined that the swipe operation does not meet the swipe stop condition, recording the parameters in the swipe event corresponding to the swipe operation, or resetting the recorded parameters in the swipe event corresponding to the swipe operation, thus continuously recording the parameters in the swipe event during the user's swipe input. If the user habitually lightly rests their finger on the button, causing the electronic device to receive a swipe event, but since the swipe operation does not meet the swipe stop condition, the parameters in the recorded swipe event corresponding to the swipe operation can be reset to update the parameters and obtain a new swipe event.
[0025] In some embodiments, the electronic device records parameters in the sliding event corresponding to the sliding operation, or resets the recorded parameters in the sliding event corresponding to the sliding operation, under the following conditions: if the time difference between two consecutive sliding events is greater than or equal to a threshold, then the recorded parameters in the sliding event corresponding to the sliding operation are reset; if it is less than the threshold, then the parameters in the sliding event corresponding to the sliding operation are recorded. This is more in line with the current situation where the sliding operation is a continuous and fast-completed action.
[0026] In one possible implementation, the first button is a volume button or power button on the electronic device, or a button other than the volume and power buttons. In this possible implementation, when the first button is a volume button, the first, second, third, fourth, and fifth functions do not refer to the original functions of the volume button, i.e., they do not refer to the function of increasing or decreasing the volume. Similarly, when the first button is the power button, the first, second, third, fourth, and fifth functions also do not refer to the original functions of the power button, i.e., they do not refer to functions such as powering on, powering off, restarting, turning off the screen, and turning on the screen. This allows users to quickly launch application functions by operating the volume or power button. Since the first button is a button other than the volume and power buttons, it is naturally decoupled from the volume and power buttons, preventing accidental touches.
[0027] In a second aspect, this application provides an electronic device, including: one or more processors, a memory, and a first button; the memory and the first button are coupled to one or more processors, the memory is used to store a computer program, the computer program includes computer instructions, and when one or more processors execute the computer instructions, the electronic device performs a method for activating a shortcut function as provided in any of the first aspect and possible embodiments.
[0028] Thirdly, this application provides a computer-readable storage medium for storing a computer program, which, when executed, is specifically used to implement the method for enabling shortcut functions as provided in any of the first aspect and possible embodiments.
[0029] Fourthly, this application provides a computer program product that, when run on a computer, causes the computer to perform a method for enabling shortcut functions as provided in any of the first aspects and possible embodiments. Attached Figure Description
[0030] Figure 1 A diagram illustrating the configuration of power and volume buttons on a mobile phone;
[0031] Figure 2 and Figure 3 The diagram illustrates the various one-click access operation modes provided in the embodiments of this application.
[0032] Figure 4 A software framework diagram of an electronic device provided in the embodiments of this application;
[0033] Figure 5 The application provides a range definition of the pressing pressure of the novel button in the embodiments of this application;
[0034] Figure 6 A flowchart illustrating the press detection or slide detection process of the novel button subsystem provided in this application embodiment;
[0035] Figure 7 The process for determining the validity of a sliding event provided in the embodiments of this application;
[0036] Figure 8 This is a hardware structure diagram of the electronic device provided in the embodiments of this application. Detailed Implementation
[0037] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. The terminology used in the following embodiments is for the purpose of describing specific embodiments only and is not intended to be a limitation of this application. As used in the specification and appended claims of this application, the singular expressions "a," "an," "the," "the," "the," and "this" are intended to also include expressions such as "one or more," unless the context clearly indicates otherwise.
[0038] References to "some embodiments" and the like in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, phrases such as "in some embodiments," "in other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiments, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless otherwise specifically emphasized.
[0039] The "multiple" mentioned in the embodiments of this application refers to two or more. It should be noted that in the description of the embodiments of this application, terms such as "first" and "second" are used only for the purpose of distinguishing descriptions and should not be construed as indicating or implying relative importance, nor should they be construed as indicating or implying order.
[0040] Electronic devices such as mobile phones have mechanical buttons on their casings, such as power buttons and volume buttons. For example, Figure 1 Images (a) and (b) illustrate two ways to configure the power button and volume buttons on a mobile phone. Figure 1 As shown in (a), the volume button 101 and the power button 102 are located on the same side of the phone, as... Figure 1 As shown in (b), the volume button 101 and the power button 102 are located on both sides of the phone.
[0041] Traditional mechanical buttons typically support press and release detection. A new type of button supports both press and release detection; it also supports detecting different levels of pressure, for example, three levels of pressure: light tap, light press, and heavy press; it can also support detection of a combination of pressure and press duration, for example, the new button supports heavy press and long press; and it also supports vertical sliding detection. In some embodiments, the power button and volume buttons on an electronic device can use this new type of button. In other embodiments, in addition to the power button and volume buttons, the electronic device can also have a separate new button. In scenarios where the power button and volume buttons are located on opposite sides of the electronic device, this new button can be located on the same side as the power button, and above the power button (here, "above" refers to the end where the camera is located, and "below" refers to the end where the speaker is located).
[0042] Based on mechanical buttons that support press and release detection, detection of different pressure levels, detection of a combination of pressure intensity and duration, and detection of vertical sliding, this application provides a method for activating shortcut functions by operating a novel button. The novel button on the electronic device can correspond to one or more shortcut functions, which can refer to quick access to application services, such as launching a camera application or taking a photo. Users can control the electronic device to run this shortcut function by inputting sliding or pressing operations on the novel button, achieving rapid access to services (referred to as one-click access), reducing user operations and improving efficiency.
[0043] Furthermore, the new buttons support the detection of different pressure levels, as well as the detection of different pressure levels and pressing durations combined, and also support sliding detection. Therefore, users can perform a variety of operations on the new buttons. Compared to the quick start function of mechanical buttons, the new buttons support more quick start functions.
[0044] It should be noted that in scenarios where electronic devices use new buttons as power and volume buttons, the shortcut functions corresponding to the power button do not include the functions that the power button itself corresponds to, such as power on, power off, restart, screen on, and screen off; similarly, the shortcut functions corresponding to the volume buttons do not include the function of adjusting the volume.
[0045] In some embodiments, different pressure levels of the novel button can correspond to different shortcut functions, that is, there is a mapping relationship between the various pressure levels of the novel button and the shortcut functions.
[0046] It should be noted that, taking the three-level classification as an example, the new type of button is divided into three pressure levels: light tap, light press, and heavy press, based on a relatively precise and accurate range of pressure applied. Assuming the operator of the new button is a robotic arm or robot, the operator can strictly adhere to the different pressure levels and accurately interact with the electronic device using the new button without triggering any misidentification issues. However, from the perspective of a human operator, people of different ages, occupations, genders, and health conditions may have significant differences in their perception of the pressure applied to light taps, light presses, and heavy presses. This concept of dividing levels based on relatively small pressure ranges, requiring different people to learn and adapt to this classification, can easily lead to user misoperation. For example, in scenarios where the new button is reused with traditional mechanical buttons (power button and / or volume button), if the user's intention is distinguished by pressure level, it is inevitable that users will find it easy to accidentally press the wrong button. Therefore, in some embodiments, the electronic device uses a heavy press or long press as the trigger condition for shortcut functions.
[0047] like Figure 2 As shown, one-touch access can be divided into dedicated mode, left / right mode, up / down button mode, up / down button mode, and separate control mode. The following uses the power button and volume buttons on electronic devices as examples to introduce these five modes.
[0048] The dedicated mode can be used as the system's default mode. Its design aims to make it as simple and easy as possible for everyone to operate, reducing the learning and memorization costs. Dedicated mode means that pressing a new button corresponds to a quick access to a specific service. This is the basic mode and does not depend on the number of new buttons (1 or 2) or their layout, such as a left-right or single-sided top-bottom layout.
[0049] For example, the power button and volume buttons are located on the left and right sides of the electronic device. Pressing either the power button or the volume buttons corresponds to the quick launch of the same service. These press operations include pressing the left button up, pressing the left button down, pressing the right button down, and pressing the right button up (referred to as left-click up, left-click down, right-click down, and right-click down, respectively). That is, any one of these operations—left-click up, left-click down, right-click down, or right-click up—maps to the same quick access function. Users only need to remember to press the button to trigger the service. Specifically, left-click up means pressing and holding the upper half of the left button; left-click down means pressing and holding the lower half of the left button; right-click up means pressing and holding the upper half of the right button; and right-click down means pressing and holding the lower half of the right button.
[0050] For another example, the power button and volume buttons are located on one side of the electronic device, arranged vertically. Pressing either the power button or the volume buttons corresponds to quick access to the same service. These press operations include pressing the up button, pressing the up button down, pressing the down button down, and pressing the down button up. That is, any one of these operations maps to a quick access to the same service. Specifically, pressing the up button up means pressing or holding the upper half of the upper button; pressing the up button down means pressing or holding the lower half of the upper button; pressing the down button up means pressing or holding the upper half of the lower button; and pressing the down button down means pressing or holding the lower half of the lower button.
[0051] In some embodiments, users can customize the shortcut functions corresponding to pressing the up and down arrow keys or the left and right arrow keys in the "Dedicated Mode" through the settings application.
[0052] For example, the settings application menu of an electronic device may include "Shortcut Function Launch," which may also include a "One-Click Access Mode Selection" menu item. When the user clicks the "One-Click Access Mode Selection" menu item, the electronic device can display the factory default radio button, namely the "Dedicated Mode" radio button. This radio button provides users with a variety of customizable shortcut functions, such as quickly launching the camera application. This ensures that launching the camera application via the volume buttons or power button does not conflict with the functions of the volume buttons and power button themselves. The operation of the new button corresponding to quickly launching the camera application can refer to: a hard press or long press of the up and down buttons, and a hard press or long press of the left and right buttons, in scenarios where the screen is off, locked, and music is playing. The user can select a customizable shortcut function to map the hard press or long press of the up and down buttons, and the hard press or long press of the left and right buttons, to the shortcut function.
[0053] After users customize their shortcuts, for scenarios where the new buttons are arranged left and right, users can quickly activate their customized shortcuts by pressing the left button up, left button down, right button down, or right button up. Similarly, for scenarios where the new buttons are arranged up and down, users can quickly activate their customized shortcuts by pressing the up button up, up button down, down button down, or down button up.
[0054] The left-right mode is a direct access mode provided for users who prefer to remember the two configurations and the left-right distinction. Users can use this mode to map left-side button operations to one type of one-click quick access function, and vice versa. For the left-right mode, the electronic device assigns shortcut functions A and B to the left and right buttons respectively. Pressing the left button up or down will trigger function A, and pressing the right button up or down will trigger function B. A left-click up action represents a hard press or long press on the upper half of the left button; a left-click down action represents a hard press or long press on the lower half of the left button; a right-click up action represents a hard press or long press on the upper half of the right button; and a right-click down action represents a hard press or long press on the lower half of the right button.
[0055] This mode typically appears on electronic devices with two new buttons that support button press detection, located on the left and right sides of the device. If the user presses the left and right buttons and they are both associated with the same function (i.e., A and B are for the same function), then this mode is equivalent to the dedicated mode.
[0056] In some embodiments, users can customize the shortcut functions corresponding to the "left and right modes" through the settings application.
[0057] For example, the settings application menu of an electronic device may include "Shortcut Function Activation," which may also include a "One-Click Access Mode Selection" menu item. When the user clicks the "One-Click Access Mode Selection" menu item, the electronic device may display the factory default radio button, namely the "Dedicated Mode" radio button, and may also display the "Left / Right Mode" option. Typically, the "Left / Right Mode" option may include multiple options, each corresponding to a shortcut function. When the user selects an option in the "Left / Right Mode," it can trigger the pressing operation of the left and right buttons and the allocation configuration function of the shortcut function.
[0058] After a user has customized a shortcut function, they can quickly launch one of the customized shortcut functions by pressing the left mouse button up or down, and launch another customized shortcut function by pressing the right mouse button up or down.
[0059] The up / down press mode is a direct access mode designed to help users remember the two configurations and prefer to distinguish functions by remembering the up and down operations. Users can use this mode to map an up press to one function and a down press to another. For the up / down press mode, electronic devices assign shortcut functions A and B to the up and down press operations. When a user performs an up press, whether using the left or right button, function A will be triggered; when a user performs a down press, whether using the left or right button, function B will be triggered. Specifically, an up press represents a hard press or long press on the upper half of the button; a down press represents a hard press or long press on the lower half of the button. Figure 2 Let's take a hard press as an example.
[0060] When an electronic device has two new types of buttons that support press detection, this mode can be supported regardless of whether the two buttons are located on the same side or opposite sides of the electronic device.
[0061] If the user binds both the up and down buttons to the same function, that is, A and B are the same function, then the effect of this mode is the same as the effect of the dedicated mode.
[0062] In some embodiments, users can customize the shortcut functions corresponding to the "press up and down mode" through the settings application.
[0063] For example, the settings application menu of an electronic device may include "Shortcut Function Activation," which may also include a "One-Click Access Mode Selection" menu item. When the user clicks the "One-Click Access Mode Selection" menu item, the electronic device may display the factory default radio button, namely the "Dedicated Mode" radio button, and may also display the "Up / Down Press Mode" option. Typically, the "Up / Down Press Mode" option may include multiple options, each corresponding to a shortcut function. When the user selects an option in the "Up / Down Press Mode," the up or down press operation and shortcut function allocation configuration function can be triggered.
[0064] After users customize their shortcuts, the two new buttons are positioned left-right. Users can quickly activate one customized shortcut by pressing the left or right button up, and quickly activate another customized shortcut by pressing the left or right button down. Alternatively, if the two new buttons are positioned vertically, users can quickly activate one customized shortcut by pressing the up or down button up, and quickly activate another customized shortcut by pressing the up or down button down.
[0065] The up / down button mode is a new type of mode where two buttons supporting press detection are located on the same side of the electronic device. Users can use this mode to map operations on the upper button to one one-click quick access function, and vice versa. For the up / down button mode, the electronic device is equipped with shortcut functions A and B corresponding to pressing the upper and lower buttons respectively. Pressing the upper button (either up or down) will trigger function A, and pressing the lower button (either up or down) will trigger function B. Pressing the up button (up) indicates a hard press or long press on the upper half of the upper button; pressing the up button (down) indicates a hard press or long press on the lower half of the upper button; pressing the down button (up) indicates a hard press or long press on the upper half of the lower button; pressing the down button (down) indicates a hard press or long press on the lower half of the lower button. Figure 2 Let's take pressing the up and down keys repeatedly as an example.
[0066] If the user presses the top and bottom buttons and they are both bound to the same function (i.e., A and B are the same function), then the effect of this mode is the same as the effect of the dedicated mode.
[0067] In some embodiments, users can customize the shortcut functions corresponding to the "up and down key mode" through the settings application.
[0068] For example, the settings application menu of an electronic device may include a "Shortcut Function Activation" menu item, which may also include a "One-Click Access Mode Selection" menu item. When the user clicks the "One-Click Access Mode Selection" menu item, the electronic device may display the factory default radio button, namely the "Dedicated Mode" radio button, and may also display the "Up / Down Key Mode" option. Typically, the "Up / Down Key Mode" option may include multiple options, each corresponding to a shortcut function. When the user selects an option in the "Up / Down Key Mode," the up or down key press operation and shortcut function assignment configuration function can be triggered.
[0069] After a user has customized a shortcut function, they can quickly launch one of the customized shortcut functions by pressing the up or down arrow key, and launch another customized shortcut function by pressing the down arrow key.
[0070] The separate control mode is a set of four direct access modes provided for users who can remember four configurations.
[0071] For example, with two new buttons positioned on the left and right sides of an electronic device, users can use this mode to associate four operations—left button up, left button down, right button up, and right button down—with functions A, B, C, and D, respectively. Users can trigger different business functions through different operations to achieve one-click access.
[0072] For another example, with two new buttons located on the same side of an electronic device, users can use this mode to associate the four operations—up button up, up button down, down button up, and down button down—with functions A, B, C, and D, respectively. Users can trigger different business functions through different operations to achieve one-click access.
[0073] Specifically, pressing the left button up means pressing or holding the upper half of the left button; pressing the left button down means pressing or holding the lower half of the left button; pressing the right button up means pressing or holding the upper half of the right button; pressing the right button down means pressing or holding the lower half of the right button; pressing the up button up means pressing or holding the upper half of the upper button; pressing the up button down means pressing or holding the lower half of the upper button; pressing the down button up means pressing or holding the upper half of the lower button; pressing the down button down means pressing or holding the lower half of the lower button. Figure 2 Let's take a hard press as an example.
[0074] It should be noted that functions A, B, C, and D can be the same. When functions A, B, C, and D are the same, the user experience of this mode is consistent with the single-function mode.
[0075] It should also be noted that the number and positional distribution of buttons that support different levels of pressure detection determine which modes the electronic device's settings applications include. For example, if an electronic device has one button that supports different levels of pressure detection, the settings applications will only include a single-mode and a separate-control mode; if the electronic device has two buttons that support different levels of pressure detection, and the two buttons are located on opposite sides of the device, the settings applications can include a single-mode, left / right mode, up / down mode, and separate-control mode; if the electronic device has two buttons that support different levels of pressure detection, and the two buttons are located on the same side of the device, the settings applications can include a single-mode, up / down mode, up / down button mode, and separate-control mode.
[0076] In some embodiments, users can customize the shortcut functions corresponding to the "Distributed Control Mode" through the settings application.
[0077] For example, the settings application menu of an electronic device may include "Shortcut Function Activation," which may also include a "One-Click Access Mode Selection" menu item. When the user clicks the "One-Click Access Mode Selection" menu item, the electronic device may display the factory default radio button, namely the "Dedicated Mode" radio button, and may also display the "Divided Control Mode" option. Typically, the "Divided Control Mode" option may include multiple options, each corresponding to a shortcut function. When the user selects an option in "Divided Control Mode," it can trigger one of the following four operations and the corresponding shortcut function: left-click up, left-click down, right-click up, right-click down; or, it can trigger one of the following four operations and the corresponding shortcut function: up-click up, up-click down, down-click up, down-click down.
[0078] After a user has customized a shortcut function, the user can quickly launch the customized shortcut function by pressing the left mouse button up, the left mouse button down, the right mouse button up, or the right mouse button down, or by pressing the up button up, the up button down, the down button up, or the down button down.
[0079] In other embodiments, sliding operations at different positions of the novel button correspond to different shortcut functions; that is, there is a mapping relationship between sliding operations at different positions of the novel button and shortcut functions. For example, in a left-right layout of the novel button in an electronic device, the four sliding detection capabilities of the novel button may include: left-side up-slide, left-side down-slide, right-side up-slide, and right-side down-slide.
[0080] The new button supports swipe detection, a capability traditional buttons lack. Replacing traditional buttons with the new button allows for a clear distinction between swipe and press detection. In other words, the new button's swipe gesture detection capability effectively differentiates it from the press detection capability of traditional buttons. Therefore, in terms of hardware form, the new button can appear as a new addition or as a replacement for traditional buttons. Furthermore, from a human operation perspective, it can effectively distinguish and efficiently execute press or swipe operations for anyone, without causing misidentification or incorrect response of the user's intention.
[0081] like Figure 3 As shown, one-touch access can be divided into dedicated mode, left / right mode, up / down swipe mode, up / down key mode, and separate control mode. The following uses the power button and volume buttons on electronic devices as examples to introduce these five modes.
[0082] The dedicated mode can be used as the system's default mode. Its design aims to make it as simple and easy as possible for everyone to operate, reducing the learning and memorization costs. Dedicated mode means that the sliding operation of a new type of button corresponds to a quick access function for a single service. This is the basic mode and does not depend on the number of new buttons (1 or 2) or their layout, such as a left-right layout or a single-sided top-bottom layout.
[0083] For example, the power button and volume buttons are located on the left and right sides of the electronic device. Sliding the power button and volume buttons corresponds to quick access to the same service. Sliding operations include sliding the left button up, sliding the left button down, sliding the right button down, and sliding the right button up (referred to as left-click up, left-click down, right-click down, and right-click down, respectively). That is, any one of these actions—left-click up, left-click down, right-click down, or right-click up—maps to a quick access function for the same service. Users only need to remember to slide the buttons to trigger the service.
[0084] For another example, the power button and volume buttons are located on one side of the electronic device, arranged vertically. Sliding operations on both the power button and volume buttons correspond to quick access to the same service. These sliding operations include swiping up, swiping down, swiping down, and swiping up. In other words, any one of these actions—swiping up, swiping down, swiping down, or swiping up—maps to a quick access function for the same service.
[0085] In some embodiments, users can customize the shortcut functions corresponding to swiping up and down or left and right with the "Dedicated Mode" through the settings application.
[0086] For example, the settings application menu of an electronic device may include "Quick Function Launch," which may also include a "One-Click Access Mode Selection" menu item. When the user clicks the "One-Click Access Mode Selection" menu item, the electronic device may display the factory default radio button, namely the "Dedicated Mode" radio button, which provides the user with a variety of customizable shortcut functions, such as: quick launch of the camera application, and operation of the new button corresponding to quick launch of the camera application by sliding up and down keys and left and right keys.
[0087] After users customize their shortcuts, for scenarios where the new buttons are arranged left and right, users can quickly activate their customized shortcuts by swiping up with the left button, down with the left button, down with the right button, or up with the right button. Similarly, for scenarios where the new buttons are arranged up and down, users can quickly activate their customized shortcuts by swiping up with the up button, down with the up button, down with the down button, or up with the down button.
[0088] The left-right mode is a direct access mode provided for users who prefer to remember the two configurations and the left-right distinction. Users can use this mode to map swiping operations on the left-side buttons to one type of one-click quick access function, and vice versa. For the left-right mode, the electronic device assigns shortcut functions A and B to the swiping operations of the left and right-side buttons, respectively. When a user swipes up or down on the left-side button, function A is triggered; when a user swipes up or down on the right-side button, function B is triggered.
[0089] This mode typically appears on electronic devices with two new buttons that support button slide detection, located on the left and right sides of the device. If the user's slide operations on both the left and right buttons are bound to the same function (i.e., A and B are the same function), then the effect of this mode is equivalent to that of the dedicated mode.
[0090] In some embodiments, users can customize the shortcut functions corresponding to the "left and right modes" through the settings application.
[0091] For example, the settings application menu of an electronic device may include "Shortcut Function Launch," which may also include a "One-Click Access Mode Selection" menu item. When the user clicks the "One-Click Access Mode Selection" menu item, the electronic device may display the factory default radio button, namely the "Dedicated Mode" radio button, and may also display "Left / Right Mode" options. Typically, the "Left / Right Mode" options may include multiple options, each corresponding to a shortcut function. When the user selects an option in the "Left / Right Mode," the left and right swipe operation and shortcut function allocation configuration function can be triggered.
[0092] After a user has customized a shortcut function, they can quickly launch one of the customized shortcut functions by swiping up or down with the left mouse button, and another customized shortcut function by swiping up or down with the right mouse button.
[0093] The swipe-up / swipe-down mode is a direct access mode designed to help users remember the two configurations and for those who prefer to distinguish functions by remembering the up and down gestures. Users can use this mode to map an up swipe to one function for quick access, and vice versa. For the swipe-up / swipe-down mode, electronic devices assign shortcut functions A and B to the up and down swipe actions. When a user performs an up swipe (either left or right), function A will be triggered; similarly, when a user performs a down swipe (either left or right), function B will be triggered.
[0094] When an electronic device has two new types of buttons that support slide detection, this mode can be supported regardless of whether the two buttons are located on the same side or opposite sides of the electronic device.
[0095] If a user binds the same function to both swiping up and swiping down, that is, A and B are the same function, then the effect of this mode is the same as the effect of the dedicated mode.
[0096] In some embodiments, users can customize the shortcut functions corresponding to the "slide-up / down mode" through the settings application.
[0097] For example, the settings application menu of an electronic device may include "Shortcut Function Launch," which may also include a "One-Click Access Mode Selection" menu item. When the user clicks the "One-Click Access Mode Selection" menu item, the electronic device may display the factory default radio button, namely the "Dedicated Mode" radio button, and may also display the "Up / Down Swipe Mode" option. Typically, the "Up / Down Swipe Mode" option may include multiple options, each corresponding to a shortcut function. When the user selects an option in the "Up / Down Swipe Mode," the allocation and configuration function of the up or down swipe operation and shortcut function can be triggered.
[0098] After a user has customized a shortcut function, they can quickly launch one of the customized shortcut functions by swiping up with the left or right mouse button, and quickly launch another customized shortcut function by swiping down with the left or right mouse button.
[0099] The up / down button mode is a new type of mode where two buttons supporting swipe detection are located on the same side of the electronic device. Users can use this mode to map swipe operations on the upper button to a one-click quick access function, and vice versa. For the up / down button mode, the electronic device is configured with quick access functions A and B for swipe operations on the upper and lower buttons, respectively. When a user swipes up or down on the upper button, function A is triggered; when a user swipes up or down on the lower button, function B is triggered.
[0100] If the user's sliding operations on the top and bottom buttons are both bound to the same function, that is, A and B are the same function, then the effect of this mode is the same as the effect of the dedicated mode.
[0101] In some embodiments, users can customize the shortcut functions corresponding to the "up and down key mode" through the settings application.
[0102] For example, the settings application menu of an electronic device may include "Shortcut Function Launch," which may also include a "One-Click Access Mode Selection" menu item. When the user clicks the "One-Click Access Mode Selection" menu item, the electronic device may display the factory default radio button, i.e., the "Dedicated Mode" radio button, and may also display the "Up / Down Key Mode" option. Typically, the "Up / Down Key Mode" option may include multiple options, each corresponding to a shortcut function. When the user selects an option in the "Up / Down Key Mode," it can trigger the up or down key sliding operation and the shortcut function allocation configuration function.
[0103] After a user has customized a shortcut function, they can quickly launch one of the customized shortcut functions by swiping up or down using the up key, and quickly launch another customized shortcut function by swiping up or down using the down key.
[0104] The separate control mode is a set of four direct access modes provided for users who can remember four configurations.
[0105] For example, with two new buttons positioned on the left and right sides of an electronic device, users can use this mode to associate four operations—left-click up, left-click down, right-click up, and right-click down—with functions A, B, C, and D, respectively. Users can trigger different functions through different operations to achieve one-click access.
[0106] For another example, with two new buttons located on the same side of an electronic device, users can use this mode to associate the four operations—sliding up with the up button, sliding down with the up button, sliding up with the down button, and sliding down with the down button—with functions A, B, C, and D, respectively. Users can trigger different business functions through different operations to achieve one-click access.
[0107] It should be noted that functions A, B, C, and D can be the same. When functions A, B, C, and D are the same, the user experience of this mode is consistent with the single-function mode.
[0108] It should also be noted that the number and position of the buttons supporting swipe detection determine which modes the electronic device's settings applications include. For example, if an electronic device has one button supporting swipe detection, the settings applications will only include a dedicated mode and a separate control mode; if the electronic device has two buttons supporting swipe detection, located on opposite sides of the device, the settings applications can include a dedicated mode, a left-right mode, an up-down swipe mode, and a separate control mode; if the electronic device has two buttons supporting swipe detection, located on the same side of the device, the settings applications can include a dedicated mode, an up-down swipe mode, an up-down button mode, and a separate control mode.
[0109] In some embodiments, users can customize the shortcut functions corresponding to the "Distributed Control Mode" through the settings application.
[0110] For example, the settings application menu of an electronic device may include "Shortcut Function Activation," which may also include a "One-Click Access Mode Selection" menu item. When the user clicks the "One-Click Access Mode Selection" menu item, the electronic device may display the factory default radio button, namely the "Dedicated Mode" radio button, and may also display the "Divided Control Mode" option. Typically, the "Divided Control Mode" option may include multiple options, each corresponding to a shortcut function. When the user selects an option in "Divided Control Mode," it can trigger one of the following four operations and shortcut function allocation configurations: left-click up, left-click down, right-click up, and right-click down; or, it can trigger one of the following four operations and shortcut function allocation configurations: up-click up, up-click down, down-click up, and down-click down.
[0111] After a user has customized a shortcut function, they can quickly launch it by swiping up with the left mouse button, swiping down with the left mouse button, swiping up with the right mouse button, or swiping down with the right mouse button. Alternatively, they can launch it by swiping up with the up mouse button, swiping down with the up mouse button, swiping up with the down mouse button, or swiping down with the down mouse button.
[0112] Figure 2 and Figure 3 The advantages of the various display modes are as follows:
[0113] The greatest convenience that dedicated mode brings to users is that they don't need to remember different operations and intentions; they only need to know that swiping or pressing will trigger the service. Users can trigger the corresponding function to start (start if the service is not in the foreground and not running) or to stop (stop if the service is in the foreground) using any convenient operation button.
[0114] The left-right mode, the up-down swipe mode, and the up-down key mode are convenient for users who prefer left-right or up-down movement. You only need to remember two types of operations to directly access and activate the two functions with one click.
[0115] The split control mode is designed for players with good memory and a preference for trendy and cool features, allowing them to use more operations and access more functions with a single click.
[0116] It is important to note that Figure 2 and Figure 3 It displays the complete set of operation modes. In actual application, all modes, a portion of the modes, or a few modes can be used. There is no limitation here.
[0117] After users customize the triggering method and shortcut function correspondence of new buttons on electronic devices, the electronic devices can activate their corresponding shortcut functions by inputting the customized triggering operation.
[0118] The following section describes the process by which an electronic device responds to a user's triggering of a new type of button and activates shortcut functions, based on the software architecture of the electronic device. The software architecture of an electronic device can be understood as the layered architecture of its operating system. The operating system of an electronic device runs on top of its hardware components and can be, for example, iOS, Android (open-source), or Windows. The operating system can be understood as being run by the electronic device's application processor (AP).
[0119] This application uses the layered architecture of the Android system as an example to illustrate the software structure of an electronic device.
[0120] Figure 4 This is a software structure block diagram of an electronic device according to an embodiment of this application.
[0121] A layered architecture divides software into several layers, which communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom: the application layer (APP layer), the application framework layer (FWK layer), the native service layer (Native layer), the hardware abstraction layer (HAL layer), and the kernel layer (Kernel layer). The application layer can include multiple applications. For example, Figure 4 It showcased some third-party and system applications, including the settings application and the notification capsule application.
[0122] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions. For example, Figure 4 The application framework layer shown may include a window management service (WindowManagerService), an input management service (InputManagerService), and a power management service (PowerManagerService, PMS). For example, the Native layer includes input event handling, the HAL layer includes a key HAL, and the Kernel layer includes input drivers and key drivers.
[0123] In some embodiments, such as Figure 2 and Figure 3 As described above, the settings application is designed to allow users to customize the mapping between the operation and shortcut functions of new buttons. For example... Figure 4As shown, the user inputs the mapping between the customized new key operations and shortcut functions in the settings application interface. The electronic device responds to the user's input, and the WindowManagerService binds the new key operations and shortcut functions. In other embodiments, the electronic device may also support the mapping between customized new key operations and shortcut functions in the control center or boot menu; this is not limited here.
[0124] In addition to the application processor, the electronic device may also include a coprocessor that runs a novel button subsystem for responding to user operations on the novel buttons and reporting button events to modules of the operating system running on the application processor. In some embodiments, depending on the user's operation method on the novel buttons, the button events reported by the novel button subsystem to the modules of the operating system running on the application processor may include press events and swipe events.
[0125] The following combination Figure 4 The module on display demonstrates how electronic devices respond to user input via new button triggers to activate shortcut functions.
[0126] The new button includes a deformable elastic component. When a user presses the new button or performs a sliding operation on it, the elastic component deforms to generate a voltage. The new button can convert this voltage into an electrical signal and transmit it to the new button subsystem. This electrical signal can be understood as the button recognition result.
[0127] like Figure 4 As shown, the key recognition module of the new key subsystem, after obtaining the key recognition result, transmits it to the key reporting module through step ①. After confirming that the key recognition result is allowed to be reported to the AP, the key reporting module reports the sliding event or pressing event to the key driver on the AP side through step ②. The key driver reports the sliding event or pressing event to the input driver through step ③. Then, the input driver reports the sliding event or pressing event to the InputManagerService through steps ④ to ⑥ after input event processing. Finally, the InputManagerService distributes the sliding event or pressing event to the WindowManagerService.
[0128] When the WindowManagerService on the AP side receives a slide event or a press event, it triggers the quick launch of the application launched by the shortcut function based on the correspondence between the user-customized new key operation and the shortcut function. Of course, this embodiment uses the WindowManagerService on the AP side as an example. In other embodiments, the FWK layer on the AP side may also include other modules, or a new module may be added, to perform the functions of receiving slide events or press events, triggering the quick launch of the application launched by the shortcut function based on the correspondence between the user-customized new key operation and the shortcut function, and performing other actions performed by the WindowManagerService as described below.
[0129] It's worth noting that WindowManagerService can analyze accidental touch characteristics from swipe or press events based on user actions, such as triggering a shortcut function by pressing a new key and then immediately closing the newly launched application. For swipe or press events that match the accidental touch characteristics, a notification capsule can be used to prompt the user that performing a specific action on the new key can trigger a shortcut launch of a certain application. In this case, the application is only prompted but not launched. If the user presses the new key again, the application will be launched quickly.
[0130] In some embodiments, if the event information such as the sliding distance, force, and speed carried by the sliding event does not meet the startup conditions of the shortcut function, WindowManagerService controls the display screen to show a notification capsule through step ⑦ to prompt the user that a specific sliding operation can launch an application, thereby displaying operation prompts to the user.
[0131] If the event information such as the sliding distance, force, and speed carried by the sliding event meets the conditions for launching the shortcut function, WindowManagerService controls the launch of an application through step ⑧.
[0132] In other embodiments, if the press event carrying event information such as press intensity and duration does not meet the startup conditions of the shortcut function, WindowManagerService can also control the display screen to show a notification capsule through step ⑦ to prompt the user that a specific press operation can launch an application, thereby displaying operation prompts to the user.
[0133] If the press event carries information such as press pressure and duration that meets the startup conditions of the shortcut function, WindowManagerService controls the startup of an application through step ⑧.
[0134] As can be seen from the above, WindowManagerService not only records the correspondence between the operation of the new type of key and the shortcut function, but also can quickly launch the service after receiving a specific sliding or pressing operation. It can also remind users through notification capsules based on the characteristics of some accidental touch behaviors, so as to reduce the impact of accidental touch operations on users.
[0135] It should be noted that when the PMS detects changes in the display state such as screen on, AOD (Always On Display), and screen off, it sends the new state settings to the key configuration and system status information of the new key subsystem through the key HAL and key driver, which then caches the settings and optimizes the relevant parameters accordingly.
[0136] The following is combined with Figures 5 to 7 This application provides a detailed description of the process by which a user activates a shortcut function in response to a novel button press, as provided in the embodiments of this application. In the following text, [A, B) refers to the interval including value A but excluding value B, >= means greater than or equal to, <= means less than or equal to, < means less than, and > means greater than.
[0137] Before reporting sliding or pressing events to the AP, the new button subsystem needs to determine whether the pressure value of the user pressing or sliding the new button meets certain conditions. Specifically:
[0138] Combination Figure 5 If the pressure value sensed by the new button subsystem is too small (e.g., less than P_a), it will be ignored, not reported, and no button recognition will be performed. In other words, the electronic device does not support the detection capability for users to lightly touch the buttons, reducing unnecessary accidental button presses.
[0139] If the pressure value sensed by the novel button subsystem is between [P_b, P_c), it indicates that the user has performed a light tap or swipe operation on the button. Considering that swiping with a small force is easy and simple, this force distribution range is used as the swipe detection range. It should be noted that, theoretically, swipe detection and tap detection do not conflict; the novel button subsystem can distinguish between a swipe and a tap by detecting the swipe distance of the previous N frames. Since this embodiment discusses swipe detection and does not detect tap pressure, and to reduce coupling with tap detection, this range is used as the swipe detection range, and tap detection is not supported by default. However, if a business requires tapping for quick triggering, the novel button subsystem can also determine that the user has performed a tap based on the sensed pressure between [P_b, P_c).
[0140] The force range [P_a, P_b) is used as the state following range. This range specifically belongs to the no-pressure section or the sliding detection pressure range. The pressure range before the pressure enters this range is called the following range.
[0141] When the pressure value ≥ P_d, it is used to support key detection, and the pressure range levels such as light press and heavy press can also be defined as needed.
[0142] The force interval of [P_c, P_d) is also used as the state following interval. Whether this interval specifically belongs to the sliding detection pressure interval or the key detection pressure interval, it follows the pressure interval range before the pressure enters this interval, so it is called the following interval.
[0143] Based on the definition of the pressing force interval disclosed above, the new key subsystem obtains the key recognition results reported by the new keys. It can scan the pressure values, absolute coordinates, relative coordinates, etc. of each new key at a dynamically configurable scanning frequency (such as 100HZ), which can be collectively referred to as key detection information. The pressure value represents the pressure borne by the new key when the new key reports data. The absolute coordinate represents the coordinate value Y relative to the origin of the key (exemplarily, taking the vertical screen of the mobile phone as an example, the top is the position of the origin 0). The relative coordinate represents the distance that has been slid relative to the starting position of the triggered slide, that is, the sliding travel distance D. The new key subsystem scans to obtain the key detection information of the new keys, and based on this key detection information, it can generate key events, that is, generate slide events or press events.
[0144] The new key subsystem can perform first-level filtering processing on key events according to the following rules to reduce the frequency of data reported by the new key subsystem to the AP side, so that the AP can focus more on the subsequent service processing logic. Moreover, since the frequency of scanning the key detection data of the new keys is relatively high, the new key subsystem set in the coprocessor is used to perform the first-level filtering processing, which can also avoid the problem of excessive occupation of the application processor resources caused by the application processor performing the first-level filtering.
[0145] I. For the key starting from the released state as the initial state, from the perspective of pressure, the reporting conditions for key events are as follows:
[0146] 1. If the key pressure is always in the state of < P_a, no key event is reported;
[0147] 2. If the key pressure ≥ P_b, the corresponding slide or press key event is reported.
[0148] II. When the key is continuously in the pressed state, from the perspectives of pressure and sliding travel, the reporting conditions for key events are as follows:
[0149] 1. If the pressure interval of the press changes, a key event carrying parameters is reported;
[0150] 2. If the press sliding travel exceeds a certain threshold, a key event carrying parameters is reported.
[0151] In some embodiments, the button events generated by the novel button subsystem may carry parameters such as pressure value, absolute coordinates, and relative coordinates. In other embodiments, the button events may also carry a timestamp, which indicates the moment the user inputs a press or slide operation. The novel button subsystem can obtain the timestamp when scanning the pressure value, absolute coordinates, and relative coordinates of each novel button, and based on the pressure value, absolute coordinates, relative coordinates, and timestamp of the novel button, execute the above rules to generate or not generate a button event. The novel button subsystem may also obtain the timestamp based on the above rules, determining that the pressure value of the novel button is >= P_b, or that the pressure range of the press has changed based on the pressure value of the novel button, or that the press / slide travel exceeds a certain threshold based on the relative coordinates of the novel button, and obtain the button event based on the pressure value, absolute coordinates, relative coordinates, and timestamp of the novel button, thereby reducing system power consumption.
[0152] Figure 6 This demonstrates the process of detecting and reporting key press or swipe operations from user input. This process includes two-level filtering of user input press or swipe operations, which can be executed by the application processor (AP) or a coprocessor, without restriction. For power consumption considerations, the following description uses a novel key subsystem in a coprocessor as an example.
[0153] In some embodiments, after the novel button subsystem filters button events using the first-level filtering conditions proposed above, the novel button subsystem is based on... Figure 6 The demonstrated process involves secondary filtering of button events after primary filtering. After secondary filtering, the button events can be reported to the AP by the new button subsystem.
[0154] like Figure 6 As shown, the process of the new button subsystem performing press detection or slide detection and reporting button events includes the following steps:
[0155] S601, Confirm the arrival of a new key event.
[0156] The new button subsystem detects the transition from a pressed to a unpressed state and determines that a new button event has occurred. If the user presses the button but the pressure changes, the subsystem can also determine that a new button event has occurred. Similarly, if the user slides the button and the sliding force changes, the subsystem can also determine that a new button event has occurred.
[0157] The new button subsystem determines the arrival of a new button event by receiving button events that have passed the first-level filter. Thus, the new button subsystem can prioritize determining whether a button press (Down) or a slide event is occurring based on a button force threshold.
[0158] In some embodiments, the novel button subsystem determines whether a button Down event is generated through the following steps S602 and S603.
[0159] S602. Determine whether the pressure value P is greater than or equal to P_b and whether the detection flag is the initial value.
[0160] The new button subsystem determines that if the pressure value P >= P_b and the detection flag is at its initial value, it indicates that the user has input a sliding or pressing operation on the new button, and the new button subsystem can generate a button event. The detection flag indicates the detection state of the new button and can be set to different values, each representing the detection state of the new button. This detection state can include at least a sliding detection state and a pressing detection state (also called a button detection state). The detection flag is at its initial value, for example, 0, which indicates that the new button is neither in a sliding detection state nor a pressing detection state.
[0161] After the new button subsystem determines that the pressure value P >= P_b and the detection flag is at its initial value, it can execute step S603 to clarify the type of user input operation. If the new button subsystem determines that the pressure value P < P_b or the detection flag is not at its initial value, it executes step S606.
[0162] The novel button subsystem can determine the detection status of the button through a detection flag. By using the detection flag and the pressure value of the received new button event, the novel button subsystem can more accurately determine the type of button event reported to the AP. In some embodiments, the novel button subsystem may not set a detection flag; instead, it can determine the type of button event reported to the AP solely based on the pressure value of the received new button event. Therefore, step S602 is an optional step.
[0163] S603. Determine whether the pressure value P is greater than or equal to P_d.
[0164] The new button subsystem determines that if the pressure value P >= P_d, it indicates that the user has pressed the button. The new button subsystem can generate and report a "Down" event in step S604. If the pressure value P < P_d, it indicates that the user has swiped. The new button subsystem does not need to immediately generate and report the swiping event. Instead, it can record relevant swiping detection data in step S605 and continue to receive subsequent button events to collect swiping process data, which is ultimately used to determine whether it is a valid swiping operation.
[0165] S604. Set the detection flag to key detection and report the key press Down event to the AP.
[0166] During the process of generating and reporting the Down event, the new button subsystem can also set the detection flag from its initial value to button detection to indicate that the new button is in the press detection state.
[0167] In some embodiments, the Down event generated and reported by the novel button subsystem includes: the pressure value, absolute coordinates, and relative coordinates of the novel button; it may also include a timestamp.
[0168] In other embodiments, the Down events generated and reported by the novel button subsystem may also include indication information, such as an identifier of the novel button, to indicate which of the multiple novel buttons on the electronic device the user operated, or to indicate the identity of the novel button operated by the user.
[0169] When the AP receives a Down event, it can quickly launch the shortcut function corresponding to the user's press operation indicated by the Down event.
[0170] In some embodiments, after receiving a Down button press event, the AP can determine which new button the user operated based on the indication information. For example, in a scenario where the new buttons are arranged on the left and right sides of the electronic device, the AP can determine whether the user operated the left button or the right button based on the indication information; in a scenario where the new buttons are arranged vertically on the same side of the electronic device, the AP can determine whether the user operated the up button or the down button based on the indication information.
[0171] In some embodiments, after receiving a Down event of a button, the AP obtains the pressure value in the Down event and can determine whether the user pressed the new button hard based on the pressure value. The AP obtains the absolute coordinates in the Down event and can determine the position of the user pressing the new button based on the absolute coordinates. For example, the origin of the button is the top of the device (the end of the device including the camera), and the absolute coordinates represent the coordinates of the user's pressing position relative to the origin of the button. Based on the absolute coordinates, the AP determines the position of the user pressing the new button, that is, whether the user pressed the new button up or down.
[0172] It should be noted that, based on the above information, AP's WindowManagerService can determine the identity and location of the new button pressed by the user, and then activate the shortcut function based on the correspondence between the button's press operation and the shortcut function.
[0173] Furthermore, in scenarios where there is a corresponding relationship between the hard press operation of the new type of button and the shortcut function, the AP's WindowManagerService can determine, based on the above, that after the user hard presses the new type of button, the shortcut function can be activated based on the correspondence between the hard press operation of the new type of button and the shortcut function.
[0174] In the correspondence between the hard press operation and shortcut function of the new type of button, it also includes scenarios where the hard press operation of different buttons corresponds to different shortcut functions, or the hard press operation of different positions of the button corresponds to different shortcut functions. The AP can also determine the identity of the new type of button pressed by the user based on the indication information in the Down and Up events, and determine the user's pressing position based on the absolute coordinates in the Down and Up events.
[0175] S605. Record the relevant data for the sliding detection, as follows:
[0176] 1. Set the detection flag to: slide detection, to indicate that the new button is in the slide detection state.
[0177] 2. Record the sliding start timestamp T0; the sliding start timestamp T0 refers to the timestamp corresponding to the key event received in step S601.
[0178] 3. Record the sum of stress P _sum =P1; P1 refers to the pressure value corresponding to the key event received by the new key subsystem in step S601.
[0179] 4. Record the number of reporting points N = 1.
[0180] 5. Record the absolute coordinate Y; the absolute coordinate Y refers to the absolute coordinates corresponding to the key event received by the new key subsystem in step S601.
[0181] 6. Record the initialization process D init .
[0182] It should be noted that the new button is highly sensitive to pressure that can detect sliding. A slight touch from the user may have already created a travel distance. Therefore, when recording the sliding detection data, the travel distance carried in the new button's reported information should be recorded as D. init The value is used to subtract D from the travel information reported with each frame of the slide. init This value allows for the accurate determination of the true sliding stroke distance that meets the sliding requirements.
[0183] S606. Determine whether the detection flag is a key press detection.
[0184] If the new button subsystem determines that the pressure value P >= P_b, but the detection flag is not the initial value, it means that the user may already be pressing the new button. Alternatively, if the new button subsystem determines that the pressure value P < P_b, and the detection flag is not the initial value, it means that the user may already be sliding the new button. This step further clarifies whether the user is pressing the new button.
[0185] If it is determined that the detection flag is a key press detection, it indicates that the user is indeed in the process of pressing the new key, and then step S607 is executed. If it is determined that the detection flag is not a key press detection, step S610 is executed.
[0186] As described in the content of step S602 above, step S606 can also be an optionally executed step.
[0187] S607. Determine whether an end key (P < P_c) event is generated.
[0188] Among them, if the pressure value P < P_c, it indicates that an end key event should be generated, that is, during the process of the user continuously inputting the pressing operation on the new key, the user pre-lifts the finger, resulting in a decrease in the input pressing pressure, which means that the user is about to complete the pressing operation on the new key.
[0189] If the new key subsystem determines that an end key (P < P_c) event is generated, step S608 is executed; otherwise, step S609 is executed.
[0190] S608. Execute 1. Report the Up event of the key press and 2. Clear the detection flag: invalid initial value.
[0191] Through step S607, the new key subsystem determines that the pressure value P of the pressing operation input by the user is < P_c, that is, the user starts to lift the finger during the process of pressing the new key, completing a complete pressing operation. Based on this, the new key subsystem reports the pressing Up event to the AP and clears the detection flag, setting it to an invalid initial value, or an invalid value for short.
[0192] In some embodiments, the pressing Up event reported by the new key subsystem to the AP includes the pressure value, absolute coordinates, and relative coordinates of the new key; it may also include a timestamp. In some other embodiments, the pressing Up event generated and reported by the new key subsystem may further include indication information, such as the identifier of the new key, for indicating the identity of the new key operated by the user. In some other embodiments, the pressing Down event and the pressing Up event reported by the new key subsystem may not include relative coordinates.
[0193] In some embodiments, the pressing Down event and the pressing Up event respectively include a timestamp. After the AP receives the pressing Down event and the pressing Up event of the key, it obtains the timestamps in the pressing Down event and the pressing Up event, and calculates the two timestamps as the duration of the user pressing the key. The AP can know whether the user long-presses the key based on this duration.
[0194] It should be noted that in scenarios where the long press operation of the new button and the shortcut function are related, the AP receives the Down event through step S604 and still needs to wait for the new button subsystem to report the Up event through step S608S for the newly received button event.
[0195] After receiving the Up press event, the AP (usually the WindowManagerService of the AP) can determine the duration of the pressed button based on the timestamps in the Down press and Up press events, and if the duration meets the conditions for a long press, it can activate the shortcut function based on the correspondence between the long press operation of the new button and the shortcut function.
[0196] In the correspondence between the long press operation and shortcut function of the new type of button, it also includes different shortcut functions corresponding to different long press operations of different buttons, or different shortcut functions corresponding to different positions of the button. In the scenario, the AP can also determine the identity of the new type of button pressed by the user based on the indication information in the Down and Up events, and determine the user's pressing position based on the absolute coordinates in the Down and Up events.
[0197] S609, Report continuous button press events.
[0198] In step S607, the novel button subsystem determines that the pressure value P of the user's input pressing operation is greater than or equal to P_c, indicating that the user is still continuously pressing the novel button, and then reports a continuous button press event to the AP. In some embodiments, the continuous button press event includes the pressure value of the novel button, its absolute coordinates, and its relative coordinates; it may also include a timestamp.
[0199] S610. Determine whether the pressure value P is greater than or equal to P_d.
[0200] The new button subsystem determines in step S602 that the pressure value P >= P_b and the detection flag is not the initial value, and in step S606 it determines that the detection flag is not a button detection, indicating that the user may be performing a sliding operation on the new button. Considering that users may habitually lightly rest their fingers on the button, the pressure value sensed by the new button can be kept within the sliding detection range when the user's finger is lightly resting on the button, i.e., pressure value P >= P_b; furthermore, the new button subsystem also sets the detection flag to sliding detection, meaning the detection flag is neither the initial value nor a button detection. However, the actual situation is that the user is not actually performing a sliding operation on the new button.
[0201] In this case, the new button subsystem receives a new button event again through step S601, which may mean that the user has actually pressed the new button. Based on this, the new button subsystem determines whether the user has pressed the new button through step S610.
[0202] If the new button subsystem determines that the pressure value P >= P_d, then proceed to step S611. If the new button subsystem determines that the pressure value P < P_d, then proceed to step S616.
[0203] S611, Determine T i -T i-1 Is it >= T? max .
[0204] Among them, T i The timestamp corresponding to the new key event received by the new key subsystem in step S601; T i-1 The new button subsystem uses the timestamp corresponding to the last button event received in step S601; T max This can be called the maximum interval time, which can be preset based on experience.
[0205] The new button subsystem determines the pressure value P >= P_d, and the time interval between the current button event and the previous button event is relatively long, exceeding T. max If the user has actually pressed the new button, then step S612 is executed. The new button subsystem determines that the pressure value P >= P_d, but determines that the time interval between the current button event and the previous button event does not exceed T. max Step S613 can be used to further determine whether the user is performing a sliding operation on the new type of button.
[0206] S612, Execute 1. Set the detection flag to: key detection; 2. Clear the relevant data of slide detection; 3. Report the key press Down event.
[0207] In some embodiments, the button press Down event reported by the novel button subsystem to the AP includes: the pressure value, absolute coordinates, and relative coordinates of the novel button; it may also include a timestamp.
[0208] S613, Determine D i -D init whether <D min .
[0209] Among them, D i The relative coordinates refer to the sliding distance corresponding to the new key event received by the new key subsystem in step S601; D initRefers to the initial sliding distance caused by a light touch when a user performs a swipe operation; D min This can be called the minimum travel distance, which can be preset based on experience.
[0210] The new button subsystem determines D i -D init <D min This indicates that the user made a slight relative slide during the pressing operation, rather than a sliding input operation. In this case, the new button subsystem also executes step S612 to treat this button event as a pressing event.
[0211] The new button subsystem determines D i -D init >=D min That is, the sliding stroke is not greater than D min If the value is small, it means that the user is likely to have performed a valid swipe operation. The new button subsystem can further determine this through step S614.
[0212] S614. Determine whether the pressure value P is greater than or equal to P_e.
[0213] Where P_e>=P_d, meaning P_e is a value greater than or equal to P_d. Setting P_e is to tolerate occasional situations where the pressure exceeds P_d during the swipe, increasing the tolerance for swipe event detection and improving the ease of user operation.
[0214] The new button subsystem determines that the pressure value P>=P_e, indicating that the user has pressed the button with a relatively large force. The new button subsystem also executes step S612 to process this button event as a press event.
[0215] When the new button subsystem determines that the pressure value P < P_e, it indicates that the event is a sliding event during the user's sliding operation, and then updates the event information by executing step S615.
[0216] S615, Execute step 1. Update the sum of pressure P_ sum +=P i 2. Update the number of reporting points N++; 3. Update the itinerary D=D i -D init 4. Record the time T of this report. i .
[0217] S616. Determine if the sliding event has ended (i.e., pressure value P). <P_a)。
[0218] As described in step S610 above, the new button subsystem determines in step S602 that the pressure value P >= P_b and the detection flag is not the initial value, and in step S606 determines that the detection flag is not a button detection, indicating that the user may be performing a sliding operation on the new button. Furthermore, the new button subsystem determines in step S610 that the pressure value is between [P_b, P_d), thus confirming that the user is indeed performing a sliding operation on the new button.
[0219] The new button subsystem can determine whether the sliding operation has ended through step S616. Of course, the end condition for the sliding operation is the pressure value P. <P_a。
[0220] The new button subsystem determines the end of the sliding event and then executes step S617; otherwise, it executes step S621.
[0221] S617. The relevant data for settlement record sliding detection is as follows:
[0222] 1. Record the end timestamp T of the sliding motion. i ; Slide end timestamp T i This refers to the timestamp corresponding to the key event received through step S601.
[0223] 2. Update the sum of stress P _sum +=P i ;
[0224] Among them, the new button subsystem records the pressure P _sum Based on this, the pressure values corresponding to the key events received in step S601 are added to obtain the updated pressure sum.
[0225] 3. Update the reporting count N++; whereby the new button subsystem increments the recorded reporting count by 1 to obtain the updated reporting count.
[0226] 4. Update itinerary D=D i -D init ; where D i Refers to the relative coordinates corresponding to the key event received in step S601, as described in step S605 above, where D... i and D init The difference is used as the updated itinerary D.
[0227] 5. Calculate the mean pressure P _avr =P _sum / N; N refers to the updated reporting count.
[0228] 6. Calculate the sliding speed V = D / (T) i -T0), where T0 refers to the sliding start timestamp.
[0229] In some embodiments, step S617 calculates the sliding stroke D, sliding speed V, and average pressure P of the user's input sliding operation on the novel key. _avr It can be based on the sliding stroke D, sliding speed V, and average pressure P. _avr Determine the validity of the sliding event. Steps S618 to S620 provide a method for determining the validity of the sliding event and a subsequent processing method.
[0230] S618. According to D, V and P _avr Determine if the swipe event is valid.
[0231] Among them, according to D, V and P _avr If the sliding event is deemed valid, proceed to step S620; otherwise, proceed to step S619.
[0232] In some embodiments, the validity determination process for a sliding event may employ D, V, and P. _avr Any one or any combination of the above can be used as a judgment criterion. For example, Figure 7 Demonstrated based on D, V and P _avr The process of determining the validity of a sliding event using three criteria.
[0233] The complete travel (or full travel) of a single sliding operation of the new type of button is recorded as D. _all The lower bound of the stroke of a single effective sliding operation is denoted as D. _low Typical sliding speeds, as measured by laboratory tests or large-scale data statistics, are V. _th The lower bound of the velocity for a single effective sliding operation is recorded as V. _low The upper limit of the speed is recorded as V. _hi The typical value of the average sliding pressure from laboratory tests or big data statistics is P. _avr_th .
[0234] like Figure 7 As shown, the new button subsystem is initially based on D, V, and P. _avr Calculate a score for the validity of the sliding event, which is used to indicate the validity of the sliding event.
[0235] S701. Determine if the sliding stroke D is <= D _all .
[0236] The maximum travel distance of the sliding operation is D. _all In theory, the calculated trip should not exceed D. _all If the sliding stroke D is greater than D... _all If this condition is met, it indicates an anomaly, and the data from this sliding detection is unreliable. Therefore, the new button subsystem determines that the sliding distance D > D0._all Then proceed to step S708. The new button subsystem determines that the sliding stroke D <= D _all Then proceed to step S702.
[0237] S702, Determine if the sliding stroke D > D _low .
[0238] The lower bound of the stroke for a single effective sliding operation is denoted as D. _low If the sliding stroke D is not greater than D _low This indicates that the sliding distance is too short. It's very likely a misclick and cannot be considered a valid slide. Therefore, the new button subsystem determines that the sliding distance D is not greater than D0. _low If so, proceed to step S708. The new button subsystem determines whether the sliding travel D>D _low Then proceed to step S703.
[0239] S703, Determine if the sliding speed V > V _low .
[0240] The lower bound of the velocity for a single effective sliding operation is recorded as V. _low If the sliding speed is too slow, it does not conform to the objective phenomenon of user input triggering shortcut functions. Therefore, the new button subsystem determines that the sliding speed V is not greater than V. _low If so, proceed to step S708. The new button subsystem determines that the sliding speed V>V _low Then proceed to step S704.
[0241] S704, Determine if the sliding speed V is... <V _hi .
[0242] The upper bound of the velocity of a single effective sliding operation is recorded as V. _hi If the sliding speed is too fast, it does not conform to the objective phenomenon of user input swiping to trigger shortcut functions. Therefore, the new button subsystem determines that the sliding speed V is not less than V. _hi Then, step S708 is executed. The new button subsystem determines the sliding speed V. <V _hi Then proceed to step S705.
[0243] It should be noted that the execution order of steps S701 to S704 is not limited to... Figure 7 As shown, the execution order can be either parallel or sequential.
[0244] S705. Calculate the sliding score, as follows:
[0245] 1. Calculate the trip score Score_D.
[0246] For the travel distance of a sliding operation, assuming the total score is 100 points, the score from the travel distance dimension is Score_D = 100 * D / D _all The closer the journey is to the full journey, the higher the score. Of course, considering that it is difficult to manually operate to the full journey, after scoring according to the formula, all scores with Score_D > a certain threshold (such as 85 points) can be set to 100 points, and those below the threshold can retain the original calculated score or be quantized into several levels (such as a total of 4 levels). There is no limitation here.
[0247] 2. Calculate the speed score Score_V.
[0248] 3. Calculate the stress score Score_P.
[0249] Regarding the sliding velocity V and the average sliding pressure P _avr They can all be compared to the typical value V. _th and P _avr_th Define several quantization levels. For example, with four levels of quantization, a score of 100 is given if the relative deviation from the typical value is within the neighborhood of deta1; 80 is given if the relative deviation is between the neighborhoods of deta1 and deta2; 60 is given if the relative deviation is between the neighborhoods of deta2 and deta3; and 20 is given if the relative deviation is outside the neighborhood of deta3. Based on this classification principle, the sliding velocity score Score_V and the sliding pressure score Score_P can be obtained.
[0250] 4. Calculate the weighted sum of the travel score, speed score, and pressure score to obtain the sliding score.
[0251] The formula for calculating the sliding score is: Score = c1*Score_D + c2*Score_V + c3*Score_P.
[0252] Here, c1, c2, and c3 are the weighting coefficients of the three scores, satisfying the constraint that c1+c2+c2=1, which ensures that the final score remains on a percentage scale.
[0253] S706. Determine if the sliding score Score > Score_th.
[0254] If the swipe score is lower than the threshold score_th, it indicates that the confidence level of this swipe is low, and it is likely a mis-touch operation. In this case, it is determined to be an invalid swipe in step S708. If the swipe score is higher than the threshold score_th, it is determined to be a valid swipe in step S707.
[0255] For a valid sliding event, the event information that needs to be reported may include the sliding score, the sliding event occurrence time T1 and D, and V and P. _avr This information facilitates the subsequent reporting, analysis, and parameter adjustment of relevant big data.
[0256] S707, Confirm that the sliding event is valid.
[0257] S708, Determine that the sliding event is invalid.
[0258] It should be noted that since the sliding detection is triggered by the pressure range, when the final settlement determines the validity of the sliding, all pressure values during the sliding process must conform to the sliding pressure range. Therefore, the sliding validity judgment algorithm no longer involves judging the upper limit (if the upper limit is exceeded, the button detection is triggered and the sliding detection is terminated) or the lower limit (if the lower limit is triggered, the sliding validity settlement judgment is started, which will also cause the current sliding detection to terminate) value of the sliding pressure.
[0259] It should also be noted that in scenarios where the validity of a sliding event is judged based on any one of the parameters D, V, and P_avr, the novel button subsystem can use the sliding travel as an evaluation indicator to judge the validity of the sliding event based on steps S701 and S702, and whether the score of the sliding travel is higher than a first threshold. Similarly, the novel button subsystem can use the sliding speed as an evaluation indicator to judge the validity of the sliding event based on steps S703 and S704, and whether the score of the sliding speed is higher than a second threshold. The novel button subsystem can use the sliding pressure as an evaluation indicator to judge the validity of the sliding event based on whether the score of the sliding pressure is higher than a third threshold. The first, second, and third thresholds can be set based on empirical values.
[0260] S619, Execute: 1. Clear the relevant data of the sliding detection; 2. Clear the detection flag: invalid initial value; 3. Ignore the invalid event to avoid accidental touch.
[0261] If the new button subsystem determines that a sliding event is invalid, it can clear the recorded sliding detection data and clear the detection flag to set it to an invalid initial value. It can also ignore the invalid sliding event and not report it to the AP to avoid accidental touches.
[0262] S620, Execute 1. Map to sliding event; 2. Report sliding event; 3. Clean up relevant data of sliding detection; 4. Clear detection flag: invalid initial value.
[0263] If the new button subsystem determines that a sliding event is valid, it can generate a sliding event based on the relevant sliding detection data and then report the sliding event to the AP. It can also clear the recorded sliding detection data and clear the detection flag, setting it to an invalid initial value.
[0264] In some embodiments, the sliding event reported by the novel button subsystem may include at least: the absolute coordinates corresponding to the sliding start timestamp, the sliding distance, and the average pressure. After the novel button subsystem reports the sliding event to the AP, the AP can determine the starting point of the sliding operation input by the user based on the absolute coordinates corresponding to the sliding start timestamp, and thus determine whether the sliding operation input by the user is an upward or downward swipe. In other embodiments, the sliding event reported by the novel button subsystem may also include the sliding speed.
[0265] In other embodiments, the swipe event reported by the novel button subsystem may also include indication information, such as an identifier for the novel button, to indicate the identity of the novel button operated by the user. After the novel button subsystem reports the swipe event to the AP, the AP can determine, based on the indication information, which button the user input the swipe operation on.
[0266] It should be noted that AP's WindowManagerService can determine the identity of the new type of button pressed by the user based on the above content. After the swipe up or down operation, the shortcut function can be launched based on the correspondence between the operation of the new type of button and the shortcut function.
[0267] S621, Determine T i -T i-1 Is it >= T? max .
[0268] The new key subsystem determines in step S616 that the sliding event has not ended, indicating that the user may be continuously inputting a sliding operation on the new key. As described in step S610, if the user habitually keeps their finger lightly on the key, the pressure range can be kept within the sliding detection range, but the user is not actually inputting a sliding operation. In this case, if the user starts inputting a sliding operation, the new key subsystem obtains a new key event in step S601. This new key event is a sliding event. The new key subsystem then determines in step S621 that the current sliding event exceeds T in time relative to the previous sliding event. max If the interval between the user's input swipe operation is too long, then step S622 is executed to clear the previously saved swipe event information and use the current swipe event as the new starting point for swipe detection.
[0269] Considering that the sliding operation is a continuous and rapid action, the new button subsystem determines in step S621 that the current sliding event does not exceed T in time compared to the previous sliding event. max This indicates that the user is in the process of sliding an input on the new type of button, and the new button subsystem then executes step S623.
[0270] S622, Execute 1. Reset the sliding start timestamp T0 = T i 2. Reset the sum of pressures P_ sum =P i 3. Reset reporting count N = 1; 4. Reset absolute coordinate Y; 5. Reset initial travel distance D init 6. Clean up other data in the sliding record.
[0271] The new button subsystem will use the timestamp T corresponding to the new button event received this time. i As the start timestamp of a swipe event, and the sum of reset pressures is the pressure value P corresponding to the new button event received this time. i The number of reporting attempts N = 1, the absolute coordinates are reset to the absolute coordinates Y corresponding to the newly received key event, and the initialization form is reset to the travel distance D corresponding to the newly received key event. init .
[0272] The new button subsystem also cleans up other data recorded for slide detection, which can refer to: slide detection related data excluding: initial timestamp T0, and the sum of pressure P. _sum Number of reporting points N, absolute coordinates Y, and initial travel distance D init Data on key events reported in the past, other than those mentioned above.
[0273] S623, Execute step 1. Update the sum of pressure P_ sum +=P i 2. Update the number of reporting points N++; 3. Update the itinerary D=D i -D init 4. Record the time T of this report. i .
[0274] Among them, the new button subsystem records the pressure P _sum The pressure value P corresponding to the newly received key event is accumulated based on this. i The updated sum of pressure is obtained. The new button subsystem increments the recorded number of reported points by 1 to obtain the updated number of reported points. D i This refers to the relative coordinates corresponding to the newly received key event, as described in step S605 above, where D... i and D initThe difference is used as the updated itinerary D.
[0275] It should be noted that after the new button subsystem executes steps S604, S605, S608, S609, S604, S612, S615, S619, S620, S622 and S623, it returns to execute step S601 to wait for the next new button event.
[0276] The method for enabling shortcut functions provided in this application embodiment can be applied to electronic devices such as mobile phones, tablets, personal digital assistants (PDAs), desktop, laptop, and notebook computers, ultra-mobile personal computers (UMPCs), handheld computers, and netbooks.
[0277] Taking mobile phones as an example, Figure 8 This is an example of the composition of an electronic device provided in an embodiment of this application. For example... Figure 8 As shown, the electronic device 100 may include a processor 110, an internal memory 120, a display screen 130, and a new type of button 140, etc.
[0278] It should be understood that, for the purpose of facilitating the understanding of the embodiments of this application, Figure 8 The electronic device 100 shown only includes some components related to the method for activating the shortcut function provided in this application embodiment. The electronic device provided in this application embodiment may include more than Figure 8 The electronic device shown has 100 or more or fewer components. That is to say, Figure 8 The electronic device 100 shown does not constitute a specific limitation on the electronic device provided in the embodiments of this application.
[0279] Processor 110 may include one or more processing units, such as coprocessor 110A, application processor (AP) 110B, graphics processing unit (GPU), etc. Processor 110 may also include memory for storing instructions and data.
[0280] Internal memory 120 can be used to store computer executable program code, including instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 120. In some embodiments, internal memory 120 stores instructions for methods of activating shortcut functions. Processor 110 can execute instructions stored in internal memory 120 to enable electronic device to perform a service quickly in response to a user's pressing or sliding operation of novel button 140, such as quickly launching an application.
[0281] Electronic device 100 implements display functions through GPU, display screen 130, and application processor.
[0282] The new button 140 typically includes a power button and volume buttons. The new button 140 receives a user's press or slide operation and transmits the corresponding electrical signal to the coprocessor 110A. The coprocessor 110A and the application processor 110B can cooperate to quickly execute a certain service in response to the user's press or slide operation on the new button 140, such as quickly launching an application.
[0283] Another embodiment of this application provides a computer-readable storage medium storing instructions that, when executed on a computer or processor, cause the computer or processor to perform one or more steps of any of the above methods.
[0284] Computer-readable storage media can be non-transitory computer-readable storage media, such as read-only memory (ROM), random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage devices.
[0285] Another embodiment of this application provides a computer program product containing instructions. When the computer program product is run on a computer or processor, it causes the computer or processor to perform one or more steps of any of the methods described above.
Claims
1. A method for activating shortcut functions, characterized in that, The method is applied to an electronic device, which includes a first button that supports the detection of user sliding operations and pressing operations of varying force. The first button includes a deformable elastic component that generates a voltage when the user presses the first button or performs a sliding operation on it. The first button is used to convert the voltage into an electrical signal to obtain a button recognition result. Receives the user's press operation on the first button; In response to the user's pressing operation on the first button, a pressing event is generated based on the button detection information of the first button, wherein the button detection information of the first button is obtained based on the button recognition result; If it is determined that the pressure value included in the press event is greater than or equal to P_b, the detection flag is an initial value, and if it is determined that the pressure value included in the press event is greater than or equal to a first value (P_d), then based on the press event, the first function of the application installed on the electronic device is run; wherein P_b is less than the first value; If the pressure value of the press event is greater than or equal to P_b, the detection flag is not the initial value and is not a key detection, and the pressure value of the press event is greater than or equal to the first value (P_d), the difference between the timestamp corresponding to the press event and the timestamp corresponding to the last received key event is less than the maximum time interval, the difference between the sliding distance corresponding to the press event and Dinit is greater than or equal to the minimum sliding distance, and the pressure value of the press event is less than P_e to indicate that the user inputs a sliding operation on the first key surface with a force exceeding the sliding force, then the press event is determined to be a sliding event, and the event information of the sliding event is updated; Dinit refers to the sliding caused by a light touch at the beginning of the user's sliding operation. The sliding event is determined to have a travel distance greater than or equal to the first value. The event information of the sliding event is updated until the sliding event is determined to have ended. If the event information of the sliding event satisfies any one or any combination of the following three conditions, the second function of the application installed on the electronic device is run based on the sliding event. The first function and the second function may be the same or different. The three conditions include: the sliding travel distance of the sliding event is less than the full travel distance of the sliding operation and greater than the minimum travel distance of the sliding operation; the score of the sliding travel distance of the sliding event is higher than a first threshold; the sliding speed of the sliding event is greater than the lower speed limit of the sliding operation and less than the upper speed limit of the sliding operation; the score of the sliding speed of the sliding event is higher than a second threshold; and the score of the sliding pressure of the sliding event is higher than a third threshold. If it is determined that the pressure value included in the press event is greater than or equal to P_b, the detection flag is not the initial value and is not the key detection, and it is also determined that the pressure value included in the press event is greater than or equal to the first value, and the difference between the timestamp corresponding to the press event and the timestamp corresponding to the last received key event is greater than or equal to the maximum time interval to indicate that the user has pressed the first key after leaving their finger on the first key, then based on the press event, the first function of the application installed on the electronic device is run; If the pressure value of the press event is determined to be greater than or equal to P_b, the detection flag is not the initial value and is not the key detection, and the pressure value of the press event is determined to be greater than or equal to the first value, the difference between the timestamp corresponding to the press event and the timestamp corresponding to the last received key event is less than the maximum time interval, and the difference between the sliding distance corresponding to the press event and Dinit is less than the minimum travel distance to indicate that the user's press operation on the first key input has a slight relative sliding, then based on the press event, the first function of the application installed on the electronic device is run; If the pressure value of the press event is determined to be greater than or equal to P_b, the detection flag is not the initial value and is not the key detection, and the pressure value of the press event is determined to be greater than or equal to the first value, the difference between the timestamp corresponding to the press event and the timestamp corresponding to the last received key event is less than the maximum time interval, the difference between the sliding distance corresponding to the press event and Dinit is greater than or equal to the minimum travel distance, and the pressure value of the press event is greater than or equal to P_e to indicate that the user pressed the first key with a large force, resulting in relative sliding, then based on the press event, the first function of the application installed on the electronic device is run; Receive the user's sliding operation on the surface of the first button; In response to a user's sliding operation on the surface of the first button, a sliding event is generated based on the button detection information of the first button, wherein the button detection information of the first button is obtained based on the button recognition result; If the event information of the sliding event satisfies any one or any combination of the following three conditions, based on the sliding event, the second function of the application installed on the electronic device is run, wherein the first function and the second function are the same or different; Among them, the three conditions include: the sliding distance of the sliding event is less than the full distance of the sliding operation and greater than the minimum distance of the sliding operation, and the score of the sliding distance of the sliding event is higher than the first threshold. The sliding speed of the sliding event is greater than the lower bound of the sliding operation speed and less than the upper bound of the sliding operation speed, and the score of the sliding speed of the sliding event is higher than the second threshold. The score of the sliding pressure of the sliding event is higher than the third threshold.
2. The method for activating shortcut functions according to claim 1, characterized in that, The receiving of the user's pressing operation on the first button includes: receiving the user's pressing operation on the first button. The first function of running the application installed on the electronic device based on the press event includes: running the first function of the application installed on the electronic device based on the press event corresponding to the user's hard press operation on the first button; The method further includes: Receive a long press operation from the user on the first button; In response to the user's long press operation on the first button, a third function of the application installed on the electronic device is executed, wherein the first function and the third function may be the same or different.
3. The method for activating shortcut functions according to claim 1, characterized in that, The receiving of the user's pressing operation on the first button includes: receiving the user's pressing operation on the first position of the first button; The step of running the first function of the application installed on the electronic device based on the press event includes: running the first function of the application installed on the electronic device based on the press event corresponding to the user's press operation on the first position of the first button; The method further includes: Receives a user's press operation on the second position of the first button; In response to the user pressing the second position of the first button, a fourth function of the application installed on the electronic device is executed, wherein the first function and the fourth function may be the same as or different from each other.
4. The method for activating a shortcut function according to any one of claims 1 to 3, characterized in that, The receiving of the user's sliding operation on the surface of the first button includes: receiving the user's sliding operation on the surface of the first button along a first direction; The second function of running the application installed on the electronic device in response to the user's sliding operation on the first button surface includes: running the second function of the application installed on the electronic device in response to the user's sliding operation on the first button surface along a first direction. The method further includes: Receives a sliding operation from the user on the surface of the first button along a second direction; In response to the user's sliding operation on the surface of the first button along a second direction, a fifth function of the application installed on the electronic device is executed, wherein the first function and the fifth function may be the same as or different from each other.
5. The method for activating shortcut functions according to claim 1, characterized in that, In response to the user's pressing operation on the first button, a pressing event is generated, including: in response to the user's pressing operation on the first button, a pressing down event and a pressing up event are generated sequentially; The first function of running the application installed on the electronic device based on the press event includes: running the first function of the application installed on the electronic device based on the press-down event and the press-up event.
6. The method for activating shortcut functions according to claim 5, characterized in that, Before running the first function of the application installed on the electronic device based on the press-down event and the press-up event, the method further includes: The pressure value of the pressing event is determined to be greater than a first value, and the pressure value of the releasing event is determined to be less than a second value, wherein the second value is less than the first value.
7. The method for activating shortcut functions according to claim 6, characterized in that, The first function of the application installed on the electronic device, based on the press-down event and the press-up event, includes: When it is determined that the pressure value of the pressed event meets the pressing force requirement of the first button, the first function of the application installed on the electronic device is executed based on the pressed event and the released event.
8. The method for activating shortcut functions according to claim 6, characterized in that, The first function of the application installed on the electronic device, based on the press-down event and the press-up event, includes: The duration of the pressing event is obtained based on the timestamp of the pressing event and the timestamp of the pressing event. When it is determined that the pressure value of the pressing event meets the pressing force requirement of the first button, and the duration of the pressing event meets the pressing duration requirement of the first button, the first function of the application installed on the electronic device is run based on the pressing event and the releasing event.
9. The method for activating shortcut functions according to claim 1, characterized in that, The step of generating a sliding event in response to the user's sliding operation on the surface of the first button, based on the button detection information of the first button, includes: In response to the user's sliding operation on the first button surface, the sliding distance and starting point coordinates of the sliding operation are obtained; A sliding event is generated based on the sliding distance and starting point coordinates of the sliding operation.
10. The method for activating shortcut functions according to claim 1, characterized in that, When the event information of the determined key event meets the three conditions, the score of the sliding distance of the sliding event is higher than the first threshold, the score of the sliding speed of the sliding event is higher than the second threshold, and the score of the sliding pressure of the sliding event is higher than the third threshold, including: The weighted sum of the scores for the sliding stroke, the sliding speed, and the sliding pressure of the sliding event is greater than the sliding threshold.
11. The method for activating shortcut functions according to claim 9, characterized in that, Before obtaining the sliding distance and starting point coordinates of the sliding operation, the method further includes: Based on the sliding event corresponding to the sliding operation, it is determined that the sliding operation meets the sliding stop condition.
12. The method for activating shortcut functions according to claim 11, characterized in that, Also includes: Based on the sliding event corresponding to the sliding operation, if it is determined that the sliding operation does not meet the sliding stop condition, the parameters in the sliding event corresponding to the sliding operation are recorded, or the parameters in the recorded sliding event corresponding to the sliding operation are reset.
13. The method for activating a shortcut function according to any one of claims 1 to 12, characterized in that, The first button is a volume button or a power button of the electronic device, or a button other than the volume button and the power button of the electronic device.
14. An electronic device, characterized in that, include: One or more processors, memory, and a first button; The memory and the first button are coupled to one or more of the processors. The memory is used to store a computer program, the computer program including computer instructions. When the one or more processors execute the computer instructions, the electronic device performs the method of activating a shortcut function as described in any one of claims 1 to 13.
15. A computer-readable storage medium, characterized in that, Used to store computer programs, which, when executed, are specifically used to implement the method for enabling shortcut functions as described in any one of claims 1 to 13.
16. A computer program product, characterized in that, When a computer program product is run on a computer, it causes the computer to perform the method for activating shortcut functions as described in any one of claims 1 to 13.
Citation Information
Patent Citations
Terminal button achieving method, device and mobile terminal
CN104754092A
Operation method and apparatus based on multi-functional key of mobile terminal
CN104991728A
Multi-level key control method and device and electronic equipment
CN107544683A
Method and apparatus of integrating slide and touch on an input device
WO2019246295A1