Display control method and device, electronic equipment and storage medium
By receiving instructions from the remote control pen and performing corresponding operations according to the application type, the problem that the Bluetooth remote control cannot distinguish between application scenarios and functions and conflicts with finger touch is solved, and a more intelligent and rich remote control function is achieved.
Patent Information
- Application Number
- CN202310953286.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-31
- Publication Date
- 2025-02-14
AI Technical Summary
The Bluetooth remote control cannot distinguish the application scenarios of the terminal device, and the function of the physical buttons conflicts with the finger touch operation, resulting in the page turning function being unable to be realized.
By receiving instructions from the remote control pen, if the application type is the first type, a sliding operation is performed to control the display interface, if the second type is the second type, a page turning operation is performed, and the sliding parameters are determined based on the length and width of the display screen.
The remote control function is implemented to be suitable for more applications, enriching the functions of the remote control pen, making its control more intelligent and targeted, and avoiding conflicts with finger touch operations.
Smart Images

Figure CN119440274A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a display control method, device, electronic device and storage medium. Background Art
[0002] With the development of terminal technology, the accessories of terminal devices are becoming more and more diversified. Among them, the Bluetooth remote control is a remote control input device that is connected to the terminal device via Bluetooth. The Bluetooth remote control usually has up and down physical buttons, whose function is to turn up and down the current display content of the terminal device, such as turning up and down the pages of a PPT, so that the user can control the page without touching the terminal device. However, the application scenarios of the up and down physical buttons on the Bluetooth remote control in the terminal device have certain limitations, and the remote control cannot distinguish the current application scenario of the terminal device. Moreover, when there is a finger touch operation on the display screen of the terminal device at the same time, the function of the physical button will conflict with the touch operation and the page turning function cannot be realized. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides a display control method, device, electronic device and storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, a display control method is provided, the method comprising:
[0005] Receiving a first instruction from the remote control pen;
[0006] If the type of the application program running in the foreground of the electronic device is the first category, a first operation is performed based on the first instruction, and the first operation is a sliding operation on the display interface of the electronic device.
[0007] In an exemplary embodiment, before performing the first operation, the method further includes:
[0008] A sliding direction of the sliding operation is determined according to the first instruction.
[0009] In an exemplary embodiment, before performing the first operation, the method further includes:
[0010] According to the length and width of the display screen of the electronic device, a sliding parameter of the sliding operation is determined, and the sliding parameter includes a sliding starting point position and a sliding end point position.
[0011] In an exemplary embodiment, determining a sliding parameter of the sliding operation includes:
[0012] The sliding parameters of the application program running in the foreground of the electronic device are matched from the mapping relationship between the application program and the sliding parameters.
[0013] In an exemplary embodiment, the method further comprises:
[0014] receiving a second instruction from the display screen of the electronic device;
[0015] Based on the first instruction and the second instruction, a second operation is performed, where the second operation is a screen touch operation on the display interface of the electronic device.
[0016] In an exemplary embodiment, performing the second operation based on the first instruction and the second instruction includes:
[0017] Acquire a plurality of first input events corresponding to the first instruction and a plurality of second input events corresponding to the second instruction;
[0018] Arrange the plurality of first input events and the plurality of second input events in a queue in chronological order;
[0019] Based on the queue, the second operation is performed.
[0020] In an exemplary embodiment, the acquiring a plurality of first input events corresponding to the first instruction includes:
[0021] Monitoring a physical key event corresponding to the first instruction;
[0022] Intercepting the physical key event;
[0023] The plurality of first input events are generated at first time intervals.
[0024] In an exemplary embodiment, the method further comprises:
[0025] If the type of the application program running in the foreground of the electronic device is the second type, a third operation is performed based on the first instruction, and the third operation is a page turning operation on the display interface of the electronic device.
[0026] In an exemplary embodiment, the method further comprises:
[0027] Obtaining an identification of an application running in the foreground of the electronic device;
[0028] The type of application corresponding to the identifier of the application running in the foreground is matched from the mapping relationship between the pre-configured application identifier and the type of application.
[0029] According to a second aspect of an embodiment of the present disclosure, a display control device is provided, the device comprising:
[0030] A receiver configured to receive a first instruction of the remote control pen;
[0031] The processor is configured to execute a first operation based on the first instruction if the type of the application running in the foreground of the electronic device is the first category, where the first operation is a sliding operation on the display interface of the electronic device.
[0032] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0033] processor;
[0034] a memory for storing processor-executable instructions;
[0035] Wherein, the processor is configured to execute the display control method as described in the first aspect of the embodiment of the present disclosure.
[0036] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the display control method as described in the first aspect of the embodiment of the present disclosure.
[0037] The above method disclosed in the present invention has the following beneficial effects: by converting remote control commands into sliding operations to control the display interface of the electronic device, the remote control function is applicable to more applications, the functions of the remote control pen can be enriched, and according to the usage scenario of the electronic device, the first operation corresponding to the first command is determined, so that the control function of the remote control pen is more targeted and the display control of the electronic device by the remote control pen is more intelligent.
[0038] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0040] Figure 1 is a flow chart of a display control method according to an exemplary embodiment;
[0041] Figure 2 is a flow chart of a display control method according to an exemplary embodiment;
[0042] Figure 3 is a schematic diagram of a stylus according to an exemplary embodiment;
[0043] Figure 4 is a schematic diagram of a stylus according to an exemplary embodiment;
[0044] Figure 5 is a schematic diagram of sliding parameters according to an exemplary embodiment;
[0045] Figure 6 is a flow chart of a display control method according to an exemplary embodiment;
[0046] Figure 7 is a flow chart of a display control method according to an exemplary embodiment;
[0047] Figure 8 is a flow chart of a display control method according to an exemplary embodiment;
[0048] Fig. 9 is a flow chart of a display control method according to an exemplary embodiment;
[0049] Fig.10 is a flow chart of a display control method according to an exemplary embodiment;
[0050] Fig.11 is a block diagram of a display control device according to an exemplary embodiment;
[0051] Fig.12 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0052] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0053] In an exemplary embodiment of the present disclosure, in order to solve the technical problems existing in the Bluetooth remote control pen in the related art, a display control method is provided, which receives a first instruction of the remote control pen, and if the type of the application running in the foreground of the electronic device is the first type, based on the first instruction, performs a first operation, wherein the first operation is a sliding operation acting on the display interface of the electronic device. The method controls the display interface of the electronic device by converting the remote control instruction into a sliding operation, so that the remote control function is applicable to more applications, and the functions of the remote control pen can be enriched. In addition, according to the use scenario of the electronic device, the first operation corresponding to the first instruction is determined, so that the control function of the remote control pen is more targeted, and the display control of the electronic device by the remote control pen is more intelligent.
[0054] In an exemplary embodiment of the present disclosure, a display control method is provided. Figure 1 is a flow chart of a display control method according to an exemplary embodiment. Figure 1 As shown, the following steps are included:
[0055] Step S101, receiving a first instruction from a remote control pen.
[0056] The disclosed embodiments are applied to electronic devices, which may be terminal devices such as smart phones, large-screen or folding-screen mobile phones, tablet devices, etc. The remote control pen is a stylus that can be paired and connected with an electronic device, such as a stylus that is matched with a tablet device. The electronic device and the remote control pen are connected wirelessly, for example, via a short-range communication method such as Bluetooth. In some special scenarios, the electronic device can also be connected to the remote control pen by wire. The remote control pen can remotely control the electronic device, which is suitable for normal use or electronic device screen projection and other scenarios.
[0057] The first instruction may be a physical button instruction. For example, a physical button and a sensor corresponding to the physical button are provided on the body of the remote control pen. The position of the physical button may be set according to actual needs. When the physical button is pressed, the corresponding sensor receives the first instruction and sends it to the electronic device via a wireless connection. Then, the electronic device receives the first instruction.
[0058] The first instruction can also be a click instruction, a sliding instruction, or a touch instruction for a preset area on the pen body of the remote control pen. For example, a sensor is added under the identification area in the pen body of the remote control pen. The position of the identification area can be set according to actual needs. When you double-click, slide, or long press in the identification area, the sensor receives the first instruction and sends it to the electronic device via a wireless connection, and the electronic device receives the first instruction.
[0059] Step S102: If the type of the application program running in the foreground of the electronic device is the first type, a first operation is performed based on a first instruction, and the first operation is a sliding operation on the display interface of the electronic device.
[0060] Since different applications have different operational requirements, the first instruction performs different operations in different applications. According to the different operations performed, the applications in the electronic device are classified, and applications that perform the same operations are classified into one category. For example, applications that need to perform sliding operations are classified into one category, and applications that need to perform click operations are classified into another category.
[0061] The types of commonly used applications can be pre-configured in the electronic device. When the first instruction corresponds to the first operation, that is, when a sliding operation is performed on the display interface of the electronic device, the type of application with sliding operation requirements is determined as the first category. For example, an application with a short video function requires sliding up and down to switch short videos. Another example is a forum application with long articles, which requires sliding up and down to scroll the page. The above applications are all classified as the first category. An editing page for application types can also be provided. In the editing page, users can set the types of installed applications by themselves. When the type of a newly installed application in an electronic device is not set, its type can be set to a default type, and the default type is the first category.
[0062] In one example, an identifier of an application running in the foreground of an electronic device is obtained, and the type of application corresponding to the identifier of the application running in the foreground is matched from a mapping relationship between pre-configured application identifiers and application types.
[0063] The first operation is a sliding operation pre-set in the electronic device. The first operation can be an upward sliding operation on the display interface of the electronic device, or a downward sliding operation, a left sliding operation, a right sliding operation, or any other sliding operation. The first operation can be a fixed sliding operation, for example, for all applications in the first category of applications, an upward sliding operation is performed based on the first instruction; the first operation can also be a sliding operation set differently according to different applications, for example, for application A in the first category of applications, an upward sliding operation is performed based on the first instruction, and for application B in the first category of applications, a left sliding operation is performed based on the first instruction.
[0064] In an exemplary embodiment of the present disclosure, if the type of application running in the foreground of the electronic device is the first type, a sliding operation acting on the display interface of the electronic device is performed based on the first instruction, and the display interface of the electronic device is controlled by converting the remote control instruction into a sliding operation, so that the remote control function is applicable to more applications, and the functions of the remote control pen can be enriched. In addition, according to the use scenario of the electronic device, the operation corresponding to the first instruction is determined, so that the control function of the remote control pen is more targeted, and the display control of the electronic device by the remote control pen is more intelligent. In addition, when the remote control pen is a stylus pen that is matched with a tablet device, the solution in this embodiment can be used as an expansion solution of the original button function of the stylus, so there is no need to separately configure a remote control accessory such as a Bluetooth remote controller for the electronic device.
[0065] In an exemplary embodiment of the present disclosure, a display control method is provided. Figure 2 is a flow chart of a display control method according to an exemplary embodiment. Figure 2 As shown, the following steps are included:
[0066] Step S201, receiving a first instruction from a remote control pen.
[0067] The content of step S201 is the same as that of step S101. The implementation method can refer to the implementation method of step S101, which will not be repeated here.
[0068] Step S202: If the type of the application program running in the foreground of the electronic device is the first type, determine the sliding direction of the sliding operation according to the first instruction.
[0069] When the first instruction is a physical button instruction, different physical buttons are used to indicate different sliding directions. For example, at least two physical buttons for performing sliding operations in different directions and corresponding sensors are provided on the body of the remote control pen, and the positions of the physical buttons can be set according to actual needs.
[0070] In one example, Figure 3 is a schematic diagram of a stylus according to an exemplary embodiment. Figure 3 As shown, the stylus includes two physical buttons, namely physical button 301 and physical button 302, wherein physical button 301 is used to perform an upward sliding operation, and physical button 302 is used to perform a downward sliding operation. The physical buttons 301 and 302 can be marked with an upper and a lower inverted triangle, respectively, or other marks for indicating the sliding direction.
[0071] In another example, Figure 4 is a schematic diagram of a stylus according to an exemplary embodiment. Figure 4 As shown, the stylus includes three physical buttons, namely physical button 401, physical button 402 and physical button 403, wherein physical button 401 is used to perform an upward sliding operation, physical button 402 is used to perform a downward sliding operation, and physical button 403 is used to perform a remote control operation, such as a virtual laser function, a screenshot function or a shorthand function. The physical buttons 401 and 402 can be marked with upper and lower inverted triangles, respectively, or other marks for indicating the sliding direction, and the physical button 403 can be marked with a circular mark, or other marks for indicating a button.
[0072] The first instruction is a click instruction, a slide instruction, or a touch instruction for a preset area. For example, a sensor is added below the identification area in the pen body of the remote control pen. The position of the identification area can be set according to actual needs. A double-click operation in the identification area represents an upward slide operation, and a triple-click operation represents a downward slide operation. Alternatively, an upward slide operation in the identification area represents an upward slide operation, and a downward slide operation represents a downward slide operation.
[0073] The mapping relationship between the first instruction and the sliding direction may be pre-set in the electronic device or may be set by the user in a related setting interface. All applications in the first category of applications may use the same mapping relationship or different mapping relationships. For example, in a short video application, the up key indicates an upward sliding operation, and in an e-book application, the up key indicates a left sliding operation.
[0074] Determining the sliding direction of the sliding operation according to the first instruction can provide the user with obvious action feedback and also enrich the applicable scenarios of the sliding operation.
[0075] Step S203: determining sliding parameters of the sliding operation according to the length and width of the display screen of the electronic device, where the sliding parameters include a sliding start position and a sliding end position.
[0076] A coordinate system is established in the display screen of the electronic device, and the sliding start position and the sliding end position are determined by means of coordinates, and the coordinates of the sliding start position and the sliding end position are both percentages of the length and width of the display screen. Figure 5 is a schematic diagram of sliding parameters according to an exemplary embodiment. Figure 5 As shown, a coordinate system is established with the upper left corner of the display screen as the origin, the length of the display screen is w, the width is h, the coordinates of the sliding starting point are (65% w, 25% h), i.e. 65% of the length and 25% of the width; the coordinates of the sliding end point are (65% w, 75% h), i.e. 65% of the length and 75% of the width.
[0077] The percentages of the length and width of the display screen occupied by the coordinates of the sliding start position and the sliding end position are preset values and can be set according to actual needs. The above percentages corresponding to all applications in the first category of applications can be the same or different.
[0078] The sliding parameters are dynamically determined according to the length and width of the display screen of the electronic device, so that the solution is adaptable to display screens of various resolutions, which can improve the adaptability of the solution to electronic devices of different models and avoid the failure of sliding operations due to incompatible sliding parameters.
[0079] In some possible implementations, the sliding parameters of the application running in the foreground of the electronic device are matched from the mapping relationship between the application and the sliding parameters.
[0080] When different applications perform sliding operations, the sliding positions may be different. For example, the sliding position of application a needs to be close to the left side of the display screen to be effective, and the sliding position of application b needs to be close to the right side of the display screen to be effective. Therefore, the mapping relationship between the application and the sliding parameter can be pre-set in the electronic device, and after confirming the application running in the foreground of the electronic device, the corresponding sliding parameter can be matched from the mapping relationship; a sliding parameter boundary interface can also be provided, and the user can set the corresponding sliding parameters for different applications.
[0081] Different applications correspond to different sliding parameters, which can improve the adaptability of the solution to different applications.
[0082] Step S204: executing a first operation, where the first operation is a sliding operation on a display interface of the electronic device.
[0083] The first operation may be performed according to the sliding direction, may be performed according to the sliding parameter, or may be performed according to both the sliding direction and the sliding parameter.
[0084] It should be noted that, in the exemplary embodiment of the present disclosure, determining the sliding direction according to the first instruction in step S202 and step S203 are optional steps, and either or both of them may be executed.
[0085] In an exemplary embodiment of the present disclosure, a display control method is provided. Figure 6 is a flow chart of a display control method according to an exemplary embodiment. Figure 6 As shown, the following steps are included:
[0086] Step S601, receiving a first instruction from a remote control pen.
[0087] The content of step S601 is the same as that of step S101. The implementation method can refer to the implementation method of step S101, which will not be repeated here.
[0088] Step S602: If the type of the application program running in the foreground of the electronic device is the first type, a second instruction is received from the display screen of the electronic device.
[0089] The second instruction is a screen touch operation on the display screen of the electronic device, such as single-finger operations such as screen clicking, screen sliding, and screen long pressing, or two-finger operations such as screen scrolling, screen pinching, and screen zooming.
[0090] Step S603: Based on the first instruction and the second instruction, a second operation is performed, where the second operation is a screen touch operation on the display interface of the electronic device.
[0091] The acquisition time of the first instruction and the second instruction are recorded respectively, the first instruction and the second instruction are synthesized in chronological order, the first instruction is added to the input event corresponding to the second instruction, and the application running in the foreground performs the screen touch operation according to the synthesized input event. The screen touch operation is the operation corresponding to the screen touch instruction, including the operation corresponding to the screen click instruction, the operation corresponding to the screen slide instruction, etc.
[0092] For example, the first operation corresponding to the first instruction is an upward sliding operation. In chronological order, the input event of the second instruction received at the first moment is a single-finger upward sliding of the screen, the input event of the first instruction received at the second moment is an upward sliding operation of the first operation, and the input event of the second instruction received at the third moment is a single-finger upward sliding of the screen. After the first instruction and the second instruction are synthesized, the first finger upward sliding of the screen, the second finger upward sliding operation, and the third finger upward sliding of the screen are obtained. The screen touch instruction received by the application running in the foreground of the electronic device is a three-finger upward sliding, and the screen touch operation corresponding to the three-finger upward sliding is executed. Among them, the screen touch operation is determined by the application, and the screen touch operation corresponding to the synthesized screen touch instruction is determined from the mapping relationship between the screen touch instruction and the screen touch operation pre-configured by the application.
[0093] It should be noted that when the second operation is performed according to the first instruction and the second instruction, one of the first instruction or the second instruction may be ignored, and only the screen touch operation corresponding to the instruction that is not ignored is performed.
[0094] In an exemplary embodiment of the present disclosure, executing the second operation according to the first instruction and the second instruction can take into account both the sliding operation converted by the remote control instruction of the remote control pen and the touch operation of the finger, avoiding conflicts between the two and causing one of them to fail, thereby improving the user experience.
[0095] In an exemplary embodiment of the present disclosure, a display control method is provided. Figure 7 is a flow chart of a display control method according to an exemplary embodiment. Figure 7 As shown, the following steps are included:
[0096] Step S701, monitoring a physical key event corresponding to a first instruction.
[0097] When the first instruction is a physical key instruction, for example Figure 3In the physical key 301 and the physical key 302, the physical key event corresponding to the first instruction is a click operation on the physical key. When the physical key on the remote control pen is pressed, the electronic device receives the physical key event through the wireless connection, and monitors the physical key event through the InputReader module at the framework layer (i.e., the framwork layer) of the electronic device, and passes the monitored physical key event to the InputDispatcher module, which distributes the physical key event.
[0098] Step S702, intercepting a physical key event.
[0099] When distributing physical key events, the InputDispatcher module also requests the PhoneWindowManager module to intercept the physical key events. After intercepting the physical key events, the PhoneWindowManager module forwards them to the MiuiRemoteManager-java module and requests it to determine whether the physical key events need to be processed.
[0100] Step S703: if the type of the application program running in the foreground of the electronic device is the first type, a plurality of first input events are generated at a first time interval.
[0101] The MiuiRemoteManager-java module determines whether the type of the application running in the foreground is the first type. If so, the MiuiRemoteManager-native module is called to generate multiple first input events corresponding to the first instruction at a first time interval. The first time interval is an empirical value, for example, 8 milliseconds. When generating multiple first input events, the first input events can be set to be generated within a preset period of time. The longer the first time interval, the fewer first input events are generated, and the shorter the first time interval, the more first input events are generated. For example, the preset period is 1 second. When the first time interval is 8 milliseconds, 1000 / 8=125 first input events are generated. When the first time interval is 10 milliseconds, 1000 / 10=100 first input events are generated. The first time interval can be set as a fixed value, and the first input event is generated between the sliding starting position and the sliding terminal position. The longer the sliding distance, the more first input events are generated, and the shorter the sliding distance, the fewer first input events are generated. After the MiuiRemoteManager-native module generates multiple first input events, it sends the generated events to the InputDispatcher module.
[0102] Step S704: Acquire multiple second input events corresponding to the second instruction.
[0103] The second instruction is a screen touch operation acting on the display screen of the electronic device. The second instruction is received through the InputDispatcher module, and a plurality of second input events corresponding thereto are generated.
[0104] Step S705: Arrange the plurality of first input events and the plurality of second input events in a queue in chronological order.
[0105] The InputDispatcher module arranges the multiple first input events and the multiple second input events received from the MiuiRemoteManager-native module into a queue according to the event sequence.
[0106] Step S706: Execute a second operation based on the queue.
[0107] The InputDispatcher module distributes the queue to the application running in the foreground, and the application running in the foreground performs the corresponding screen touch operation according to the input events in the queue.
[0108] In an exemplary embodiment of the present disclosure, a display control method is provided. Figure 8 is a flow chart of a display control method according to an exemplary embodiment. Figure 8 As shown, the following steps are included:
[0109] Step S801, receiving a first instruction from the remote control pen;
[0110] Step S802, determining the type of application running in the foreground of the electronic device;
[0111] If the type of the application program running in the foreground of the electronic device is the first type, execute step S803 to step S807; if the type of the application program running in the foreground of the electronic device is the second type, execute step S808;
[0112] Step S803, determining a sliding direction of the sliding operation according to the first instruction;
[0113] Step S804, determining a sliding parameter of the sliding operation according to the length and width of the display screen of the electronic device, where the sliding parameter includes a sliding start position and a sliding end position;
[0114] Step S805, determining whether a second instruction is received;
[0115] If yes, go to step S807; if no, go to step S806.
[0116] Step S806: executing a first operation, where the first operation is a sliding operation on the display interface of the electronic device.
[0117] Step S806 is performed according to step S803, or step S806 is performed according to step S804, or step S806 is performed according to step S803 and step S804.
[0118] Step S807: Based on the first instruction and the second instruction, a second operation is performed, where the second operation is a screen touch operation on the display interface of the electronic device.
[0119] Step S808: Based on the first instruction, a third operation is executed, where the third operation is a page turning operation on the display interface of the electronic device.
[0120] The second type of application is a presentation document application, which needs to turn pages forward and backward during the presentation. For example, when the first instruction is a physical key instruction, such as Figure 3 As shown, when the physical button 301 is pressed, the presentation document turns to the front page, and when the physical button 302 is pressed, the presentation document turns to the back page.
[0121] In an exemplary embodiment of the present disclosure, a display control method is provided. Fig. 9 is a flow chart of a display control method according to an exemplary embodiment. Fig. 9 As shown, the following steps are included:
[0122] Step S901, pressing a physical button on the stylus;
[0123] Step S902, the electronic device receives a physical key event via wireless transmission;
[0124] For example, receiving physical key events via Bluetooth.
[0125] Step S903, sending the physical key event to the Input driver;
[0126] Step S904, the Input driver writes the physical key event to the Input event node;
[0127] Step S905, the InputReader module assembles and synthesizes the physical key events;
[0128] Step S906, the InputDispatcher module requests the PhoneWindowManager module (policy) to intercept the physical key events;
[0129] Step S907, the PhoneWindowManager module requests the MiuiRemoteManager-java module to determine whether the physical key event needs to be processed;
[0130] Step S908, MiuiRemoteManager-java module determines the foreground application type;
[0131] If the foreground application type is a video application that supports remote control, execute steps S909 to S912; if the foreground application type is a video application that does not support remote control, execute step S913.
[0132] Step S909, calling the MiuiRemoteManager-native module to intercept physical key events (triggering sliding gestures);
[0133] Step S910, the MiuiRemoteManager-native module generates a sliding gesture event;
[0134] Step S911, the MiuiRemoteManager-native module sends the sliding gesture event to the InputDispatcher module;
[0135] Step S912: The InputDispatcher module dispatches the sliding gesture event to the foreground application.
[0136] Step S913: The InputDispatcher module dispatches the physical key event to the foreground application.
[0137] In an exemplary embodiment of the present disclosure, a display control method is provided. Fig.10 is a flow chart of a display control method according to an exemplary embodiment. Fig.10 As shown, the following steps are included:
[0138] Step S1001, receiving a physical key event of a stylus;
[0139] Step S1002, monitoring physical key events;
[0140] Step S1003, whether the focus application supports short video remote control;
[0141] The focus application is the application running in the foreground. If the focus application supports short video remote control, step S1004 to step S1007 are executed; if the focus application does not support short video remote control, step S1008 is executed;
[0142] Step S1004, intercepting physical key events;
[0143] Step S1005, obtaining a dynamic position and generating a simulated sliding event;
[0144] Step S1006: inject the simulated sliding event into the InputDispatcher module
[0145] Step S1007, combining the simulated sliding event and the finger touch input event into a queue as an input event;
[0146] Step S1008, do not intercept the physical key event, and treat the physical key event as an input event;
[0147] Step S1009, the InputDispatcher module dispatches the input event to the focus application;
[0148] Step S1010: the focus application performs a corresponding operation according to the input event.
[0149] In an exemplary embodiment of the present disclosure, a display control device is provided. Fig.11 is a block diagram of a display control device according to an exemplary embodiment. Fig.11 As shown, including:
[0150] The receiver 1101 is configured to receive a first instruction of the remote control pen;
[0151] The processor 1102 is configured to execute a first operation based on a first instruction if the type of the application running in the foreground of the electronic device is the first type, where the first operation is a sliding operation on the display interface of the electronic device.
[0152] In an exemplary embodiment, the processor 1102 is further configured to:
[0153] A sliding direction of the sliding operation is determined according to the first instruction.
[0154] In an exemplary embodiment, the processor 1102 is further configured to:
[0155] According to the length and width of the display screen of the electronic device, a sliding parameter of the sliding operation is determined, and the sliding parameter includes a sliding starting position and a sliding ending position.
[0156] In an exemplary embodiment, the processor 1102 is further configured to:
[0157] From the mapping relationship between the application and the sliding parameter, the sliding parameter of the application running in the foreground of the electronic device is matched.
[0158] In an exemplary embodiment, it further includes:
[0159] The receiver 1101 is further configured to receive a second instruction from the display screen of the electronic device;
[0160] The processor 1102 is further configured to execute a second operation based on the first instruction and the second instruction, where the second operation is a screen touch operation on the display interface of the electronic device.
[0161] In an exemplary embodiment, the processor 1102 is further configured to:
[0162] Acquire a plurality of first input events corresponding to the first instruction and a plurality of second input events corresponding to the second instruction;
[0163] Arrange the plurality of first input events and the plurality of second input events in a queue in chronological order;
[0164] Based on the queue, a second operation is performed.
[0165] In an exemplary embodiment, the processor 1102 is further configured to:
[0166] Monitoring a physical key event corresponding to the first instruction;
[0167] Intercept physical key events;
[0168] A plurality of first input events are generated at first time intervals.
[0169] In an exemplary embodiment, the processor 1102 is further configured to:
[0170] If the type of the application program running in the foreground of the electronic device is the second type, based on the first instruction, a third operation is performed, and the third operation is a page turning operation on the display interface of the electronic device.
[0171] In an exemplary embodiment, the processor 1102 is further configured to:
[0172] Obtaining the ID of the application running in the foreground of the electronic device;
[0173] The type of application corresponding to the identifier of the application running in the foreground is matched from the mapping relationship between the pre-configured application identifier and the type of application.
[0174] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0175] Fig.12 is a block diagram of an electronic device 1200 according to an exemplary embodiment.
[0176] Reference Fig.12, the electronic device 1200 may include one or more of the following components: a processing component 1202 , a memory 1204 , a power component 1206 , a multimedia component 1208 , an audio component 1210 , an input / output (I / O) interface 1212 , a sensor component 1214 , and a communication component 1216 .
[0177] The processing component 1202 generally controls the overall operation of the electronic device 1200, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1202 may include one or more processors 1220 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 1202 may include one or more modules to facilitate the interaction between the processing component 1202 and other components. For example, the processing component 1202 may include a multimedia module to facilitate the interaction between the multimedia component 1208 and the processing component 1202.
[0178] The memory 1204 is configured to store various types of data to support operations on the electronic device 1200. Examples of such data include instructions for any application or method operating on the electronic device 1200, contact data, phone book data, messages, pictures, videos, etc. The memory 1204 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0179] The power supply component 1206 provides power to the various components of the electronic device 1200. The power supply component 1206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 1200.
[0180] The multimedia component 1208 includes a screen that provides an output interface between the electronic device 1200 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1208 includes a front camera and / or a rear camera. When the electronic device 1200 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0181] The audio component 1210 is configured to output and / or input audio signals. For example, the audio component 1210 includes a microphone (MIC), and when the electronic device 1200 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1204 or sent via the communication component 1216. In some embodiments, the audio component 1210 also includes a speaker for outputting audio signals.
[0182] I / O interface 1212 provides an interface between processing component 1202 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0183] The sensor assembly 1214 includes one or more sensors for providing various aspects of status assessment for the electronic device 1200. For example, the sensor assembly 1214 can detect the open / closed state of the electronic device 1200, the relative positioning of components, such as the display and keypad of the electronic device 1200, and the sensor assembly 1214 can also detect the position change of the electronic device 1200 or a component of the electronic device 1200, the presence or absence of user contact with the electronic device 1200, the orientation or acceleration / deceleration of the electronic device 1200, and the temperature change of the electronic device 1200. The sensor assembly 1214 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1214 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1214 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0184] The communication component 1216 is configured to facilitate wired or wireless communication between the electronic device 1200 and other devices. The electronic device 1200 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1216 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1216 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0185] In an exemplary embodiment, the electronic device 1200 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0186] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1204 including instructions, and the instructions can be executed by a processor 1220 of the electronic device 1200 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0187] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute a display control method, the method including any of the above methods.
[0188] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0189] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A display control method, characterized in that: The method comprises: Receiving a first instruction from the remote control pen; If the type of the application program running in the foreground of the electronic device is the first category, a first operation is performed based on the first instruction, and the first operation is a sliding operation on the display interface of the electronic device.
2. The display control method according to claim 1, characterized in that: Before performing the first operation, the method further includes: A sliding direction of the sliding operation is determined according to the first instruction.
3. The display control method according to claim 1, characterized in that: Before performing the first operation, the method further includes: According to the length and width of the display screen of the electronic device, a sliding parameter of the sliding operation is determined, and the sliding parameter includes a sliding starting point position and a sliding end point position.
4. The display control method according to claim 3, characterized in that: The determining the sliding parameter of the sliding operation includes: The sliding parameters of the application program running in the foreground of the electronic device are matched from the mapping relationship between the application program and the sliding parameters.
5. The display control method according to claim 1, characterized in that: The method further comprises: receiving a second instruction from the display screen of the electronic device; Based on the first instruction and the second instruction, a second operation is performed, where the second operation is a screen touch operation on the display interface of the electronic device.
6. The display control method according to claim 5, characterized in that: The performing the second operation based on the first instruction and the second instruction includes: Acquire a plurality of first input events corresponding to the first instruction and a plurality of second input events corresponding to the second instruction; Arrange the plurality of first input events and the plurality of second input events in a queue in chronological order; Based on the queue, the second operation is performed.
7. The display control method according to claim 6, characterized in that: The acquiring a plurality of first input events corresponding to the first instruction includes: Monitoring a physical key event corresponding to the first instruction; Intercepting the physical key event; The plurality of first input events are generated at first time intervals.
8. The display control method according to claim 1, characterized in that: The method further comprises: If the type of the application program running in the foreground of the electronic device is the second type, a third operation is performed based on the first instruction, and the third operation is a page turning operation on the display interface of the electronic device.
9. The display control method according to claim 1 or 8, characterized in that: The method further comprises: Obtaining an identification of an application running in the foreground of the electronic device; The type of application corresponding to the identifier of the application running in the foreground is matched from the mapping relationship between the pre-configured application identifier and the type of application.
10. A display control device, characterized in that: The device comprises: A receiver configured to receive a first instruction of the remote control pen; The processor is configured to execute a first operation based on the first instruction if the type of the application running in the foreground of the electronic device is the first category, where the first operation is a sliding operation on the display interface of the electronic device.
11. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the display control method according to any one of claims 1 to 9.
12. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the display control method as described in any one of claims 1 to 9.