Control method for shared input device, terminal device, and system
By detecting input events in the terminal device and determining whether it is a preset event, the problem of accidental return of the input device caused by accidental touch is solved and the user experience is improved.
Patent Information
- Application Number
- PCT/CN2023/133019
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-02-24
- Filing Date
- 2023-11-21
- Publication Date
- 2024-08-29
AI Technical Summary
When users use multiple terminal devices at the same time, accidental touch causes the input device to return unexpectedly, affecting the user experience.
By detecting input events in the terminal device and determining whether it is a preset event, the focus of the input device is only switched when a preset event is detected, thereby avoiding accidental return caused by accidental touch.
It effectively avoids accidental return of input devices due to accidental touches, improves user experience, and reduces the burden on terminal devices.
Smart Images

Figure CN2023133019_29082024_PF_FP_ABST
Abstract
Description
A control method, terminal device and system for shared input device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on February 24, 2023, with application number 202310205240.4 and application name “A control method, terminal device and system for a shared input device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The embodiments of the present application relate to the field of terminal technology, and in particular to a control method, terminal device, and system for a shared input device. Background Art
[0003] Terminal devices such as desktop computers and laptops mainly use input devices such as mice and keyboards for input. When a user needs to use multiple terminal devices at the same time, and the terminal device 1 has multiple sets of input devices (such as mice and keyboards). According to the current solution, if the user needs to use a set of input devices (such as a mouse) of the terminal device 1 to control another terminal device 2, the terminal device 1 can be operated to pass the focus of the mouse to the terminal device 2 to achieve the purpose of using the mouse to input the terminal device 2. After the focus of the mouse passes to the terminal device 2, the terminal device 2 will subsequently respond to the input event of the mouse. For example, if the user moves the mouse, the terminal device 1 will provide the detected mouse movement operation as an input event to the terminal device 2. In response to the mouse input event, the terminal device 2 controls the cursor to move on the interface of the terminal device 2.
[0004] However, in the scenario where the mouse focus passes to terminal device 2, since the keyboard focus is still on terminal device 1, if the user uses the keyboard to operate terminal device 1 or accidentally touches the keyboard, terminal device 1 may be triggered to switch the mouse focus back to terminal device 1, which is the phenomenon of focus returning. Although the above solution can achieve the focus return of the input device that has passed, the user may not want to trigger the mouse to return when using the keyboard to operate terminal device 1.
[0005] Summary of the Invention
[0006] Embodiments of the present application provide a control method, terminal device, and system for a shared input device, which are used to solve the problem of reducing the accidental return of the input device due to mis-touch.
[0007] The embodiments of this application provide the following technical solutions:
[0008] In a first aspect, an embodiment of the present application provides a control method for a shared input device, which is applied to a communication system, wherein the communication system includes at least two input devices, a first terminal device and a second terminal device, wherein the at least two input devices are connected to the first terminal device, and there is a communication connection between the first terminal device and the second terminal device, and the focus of the first input device among the at least two input devices is the second terminal device; the method includes: when the first terminal device detects a first input event of the first input device, the first terminal device sends the first input event to the second terminal device through the communication connection. The second terminal device responds to the first input event. When the second input event of the second input device among the at least two input devices detected by the first terminal device is a preset event, the first terminal device switches the focus of the first input device from the second terminal device back to the first terminal device. When the focus of the first input device is the first terminal device, the first terminal device responds to the input event of the first input device.
[0009] The control method of a shared input device provided in an embodiment of the present application can realize that when the focus of a shared input device (such as a first input device) is switched from a terminal device (such as a first terminal device) to another terminal device (such as a second terminal device) in a communication system, the first terminal device can use the second input event detected by the unshared input device (such as the second input device) to switch the focus of the shared input device back from the second terminal device. Since the present application switches the focus of the first input device back to the first terminal device when the second input event is a preset event. As long as the input event of the unshared input device is not a preset event, it will not trigger the first terminal device to control the focus of the shared input device to return to its original position. Therefore, the phenomenon of accidental return of the input device due to mis-touch can be avoided, thereby improving the user experience. In addition, when the focus of the first input device is the second terminal device, the first terminal device can also transmit the detected first input event of the first input device to the second terminal device for the second terminal device to respond, that is, the purpose of using the first input device of the first terminal device to input information to the second terminal device or control the second terminal device can be achieved.
[0010] It's worth noting that if the focus of the first input device is on the second terminal device, and the first terminal device doesn't detect any input events from the first input device (for example, the user doesn't operate the first input device), then the first terminal device won't feed back the input events from the first input device to the second terminal device. Similarly, if the focus of the first input device is on the second terminal device, and the first terminal device doesn't detect any input events from the second input device, then the first terminal device won't switch the focus of the first input device from the second terminal device back to the first terminal device.
[0011] It can be understood that when the second terminal device holds the focus of the first input device, since the first input device is still connected to the first terminal device, that is, the communication connection between the first input device and the first terminal device is not interrupted, the first input device has not established a communication connection with the second terminal device. Therefore, for the first input event of the first input device, the first terminal device is sent to the second terminal device through the communication connection between the first terminal device and the second terminal device, so that the second terminal device responds, thereby achieving the purpose of using the first input device to operate the second terminal device.
[0012] In the embodiment of the present application, the second input device can be any one of the at least two input devices except the first input device, and the focus of the second input device is the first terminal device, that is, the focus of the second input device is not switched to any terminal device.
[0013] In one possible implementation of the present application, before the first terminal device switches the focus of the first input device from the second terminal device back to the first terminal device, the method provided in the embodiment of the present application further includes:
[0014] If the first terminal device determines that the third input event of the second input device is not a preset event, the first terminal device determines that the second terminal device continues to hold the focus of the first input device, that is, the first terminal device will not execute the action of switching the focus of the first input device from the second terminal device back to the first terminal device.
[0015] In a possible implementation of the present application, the first terminal device determines that the third input event is not a preset event, and the method provided in the embodiment of the present application further includes: the first terminal device responding to the third input event or discarding the third input event.
[0016] In one possible implementation of the present application, before the first terminal device switches the focus of the first input device from the second terminal device back to the first terminal device, the method provided in the embodiment of the present application further includes: the first terminal device displays a first interactive interface. The first interactive interface includes at least a first control. The first interactive interface is used to prompt whether to switch the focus of the first input device back to the first terminal device. The first terminal device switches the focus of the first input device from the second terminal device back to the first terminal device, including: detecting a first operation on the first control; in response to the first operation, the first terminal device switches the focus of the first input device from the second terminal device back to the first terminal device.
[0017] When the first terminal device detects that the second input event is a preset event, the first interactive interface is displayed to prompt the user whether to switch the focus of the first input device from the second terminal device back to the first terminal device. This can ensure that the first terminal device's final decision to switch the focus of the first input device from the second terminal device back to the first terminal device meets the user's expectations.
[0018] In a possible implementation of the present application, the first input device is a mouse and / or a keyboard.
[0019] In a possible implementation of the present application, the second input device is a mouse or a keyboard.
[0020] In a possible implementation of the present application, the first terminal device switches the focus of the first input device from the second terminal device back to the first terminal device, further comprising: the first terminal device sends a focus switch-back message to the second terminal device via the communication connection between the first terminal device and the second terminal device, and the focus switch-back message is used to indicate that the focus of the first input device is switched back to the first terminal device. In response to the focus switch-back message, the second terminal device outputs a second prompt message. The second prompt message is used to prompt that the focus of the first input device has been switched back to the first terminal device. This makes it easy for the user to determine that the focus of the first input device has been switched back to the first terminal device with the help of the second prompt message, and the first input device cannot be used to input information to the second terminal device or control the second terminal device subsequently.
[0021] In the second aspect, an embodiment of the present application provides a control method for a shared input device, which is applied to a communication system, wherein the communication system includes a first input device, a first terminal device, and a second terminal device, wherein the first input device is connected to the first terminal device, and a communication connection is established between the first terminal device and the second terminal device, and the focus of the first input device is the second terminal device, and the method includes: the first terminal device sends a first focus return request to the second terminal device via the communication connection. The first focus return request is used to request that the focus of the first input device be switched back to the first terminal device. In response to the first focus return request, the second terminal device determines that it needs to continue to hold the focus of the first input device, and the second terminal device sends a focus transfer rejection response to the first terminal device via the communication connection. The focus transfer rejection response is used to indicate that the second terminal device has not released the focus of the first input device. In response to the focus transfer rejection response, the first terminal device maintains the focus of the first input device as the second terminal device.
[0022] In the above solution, when the focus of the first input device is the second terminal device, if the first terminal device detects a first input event of the first input device, the first terminal device sends the first input event to the second terminal device via a communication connection, so that the second terminal device responds to the first input event. In this way, it is possible to use the shared input device of the first terminal device (such as the first input device) to operate another terminal device.
[0023] In the above scheme, the first terminal device can send a first focus return request to the second terminal device to request to switch back the focus of the first input device. After receiving the first focus return request, the second terminal device can independently determine whether it needs to continue to hold the focus of the first input device. If it needs to continue to hold the focus of the first input device, it can send a focus transfer rejection response to the first terminal device to indicate that the second terminal device has not released the focus of the first input device. In this way, for the first terminal device, the action of switching back the focus of the first input device will not be executed. This scheme allows the second terminal device to decide whether to return the focus of the first input device according to needs when the focus of the first input device is switched to the second terminal device.
[0024] In one possible implementation of the present application, the first terminal device may send a first focus re-entry request to the second terminal device when a preset condition is met. For example, the preset condition may be detecting a second input event of a second input device connected to the first terminal device, or the preset condition may be detecting that the second input event of the second input device is a preset event.
[0025] In one possible implementation of the present application, the communication system also includes a second input device connected to the first terminal device. Before the first terminal device sends a first focus return request to the second terminal device through a communication connection, the method of the present application also includes: the first terminal device at least detects the second input device (for example, it can also detect the first input device); accordingly, the first terminal device sends the first focus return request to the second terminal device through the communication connection, including: the first terminal device detects a second input event of the second input device, and the first terminal device sends the first focus return request to the second terminal device through the communication connection.
[0026] In one possible implementation of the present application, when a first terminal device detects a second input event of a second input device, the first terminal device sends a first focus return request to the second terminal device through a communication connection, including: when the second input event is a preset event, the first terminal device sends the first focus return request to the second terminal device through the communication connection.
[0027] In a possible implementation of the present application, in response to rejecting the focus migration response, after the first terminal device maintains the focus of the first input device as the second terminal device, the method provided by the embodiment of the present application also includes: the first terminal device sends a second focus return request to the second terminal device, and the second focus return request is used to request that the focus of the first input device be switched back to the first terminal device. In response to the second focus return request, the second terminal device determines that it is not necessary to hold the focus of the first input device, and then the second terminal device sends a focus migration response to the first terminal device. The focus migration response is used to indicate that the second terminal device releases the focus of the first input device. In response to the focus migration response, the first terminal device switches the focus of the first input device back to the first terminal device.
[0028] It is understandable that if the first terminal device subsequently determines that the preset condition is met again, it may send a second focus return request to the second terminal device to request that the focus of the first input device be switched back to the first terminal device.
[0029] In a third aspect, embodiments of the present application provide a method for controlling a shared input device, the method being applied to a first terminal device, the first terminal device having at least two input devices, wherein the focus of a first input device of the at least two input devices is a second terminal device; the method comprising: upon detecting a first input event of the first input device by the first terminal device, the first terminal device sending the first input event to the second terminal device via a communication connection; if the second input event of the second input device of the at least two input devices detected by the first terminal device is a preset event, the first terminal device switching the focus of the first input device from the second terminal device back to the first terminal device; and if the focus of the first input device is the first terminal device, the first terminal device responding to the input event of the first input device.
[0030] In one possible implementation of the present application, in one possible implementation of the present application, before the first terminal device switches the focus of the first input device from the second terminal device back to the first terminal device, the method provided in an embodiment of the present application also includes: if the first terminal device does not detect any input event of the first input device, the first terminal device does not send any input event of the first input device to the second terminal device.
[0031] In one possible implementation of the present application, before the first terminal device switches the focus of the first input device from the second terminal device back to the first terminal device, the method provided in an embodiment of the present application further includes: the first terminal device detecting a third input event of the second input device. If the first terminal device determines that the third input event of the second input device is not a preset event, the first terminal device determines that the second terminal device continues to hold the focus of the first input device.
[0032] In a possible implementation of the present application, the first terminal device determines that the third input event is not a preset event, and the method provided in the embodiment of the present application also includes: the first terminal device responds to the third input event or discards the third input event.
[0033] In one possible implementation of the present application, before the first terminal device switches the focus of the first input device from the second terminal device back to the first terminal device, the method provided in an embodiment of the present application further includes: the first terminal device displays a first interactive interface, the first interactive interface includes at least a first control, and the first interactive interface is used to prompt whether to switch the focus of the first input device back to the first terminal device; accordingly, the first terminal device switches the focus of the first input device from the second terminal device back to the first terminal device, including: the first terminal device detects a first operation on the first control. In response to the first operation, the first terminal device switches the focus of the first input device from the second terminal device back to the first terminal device.
[0034] In a possible implementation of the present application, the first input device is a mouse and / or a keyboard; the second input device is a mouse or a keyboard.
[0035] When the first input device is a mouse, it can be understood that the first terminal device will use the mouse connected to the first terminal device as a shared input device, and switch the focus of the mouse to the second terminal device. If the first terminal device detects any input event of the mouse (such as the first input event), the detected first input event of the mouse will be sent to the second terminal device for response by the second terminal device.
[0036] When the first input device is a keyboard, it can be understood that the first terminal device will connect to the keyboard of the first terminal device as a shared input device, and switch the focus of the keyboard to the second terminal device. Then, if the first terminal device detects any input event of the keyboard (such as the first input event), the detected first input event of the keyboard will be sent to the second terminal device for response by the second terminal device.
[0037] When the first input device is a keyboard and a mouse, it can be understood that the first terminal device uses the keyboard and the mouse connected to the first terminal device as shared input devices, and switches the focus of both to the second terminal device. If the first terminal device detects any input event of the keyboard and the mouse (such as a first input event), the detected first input event of the keyboard and the mouse will be sent to the second terminal device for response by the second terminal device. Specifically, when the focus of the keyboard and the mouse is the second input device, if the first terminal device detects a mouse movement event, the movement event will be sent to the second terminal device as a first input event. If the first terminal device detects a keyboard press event, the key value of the pressed key on the keyboard will be sent to the second terminal device as a first input event.
[0038] When the first input device is a keyboard and a mouse, the first terminal device can synchronously switch the focus of the keyboard and the mouse to the second terminal device. Alternatively, based on a user operation, the first terminal device can first switch the focus of one of the keyboard and the mouse to the second terminal device, and then switch the focus of the other of the keyboard and the mouse to the second terminal device. This embodiment of the present application is not limited to this.
[0039] In one possible implementation of the present application, the first terminal device switching the focus of the first input device from the second terminal device back to the first terminal device further includes: the first terminal device sending a focus switch-back message to the second terminal device via the communication connection between the first terminal device and the second terminal device. The focus switch-back message indicates that the focus of the first input device has been switched back to the first terminal device. This facilitates the second terminal device to determine that the first terminal device will not subsequently send input events of the first input device to the second terminal device.
[0040] In a fourth aspect, an embodiment of the present application provides a control method for a shared input device, which is applied to a second terminal device. When the second terminal device holds the focus of the first input device, the second terminal device is used to respond to the first input event of the first input device sent by the first terminal device. The method includes: the second terminal device receives a first focus return request from the first terminal device through a communication connection with the first terminal device. The first focus return request is used to request that the focus of the first input device be switched back to the first terminal device. In response to the first focus return request, the second terminal device determines that it needs to continue to hold the focus of the first input device, and sends a focus transfer rejection response to the first terminal device through the communication connection. The focus transfer rejection response is used to indicate that the second terminal device has not released the focus of the first input device.
[0041] In a possible implementation of the present application, after the second terminal device sends a focus migration rejection response to the first terminal device through a communication connection, the method further includes: the second terminal device receives a second focus return request from the first terminal device, and the second focus return request is used to request that the focus of the first input device be switched back to the first terminal device. In response to the second focus return request, the second terminal device determines that it does not need to hold the focus of the first input device and sends a focus migration response to the first terminal device. The focus migration response is used to indicate that the second terminal device releases the focus of the first input device.
[0042] In a fifth aspect, a method for controlling a shared input device is provided, the method being applied to a first terminal device, wherein the focus of a first input device connected to the first terminal device is a second terminal device, and a communication connection is established between the first terminal device and the second terminal device. The method provided by an embodiment of the present application includes: when the focus of the first input device is the second terminal device, the first terminal device sends a first focus return request to the second terminal device via the communication connection. The first focus return request is used to request that the focus of the first input device be switched back to the first terminal device; the first terminal device receives a focus transfer rejection response from the second terminal device; and in response to the focus transfer rejection response, the first terminal device maintains the focus of the first input device as the second terminal device.
[0043] In the solution described in the fifth aspect, when the focus of the first input device is the second terminal device, the second terminal device responds to the first input event of the first input device. For example, if the first terminal device detects the first input event of the first input device, the first input event is sent to the second terminal device via the communication connection.
[0044] In one possible implementation of the present application, the first terminal device further includes a second input device, and the first terminal device sending a first focus return request to the second terminal device via the communication connection includes: upon the first terminal device detecting a second input event of the second input device, the first terminal device sending the first focus return request to the second terminal device via the communication connection. This solution can trigger a process in which the first terminal device requests the focus of a shared input device (e.g., the first input device) to be switched back if the first terminal device detects any input event of an unshared input device (e.g., the second input device).
[0045] In one possible implementation of the present application, when a first terminal device detects a second input event of a second input device, the first terminal device sends a first focus return request to the second terminal device via a communication connection, including: when the first terminal device detects the second input event of the second input device and the second input event is a preset event, the first terminal device sends the first focus return request to the second terminal device via the communication connection. This solution can trigger the process of the first terminal device requesting to switch back the focus of a shared input device (such as the first input device) only when the second input event of an unshared input device (such as the second input device) is a preset input event.
[0046] In one possible implementation of the present application, after the first terminal device maintains the focus of the first input device as the second terminal device in response to rejecting the focus migration response, the method further includes: sending a second focus migration request to the second terminal device. The second focus migration request is used to request that the focus of the first input device be switched back to the first terminal device. The focus migration response from the second terminal device is received; and in response to the focus migration response, the first terminal device switches the focus of the first input device back to the first terminal device.
[0047] In a sixth aspect, an embodiment of the present application provides a communication system, which includes: a first terminal device, a second terminal device, and at least two input devices connected to the first terminal device, wherein the focus of the first input device among the at least two input devices is the second terminal device, and there is a communication connection between the first terminal device and the second terminal device, wherein the communication system is used to implement the method described in the first aspect or any possible implementation of the first aspect.
[0048] In the seventh aspect, an embodiment of the present application provides a communication system, which includes: a first terminal device, a second terminal device, and a first input device connected to the first terminal device, there is a communication connection between the first terminal device and the second terminal device, and the focus of the first input device is the second terminal device, wherein the communication system is used to implement the method described in the second aspect or various possible implementations of the second aspect.
[0049] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processing circuit, the method described in the third aspect or various possible implementations of the third aspect is implemented.
[0050] In the ninth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processing circuit, the method described in the fourth aspect or various possible implementations of the fourth aspect is implemented.
[0051] In the tenth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processing circuit, the method described in the fifth aspect or various possible implementations of the fifth aspect is implemented.
[0052] In an eleventh aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method described in the third aspect or various possible implementations of the third aspect.
[0053] In a twelfth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method described in the fourth aspect or various possible implementations of the fourth aspect.
[0054] In a thirteenth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method described in the fifth aspect or various possible implementations of the fifth aspect.
[0055] In the fourteenth aspect, a chip system includes a processing circuit and a storage medium, wherein the storage medium stores computer program instructions; when the computer program instructions are executed by the processing circuit, the method described in the third aspect and various possible implementations of the third aspect is implemented.
[0056] In the fifteenth aspect, a chip system includes a processing circuit and a storage medium, wherein the storage medium stores computer program instructions; when the computer program instructions are executed by the processing circuit, the method described in the fourth aspect and various possible implementations of the fourth aspect is implemented.
[0057] In the sixteenth aspect, a chip system includes a processing circuit and a storage medium, wherein the storage medium stores computer program instructions; when the computer program instructions are executed by the processing circuit, the method described in the fifth aspect and various possible implementations of the fifth aspect is implemented.
[0058] Optionally, the processing circuit in the above chip system can be replaced by a processor, and the storage medium can be replaced by a memory. Optionally, the chip system can also include a communication interface, which is used to realize communication between the chip system and external devices.
[0059] In the seventeenth aspect, an embodiment of the present application provides a terminal device, including a processor and a communication interface, wherein the communication interface is used to enable communication between the terminal device and an external device, and the processor is used to execute computer program instructions stored in a memory to implement the method described in the fourth aspect and various possible implementation methods of the fourth aspect.
[0060] In the eighteenth aspect, an embodiment of the present application provides a terminal device, including a processor and a communication interface, wherein the communication interface is used to enable communication between the terminal device and an external device, and the processor is used to execute computer program instructions stored in a memory to implement the method described in the fifth aspect and various possible implementation methods of the fifth aspect.
[0061] In the nineteenth aspect, an embodiment of the present application provides a terminal device, including a processor and a communication interface, wherein the communication interface is used to enable communication between the terminal device and an external device, and the processor is used to execute computer program instructions stored in the memory to implement the method described in the sixth aspect and various possible implementation methods of the sixth aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] FIG1 is a diagram of a communication system architecture provided by an embodiment of the present application;
[0063] FIG2 is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application;
[0064] FIG3 is a schematic diagram of the structure of an input device provided in an embodiment of the present application;
[0065] FIG4 is a schematic diagram of the software architecture of the communication system provided in an embodiment of the present application;
[0066] 5A to 5E are schematic diagrams of focus switching of an input device provided in an embodiment of the present application;
[0067] FIG6 is a schematic diagram of a user operating a second terminal device using a “mouse” of a first terminal device according to an embodiment of the present application;
[0068] FIG7 is a schematic diagram of a user operating a second terminal device by means of a “keyboard” of a first terminal device according to an embodiment of the present application;
[0069] FIG8 is a first schematic diagram of a first terminal device detecting a preset event and controlling the focus of a shared input device to switch back, according to an embodiment of the present application;
[0070] FIG9 is a second schematic diagram of a first terminal device detecting a preset event and controlling the focus of a shared input device to switch back, according to an embodiment of the present application;
[0071] FIG10 is a third schematic diagram of a first terminal device detecting a preset event and controlling the focus of a shared input device to switch back, according to an embodiment of the present application;
[0072] FIG11 is a schematic diagram of a scenario in which the focus of multiple input devices of a laptop computer is switched to different terminal devices according to an embodiment of the present application;
[0073] FIG12 is a flow chart of a method for controlling a shared input device according to an embodiment of the present application;
[0074] FIG13 is a flow chart of another method for controlling a shared input device according to an embodiment of the present application;
[0075] 14A and 14B are schematic diagrams of interfaces of a terminal device provided in an embodiment of the present application;
[0076] FIG15 is a schematic diagram of an interface of another terminal device provided in an embodiment of the present application;
[0077] FIG16 is a schematic structural diagram of a terminal device provided in an embodiment of the present application;
[0078] FIG17 is a schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0079] To facilitate a clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, terms such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. For example, the terms "first terminal device" and "second terminal device" are merely used to distinguish between different terminal devices and do not limit their order. Those skilled in the art will understand that terms such as "first" and "second" do not limit the quantity or execution order, and that terms such as "first" and "second" do not necessarily mean that they are different.
[0080] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0081] In this application, "at least one" means one or more, and "more" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0082] In the embodiment of the present application, the input device (InputDevice) refers to a device that inputs data and information to the terminal device. The input device is a device for people or external devices to interact with the terminal device, and is used to input raw data and programs for processing these data into the terminal device. The input device involved in the embodiment of the present application may refer to a camera, a scanner, a fax machine, a light pen, a handwriting input board, a joystick, a voice input device, etc. For example, the input device can be a wired input device or a wireless input device. A wired input device refers to a device that is connected to the terminal device via a wired method, such as a wired keyboard or a wired mouse. A wired keyboard or a wired mouse can establish a wired communication connection with the terminal device via, for example, a universal serial bus (USB). A wireless input device refers to a device that is connected to the terminal device via a wireless method. For example, a wireless mouse or a wireless keyboard. A wireless mouse or a wireless keyboard can be connected to the terminal device via wireless communication methods such as Bluetooth and near field communication (NFC). The input device can generate input data based on the detected user operation and input it into the terminal device. The generated input data can be numerical data or non-numerical data, such as graphics, images, sounds, etc. The embodiments of the present application do not impose any restrictions on the type of input device and the input data generated by the input device.
[0083] Terminal devices can typically connect to one or more input devices to implement corresponding functions. For example, if the terminal device is a personal computer (PC) and the input device is a mouse, the PC can be connected to the mouse, using the mouse to move the cursor on the PC display and further functions such as opening / deleting files. The PC can also be connected to a keyboard, using the keyboard to move the cursor on the PC display, input English letters, Chinese characters, numbers, punctuation marks, etc. into the PC, thereby issuing commands to the PC and inputting data. Of course, users can also use the keyboard to control the PC to open / delete files, etc. For another example, if the terminal device is a tablet computer, the tablet computer can establish a Bluetooth connection with the keyboard, using the keyboard to input characters into the tablet computer, open applications / videos / audio on the tablet computer, etc. For another example, if the terminal device is a tablet computer or a mobile phone, the input device of the tablet computer or mobile phone can be the tablet computer's or mobile phone's touch screen, and the user can operate the touch screen to input characters into the tablet computer or mobile phone, open applications / videos / audio on the tablet computer or mobile phone, etc.
[0084] The terminal devices in the embodiments of the present application may include, but are not limited to, personal computers (PCs), smart phones, netbooks, tablet computers, smart cameras, PDAs, smart TVs, personal digital assistants (PDAs), portable multimedia players (PMPs), projection devices, smart screen devices, augmented reality (AR) / virtual reality (VR) devices, mixed reality (MR) devices, televisions, or somatosensory game consoles in human-computer interaction scenarios. The embodiments of the present application do not limit the specific functions and structures of the terminal devices.
[0085] Among them, in the embodiment of the present application, the input methods supported by the input device may include but are not limited to key method (such as mouse, keyboard, etc.), scroll wheel method (such as mouse, etc.), gesture input method, body language input method, voice input method, expression input method, eye movement input method, etc.
[0086] Terminal devices such as desktop computers and laptops mainly use input devices such as mice and keyboards for input. When a user needs to use multiple terminal devices at the same time, and the terminal device 1 has multiple sets of input devices (such as mice and keyboards). According to the current solution, if the user needs to use a set of input devices (such as a mouse) of the terminal device 1 to control another terminal device 2, the terminal device 1 can be operated to pass the focus of the mouse to the terminal device 2 to achieve the purpose of using the mouse to input the terminal device 2. After the focus of the mouse passes to the terminal device 2, the terminal device 2 will subsequently respond to the input event of the mouse. For example, if the user moves the mouse, the terminal device 1 will provide the detected mouse movement operation as an input event to the terminal device 2. In response to the mouse input event, the terminal device 2 controls the cursor to move on the interface of the terminal device 2.
[0087] However, in the scenario where the mouse crosses to terminal device 2, if the focus of some input devices (such as the keyboard) of terminal device 1 has not crossed to other devices, the focus of the keyboard is still terminal device 1. Since the focus of the keyboard is terminal device 1, if terminal device 1 detects an input event from the keyboard, it will mistakenly believe that the focus switching back condition is met, so terminal device 1 switches the focus of the mouse back to terminal device 1, that is, the focus returns. In this case, although the input device that has been crossed can be returned to its original position, the user may not want to trigger the mouse to return to its original position when using the keyboard to operate terminal device 1, so the input device that has been crossed may be accidentally returned to its original position due to accidental touching of the input device that has not been crossed.
[0088] Suppose a user is currently using a laptop computer for text editing. The laptop computer is equipped with keyboard 1, keyboard 2, and mouse 1, and the user is using a tablet computer to watch videos. Suppose the user needs to use the mouse to operate the tablet computer to switch videos or set the playback progress of a video. If the tablet computer does not have input devices or the user is not accustomed to using the tablet computer's input devices, the user can establish a communication connection between the laptop and the tablet computer. The laptop computer can then switch the focus of mouse 1 and / or keyboard 1 to the tablet computer based on the user's operation, thereby transferring the focus of the laptop computer's mouse 1 and / or keyboard 1 to the tablet computer. The user can then use mouse 1 to operate the tablet computer to switch videos, set the playback progress of videos, or perform other operations. After mouse 1's focus transfers to the tablet computer, keyboard 2's focus remains on the laptop computer. If the user accidentally touches keyboard 2 while using mouse 1, and keyboard 2's focus has not yet shifted to the tablet computer, the laptop computer will detect an input event from keyboard 2 (such as a key press) and control the focus of mouse 1 to switch back to the laptop computer. After mouse 1's focus returns to the laptop computer, subsequent input events from mouse 1 will be handled by the laptop computer. This prevents the user from continuing to use mouse 1 to operate the tablet, or interrupts the ongoing operation. Although the laptop can detect input events from keyboard 2, these events may be caused by accidental user input, or the user may not want to switch focus back to mouse 1 while operating the laptop using keyboard 2. If the user subsequently needs to continue using mouse 1 or is currently using mouse 1 to operate the tablet, the laptop's behavior of switching focus back to mouse 1 upon detecting keyboard 2 input events will degrade the user experience.
[0089] Based on this, in the embodiment of the present application, when the first terminal device detects an input event of the unshared input device, it will first determine whether the input event of the detected unshared input device is a preset event. In the case where the first terminal device determines that the input event of the unshared input device is a preset event, the first terminal device will switch the focus to the shared input device (such as a mouse) of the second terminal device. Since the embodiment of the present application switches the focus of the shared input device back only when the input event of the unshared input device is a preset event, it can effectively avoid the problem of the first terminal device detecting an input event and triggering the focus return of the shared input device due to the user accidentally touching the unshared input device, and at the same time, it also reduces the burden on the first terminal device.
[0090] As shown in Figure 1, Figure 1 is a schematic structural diagram of a communication system provided in an embodiment of the present application, which may include a terminal device 100 and a terminal device 200. A second communication connection may be established between the terminal device 100 and the terminal device 200.
[0091] The terminal device 100 has at least two sets of input devices, and a first communication connection is established between the terminal device 100 and each set of input devices. It can be understood that each set of input devices is connected to the terminal device 100 via the first communication connection. As an example, the first communication connection can be a wired communication connection (such as a universal serial bus (USB) connection) or a wireless communication connection, such as a Bluetooth connection, a Wi-Fi connection, an NFC connection, etc. The embodiment of the present application does not limit the type of the first communication connection.
[0092] Taking the terminal device 100 as a laptop computer as an example, as shown in Figure 1, the at least two sets of input devices possessed by the terminal device 100 can be at least two of the mouse 102, mouse 104, keyboard 101, keyboard 103, touchpad 106 and the keyboard 107 that comes with the laptop computer.
[0093] The mouse 102 , mouse 104 , keyboard 101 , and keyboard 103 can be considered as input peripherals connected to the terminal device 100 . The touchpad 106 and the keyboard 107 of the notebook computer can be considered as built-in input devices of the terminal device 100 .
[0094] In some embodiments of the present application, all input devices in at least two sets of input devices of the terminal device 100 support focus switching. For example, the focus of each input device among the mouse 102, mouse 104, keyboard 101, keyboard 103, touchpad 106, and keyboard 107 can be switched from the terminal device 100 to another terminal device (such as the terminal device 200).
[0095] When all input devices in at least two sets of input devices support focus switching, when the terminal device 100 switches the focus of the input device to the terminal device 200, it can choose to switch the focus of some input devices to the terminal device 200, while retaining the focus of some input devices at the terminal device 100.
[0096] In other embodiments of the present application, some of the at least two sets of input devices provided by the terminal device 100 support focus switching, while some do not. This is not limited in the embodiments of the present application. Specifically, which input devices support focus switching and which do not can be set by the terminal device 100, or set by the manufacturer of the terminal device 100, or determined by the performance of the input devices. This is not limited in the embodiments of the present application. For example, the input devices provided by the laptop computer itself can be set not to support focus switching, such as the touchpad 106 and keyboard 107. For example, the capability information of the mouse 104 indicates that the mouse 104 supports focus switching, while the capability information of the mouse 102 indicates that the mouse 102 does not support focus switching. Optionally, when each input device is connected to the terminal device 200, the terminal device 200 can obtain the capability information of each input device to determine whether each input device supports focus switching. Alternatively, the terminal device 200 can obtain the capability information of each input device when the focus switching conditions are met.
[0097] In the embodiment of the present application, when the focus of an input device is switched from one terminal device (e.g., terminal device 100) to another terminal device (e.g., terminal device 200), the communication connection between the input device and the terminal device 100 will not be disconnected, but the operation object of the input device will change from terminal device 100 to terminal device 200, that is, when the focus of the input device is terminal device 100, the input device is used to input content to the terminal device 100, that is, the terminal device 100 responds to the input event of the input device. When the focus of the input device is terminal device 200, the input device is used to input content to the terminal device 200, that is, the terminal device 200 responds to the input event of the input device. As a specific implementation: since the first communication connection is still maintained between the input device and the terminal device 100 when the focus of the input device is switched to the terminal device 200, and the second communication connection is also maintained between the terminal device 100 and the terminal device 200, the terminal device 100 can provide the input event of the detected input device to the terminal device 200, and then the terminal device 200 responds to the input event of the input device.
[0098] It is worth noting that in Figure 1, mouse 102 is a wired mouse, keyboard 101 is a wired keyboard, mouse 104 is a wireless mouse, and keyboard 103 is a wireless keyboard. In practice, all input devices connected to terminal device 100 can be either wired or wireless, and this embodiment of the application does not limit this.
[0099] After input devices such as the mouse 104 and the keyboard 103 are connected to the terminal device 100 , the user can input content to the terminal device 100 through the mouse 104 and the keyboard 103 .
[0100] FIG1 takes a laptop computer as an example of a terminal device 100. If the terminal device 100 is a laptop computer with a touch screen function, the input device of the terminal device 100 may also be the input device built into the laptop computer. For example, the laptop computer's touchpad 106 and / or the laptop computer's keyboard 107 may be included. The touchpad 106 is an input device that allows a cursor to be moved by sliding a finger.
[0101] When the terminal device 100 is a mobile phone or tablet computer with touch function, a set of input devices of the terminal device 100 can also be a touch screen of the mobile phone or tablet computer, with the help of which the user can input text, characters and other content into the mobile phone or tablet computer.
[0102] In some embodiments of the present application, terminal device 100 and terminal device 200 may also have an output device for displaying data or information on the terminal device in the form of numbers, characters, images, sounds, etc. For example, the output device may be a voice output device or a display. The display is used to output content input by a user into terminal device 100 or terminal device 200 via an input device. For example, as shown in FIG1 , the display of terminal device 100 may be display screen 105. The display of terminal device 200 may be display screen 201.
[0103] In the embodiment of the present application, the terminal device 200 may be a terminal device configured with at least one set of input devices, that is, at least one set of input devices is connected to the terminal device 200. For example, as shown in FIG1 , the terminal device 200 is configured with a keyboard 202.
[0104] In some embodiments of the present application, the terminal device 200 may also be a terminal device that is not configured with any input device. That is, the terminal device 200 is not connected to any input device. Regardless of whether the terminal device 200 is configured with an input device, the terminal device 200 supports sharing a set of input devices with the terminal device 100, that is, the terminal device 200 supports switching the focus of the input device of other terminal devices to the terminal device 200.
[0105] In some embodiments of the present application, the second communication connection is used for the terminal device 100 and the terminal device 200 to transmit control signaling or data to each other. The second communication connection can be a communication connection established between the terminal device 100 and the terminal device 200, which is dedicated to transmitting content related to the shared input device. Of course, the second communication connection can also be an ordinary communication connection, that is, it can be used not only to transmit content related to the shared input device between the terminal device 100 and the terminal device 200, but also to transmit other messages or data, such as files sent by the terminal device 100 to the terminal device 200. For example, the control signaling can be a focus return request and / or focus migration request transmitted by the terminal device 100 to the terminal device 200. Among them, the focus return request is used to request to switch the focus of the shared input device back to the terminal device 100. The focus migration request is used to request to switch the focus of the input device of the terminal device 100 to the terminal device 200. When the focus of the mouse 104 and / or keyboard 103 is switched from the terminal device 100 to the terminal device 200, the focus return request is used to request that the focus of the mouse 104 and / or keyboard 103 be switched back to the terminal device 100. The focus transfer request is used to request that the focus of the mouse 104 and / or keyboard 103 be switched to the terminal device 200, which is not limited in the embodiments of the present application. In this way, the focus of the mouse 104 and / or keyboard 103 can be switched between the terminal device 100 and the terminal device 200, so that the terminal device 100 and the terminal device 200 can share a set of input devices for input.
[0106] For example, in some embodiments, the data transmitted between terminal device 100 and terminal device 200 may be input events of the mouse 104 detected by terminal device 100 and transmitted to terminal device 200 by terminal device 100 when the mouse 104 and / or keyboard 107 pass through terminal device 200. For example, terminal device 100 may detect a large displacement signal or click signal of the mouse 104 as an input event and / or a signal of a user pressing a key on the keyboard 107 as an input event and send it to terminal device 200 via the second communication connection. After receiving the message sent by terminal device 100, terminal device 200 may display a mouse pointer (i.e., cursor 203) on display screen 201 or respond accordingly to the input event of the mouse 104 and / or keyboard 107. Therefore, the user can perform input operations on terminal device 200 by using the mouse 104 and / or keyboard 107 of terminal device 100. This enables terminal device 100 and terminal device 200 to share a set of input devices, eliminating the need for terminal device 200 to be equipped with a separate input device.
[0107] In the embodiment of the present application, the second communication connection established by the terminal device 100 and the terminal device 200 can be a wired communication connection (such as a USB connection) or a wireless communication connection. Such as a Bluetooth (BT) connection, a Wi-Fi connection, an NFC connection, etc., the embodiment of the present application does not limit the type of the second communication connection. The communication reliability between the two terminal devices via a wired communication connection is higher. However, it is relatively convenient to connect the two terminal devices via wireless communication.
[0108] The terminal devices 100 and 200 may include a Bluetooth module and / or a wireless local area network (WLAN) module and / or an NFC module. The Bluetooth module may provide solutions for one or more Bluetooth communications, including classic Bluetooth (Bluetooth 2.1) or Bluetooth low energy (BLE), and the WLAN module may provide solutions for one or more WLAN communications, including wireless fidelity peer to peer (Wi-Fi P2P), wireless fidelity local area networks (Wi-Fi LAN), or wireless fidelity software access point (Wi-Fi softAP).
[0109] In some embodiments, the second communication connection can be Wi-Fi P2P. Wi-Fi P2P allows devices in a wireless network to connect to each other in a point-to-point manner without going through a wireless router. In the system, it can also be called wireless fidelity direct (Wi-Fi direct). Devices that establish a Wi-Fi P2P connection can exchange data directly through Wi-Fi (must be in the same frequency band) without connecting to a network or hotspot, achieving point-to-point communication, such as transferring files, pictures, videos, and other data. Compared with Bluetooth, Wi-Fi P2P has advantages such as faster search and transmission speeds and longer transmission distances.
[0110] Please refer to Figure 2, which shows a schematic diagram of the hardware structure of a terminal device provided in an embodiment of the present application. As shown in Figure 2, the terminal device may include a processor 210, a memory (including an external memory interface 220 and an internal memory 221), a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a communication module 250, an audio module 260, a speaker 260A, a receiver 260B, a microphone 260C, an earphone interface 260D, a sensor module 280, a camera 293, a display screen 294, etc.
[0111] Optionally, the terminal device may also include components such as buttons, motors, and indicators, which are not limited in the embodiments of the present application.
[0112] It should be understood that the structures illustrated in the embodiments of the present invention do not constitute specific limitations on the terminal device. In other embodiments of the present application, the terminal device may include more or fewer components than shown, or some components may be combined, separated, or arranged differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. The processor 210 may include one or more processing units. For example, the processor 210 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a flight controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors. The processor 210 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. This memory may store instructions or data that have just been used or are being recycled by the processor 210. If the processor 210 needs to use the instruction or data again, it can directly call it from the memory. Repeated access is avoided, the waiting time of the processor 210 is reduced, and the efficiency of the system is improved.
[0113] In the embodiment of the present application, the processor 210 may include one or more microcontrollers (MCUs) to be responsible for the coordinated scheduling of all other modules / timing / transactions related to the migration of the input device.
[0114] In some embodiments, the processor 210 may include one or more interfaces. The interfaces may include an inter integrated circuit (I2C) interface, an inter integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0115] The charging management module 240 is configured to receive charging input from a charger. The power management module 241 is configured to connect the battery 242, the charging management module 240, and the processor 210. The power management module 241 receives input from the battery 242 and / or the charging management module 240 to power the processor 210, the internal memory 221, the display 294, the camera 293, and the communication module 250.
[0116] The wireless communication function of the terminal device can be implemented through antenna 1, antenna 2, communication module 250, modem processor and baseband processor.
[0117] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in a terminal device can cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network.
[0118] In other embodiments, the antenna can be used in conjunction with a tuning switch. Communication module 250 may include at least one filter, a switch, a power amplifier, a low-noise amplifier (LNA), and the like. Communication module 250 can receive electromagnetic waves from antenna 1, filter and amplify the received electromagnetic waves, and transmit them to a modem processor for demodulation. Communication module 250 can also amplify the signals modulated by the modem processor and convert them into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some of the functional modules of communication module 250 may be located within processor 210.
[0119] In some embodiments, at least some functional modules of the communication module 250 and at least some modules of the processor 210 may be provided in the same device.
[0120] In some embodiments, the communication module 250 can also provide wireless communication solutions for application on terminal devices, including WLAN (such as Wi-Fi network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc.
[0121] Communication module 250 can be one or more devices that integrate at least one communication processing module. Communication module 250 receives electromagnetic waves via antenna 2, frequency-modulates and filters the electromagnetic wave signals, and transmits the processed signals to processor 210. Communication module 250 can also receive signals to be transmitted from processor 210, frequency-modulate and amplify them, and then convert them into electromagnetic waves for radiation via antenna 2.
[0122] In an embodiment of the present application, the communication module 250 may include a Bluetooth module. The Bluetooth module may be responsible for sending Bluetooth messages to enable interaction with multiple input devices based on a Bluetooth connection. The communication module 250 may include an NFC module. The NFC module is used to enable interaction with input devices or other terminal devices based on an NFC connection. The communication module 250 may include a Wi-Fi module to provide the terminal device with network access that complies with Wi-Fi-related standard protocols. The terminal device can access a Wi-Fi access point through the Wi-Fi module, thereby helping the user send and receive emails, browse the web, and access streaming media, etc., providing the user with wireless broadband Internet access. In some other embodiments, the Wi-Fi module may also serve as a Wi-Fi wireless access point to provide Wi-Fi network access for other terminal devices. Of course, the terminal device may also establish a communication connection with other terminal devices using the Wi-Fi module, such as establishing a first communication connection with an input device or a second communication connection with another terminal device.
[0123] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 260A, the receiver 260B, etc.) or displays an image or video through the display screen 294. In some embodiments, the modem processor may be a standalone device.
[0124] In other embodiments, the modem processor may be independent of the processor 210 and provided in the same device as the communication module 250 or other functional modules.
[0125] In an embodiment of the present application, the terminal device can communicate with other terminal devices based on the communication module 250, antenna 1 and / or antenna 2, for example, send control instructions to other terminal devices.
[0126] In some embodiments, antenna 1 of the terminal device is coupled to communication module 250, and antenna 2 is coupled to communication module 250, so that the terminal device can communicate with a network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time division code division multiple access (TD SCDMA), long term evolution (LTE), new radio (NR), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite-based augmentation system (SBAS), etc.
[0127] The terminal device implements display functionality through a GPU, display screen 294, and an application processor. The GPU is a microprocessor for image processing that connects the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 210 may include one or more GPUs that execute program instructions to generate or modify display information.
[0128] Display screen 294 is used to display images, videos, etc. Display screen 294 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light emitting diode (OLED), an active matrix organic light emitting diode (AMOLED), a flexible light emitting diode (FLED), a MiniLED, a MicroLED, a Micro oLed, or a quantum dot light emitting diode (QLED).
[0129] In an embodiment of the present application, the terminal device can perform interface rendering through a GPU, display the interface through a display screen 294, and the like.
[0130] For example, in the embodiment of the present application, the interface displayed on the display screen 294 may include a cursor and characters input by an input device, etc.
[0131] The terminal device can realize the shooting function through the ISP, camera 293, video codec, GPU, display 294 and application processor.
[0132] The external memory interface 220 can be used to connect an external memory card, such as a micro storage card (SD card), to expand the storage capacity of the terminal device. The external memory card communicates with the processor 210 via the external memory interface 220 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0133] Internal memory 221 can be used to store executable program code of computer programs. For example, computer programs can include operating system programs and application programs. The operating system can include but is not limited to OS and other operating systems. Among them, the executable program code includes instructions. The internal memory 221 may include a program storage area and a data storage area. Among them, the program storage area can store the operating system, at least one application required for a function, etc. The data storage area can store data created during the use of the terminal device (such as application data, user data, etc.). In addition, the internal memory 221 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 210 executes various functional applications and data processing of the terminal device by running instructions stored in the internal memory 221 and / or instructions stored in a memory provided in the processor.
[0134] The sensor module 280 can sense user operations, such as the user touching the touch panel of the terminal device, clicking, sliding, the user approaching the screen, etc.
[0135] The terminal device can implement audio functions such as music playback and recording through the audio module 260, speaker 260A, receiver 260B, microphone 260C, and application processor. For the specific working principles and functions of the audio module 260, speaker 260A, receiver 260B, and microphone 260C, please refer to the description in conventional technology.
[0136] Keys include power buttons, volume buttons, and more. Keys can be mechanical or touch-sensitive. The terminal device receives key input and generates key signal input related to user settings and function control of the terminal device.
[0137] It should be noted that the hardware modules included in the terminal device shown in FIG2 are merely illustrative descriptions and do not limit the specific structure of the terminal device.
[0138] In an embodiment of the present application, the input device may include but is not limited to a wired mouse, a wired keyboard, a wireless mouse, a wireless keyboard, a wireless trackball, a wireless touchpad, a wireless stylus, a wired pen, a wireless pen, a smart wearable device (such as a smart watch, a smart bracelet, smart glasses, a phone watch, etc.), a wireless headset, a gaming peripheral, etc., or any other device that can provide input to the terminal device, and the embodiment of the present application is not limited.
[0139] Please refer to Figure 3, which shows a block diagram of the input device provided by an embodiment of the present application. As shown in Figure 3, the input device 300 may include: a bus 370, an input module 310, a control circuit 320, a power supply 330, a memory component 340, a communication module 350, and a power management module 360.
[0140] The power supply 330 is used to power the input device 300. The power management module 360 can route power directly from the power supply 330 to other components of the input device 300. The power management module 360 can also distribute power from the power supply 330 to other system components (e.g., the control circuit 320, the communication module 350, and the input module 310, or any combination thereof).
[0141] In some embodiments, control circuit 320, power supply 330, memory component 340, communication module 350, and power management module 360 may communicate with each other via bus 370. Input module 310 may be connected to control circuit 320 and power management module 360 independently.
[0142] In some embodiments, the input module 310 can be connected to other modules via a bus 370 .
[0143] In some embodiments, input module 310 may be configured to receive input from a plurality of key input elements or devices.
[0144] In some embodiments, the input module 310 is operable to receive input in response to a user pressing the following components, including: keys (such as letter keys, function keys (such as volume keys, exit keys, mute keys, shift keys, etc.), number keys or numeric keypad keys, operating system selection keys, right mouse button, left mouse button, etc.), or other appropriate input elements or devices such as media control buttons, voice over internet phone (VOIP) buttons, touch sensors (such as touchpads, touch pins), etc.
[0145] The input module 310 can generate character data associated with the pressed key input element and send the character data to the control circuit 320 .
[0146] For example, if the input device 300 is a keyboard, the input module 310 may include keyboard keys; if the input device 300 is a mouse, the input module 310 may include a mouse sensor and a cursor module, wherein the cursor module is responsible for mouse cursor movement and input. In the embodiments of the present application, the key code sent by the input device 300 to the terminal device depends on the operating system running on the terminal device. The behavior of the input device 300 depends on the operating system. The different key codes corresponding to the multiple key input elements may be specific to the operating system.
[0147] In some embodiments, the control circuit 320 may include one or more microprocessors, and the control circuit 320 may be configured to control the operation of the input device 300. The control circuit 320 may be responsible for coordinating the scheduling of all other modules / timing / transactions, managing the configuration information of the input device 300, managing the focus migration of the input device 300, etc.
[0148] In some embodiments, the control circuit 320 may include one or more MCUs, digital signal processors (DSPs), field programmable gate arrays (FPGAs), programmable logic devices (PLDs), etc. that support hardware / firmware (e.g., memory, programmable input / output (I / O), etc.).
[0149] The memory component 340 may be configured to store data. In some embodiments, the data may include connection data and pairing data, the connection data and pairing data including, for example, the address of the selected terminal device. In some embodiments, the memory component 340 may be a non-volatile memory.
[0150] The communication module 350 can be configured to provide I / O capabilities to the input device 300. For example, the communication module 350 can route data from the input module 310 to the terminal device via a wireless connection, and route data from the terminal device to the input module 310. The wireless connection can be a Bluetooth connection or a communication connection based on any other wireless standard or a dedicated wireless network protocol. Exemplarily, the communication module 350 can be a wired communication module and / or a wireless communication module. The wireless communication module is used to support wireless connection between the input device 300 and the terminal device. For example, the wireless communication module includes a Bluetooth module or an NFC module. The Bluetooth module can be responsible for sending Bluetooth messages to realize Bluetooth connection interaction with multiple terminal devices. The wired communication module is used to realize a wired connection between the input device 300 and the terminal device. For example, a USB connection, which is not limited in the embodiments of the present application.
[0151] It should be noted that the structure of the input device 300 shown in Figure 3 is merely an exemplary description and does not limit the specific structure of the input device 300. The structures of the first input device and the second input device in the embodiment of the present application can refer to the description of Figure 3.
[0152] The following takes the communication system 10 composed of the terminal device 100 and the terminal device 200 as an example to illustrate the system software structure provided in the embodiment of the present application.
[0153] Figure 4 is a block diagram of the system software architecture of the communication system 10 provided in an embodiment of the present application. As shown in Figure 4, the software architecture of the communication system 10 includes a terminal device 100 and a terminal device 200, and a second communication connection can be established between the terminal device 100 and the terminal device 200 to communicate via the second communication connection.
[0154] In some embodiments, the software architecture of the communication system 10 can be divided into an application & kernel layer and a device layer, wherein the application layer can include a series of application packages.
[0155] Taking the terminal device 100 as a laptop computer as an example, the input device of the terminal device 100 may be a mouse 102, a mouse 104, a keyboard 101, a keyboard 103, etc. Taking the terminal device 200 as a PC as an example, when the terminal device 200 is configured with at least one input device such as a keyboard 201, the input device of the terminal device 200 may be the keyboard 201. Of course, the terminal device 200 may not have an input device, or the terminal device 200 may be a device with a touch screen, and the embodiments of the present application are not limited to this.
[0156] The device layer of terminal device 100 may include input / output devices such as display screen 105, mouse 102, mouse 104, keyboard 101, and keyboard 103. Display screen 105 is an output device used to display images, videos, and the like. Display screen 105 includes a display panel. Terminal device 100 may include one or more display screens, where N is an integer greater than 1.
[0157] Mouse 102 / 104 is an input device that indicates the vertical and horizontal coordinates of the display system of terminal device 100. Using a mouse can make the operation of terminal device 100 simpler and faster. Mouse types include roller ball mice, optical mice, wireless mice, wired mice, etc. In this application, a mouse can be expanded to any device that can generate a cursor and perform clicks.
[0158] The keyboard 101 / keyboard 103 is an input device, and a user can input characters, numbers, punctuation marks, control instructions, etc. to the terminal device 100 through the keyboard.
[0159] The application and kernel layer of the terminal device 100 may include a display driver 414, one or more mouse drivers 415, one or more keyboard drivers 416, and the like. The driver can communicate with the hardware device via the bus, control the hardware to enter various operating states, obtain the values of device-related registers, and thus obtain the device status. For example, the driver can obtain user operation events such as mouse input, keyboard input, and rotating the terminal device, and convert the events into data. The display driver 414 can be a program used to drive the display.
[0160] The mouse driver 415 is responsible for completing the following three tasks: first, displaying the mouse cursor on the screen and maintaining the movement of the cursor; second, providing the application with the status of the mouse, which includes the position of the mouse cursor on the screen and whether the various mouse buttons are pressed or released; and third, providing the application with some auxiliary functions for mouse operations.
[0161] The keyboard driver 416 is an interrupt program that generates a scan code based on the pressed key, then derives the American Standard Code for Information Interchange (ASCII) from the scan code, and then places the scan code into a buffer queue for output or other calls. The application and kernel layer of the terminal device 100 may also include an input event detection module 410, an input event generation module 411, an input event determination module 412, an input event sending module 413, and an input event response module 414.
[0162] The input event detection module 410 is used to detect input events collected by an input device.
[0163] The input event determination module 412 is used to determine whether the input event collected by the input device is a preset event. For example, in some embodiments, the input event determination module 412 of the terminal device 100 is used to determine whether the input event of the mouse 102 or keyboard 101 is a preset event when the focus of the mouse 104 is switched to the terminal device 200. If the input event of the mouse 102 or keyboard 101 is a preset event, the input event response module 414 is used to switch the focus of the mouse 104 back to the terminal device 100. The input event sending module 413 is also used to send the input event of the mouse 104 detected by the input event detection module 410 to the terminal device 200 when the focus of the mouse 104 is switched to the terminal device 200, so that the terminal device 200 can respond to the input event of the mouse 104.
[0164] Optionally, the terminal device 100 may further include an input event generation module 411, wherein the input event generation module 411 may be configured to convert the input events of the input devices acquired by the input event detection module 410 into corresponding input events that can act on the terminal device 200. For example, when detecting that the mouse pointer has reached the edge of the display screen of the terminal device 100, the terminal device 100 may calculate the starting position of the mouse pointer displayed on the display screen of the terminal device 200 and send the position to the terminal device 200 via the input event sending module 413. The terminal device 200 receives the message and displays the mouse pointer at the corresponding position, creating a visual effect of the mouse pointer moving from the terminal device 100 to the terminal device 200. For example, after the mouse pointer moves to the display screen of the terminal device 200, the input events of the input devices (such as a mouse, keyboard, and handwriting tablet) of the terminal device 100 will be captured, and then corresponding input events that can act on the terminal device 200 will be generated and sent to the terminal device 200. Among them, input events include but are not limited to mouse movement events, mouse click events, mouse wheel scrolling events, keyboard input events, remote control handle movement events, voice input events, etc. For example, the terminal device 100 can map the system's input events to the system's input events according to the first mapping table, and the system's input events can act on the terminal device 200. For example, the event of clicking the left mouse button on the system can be mapped to a single-click event in the system, and the event of clicking the right mouse button on the system can be mapped to a long press event in the system. The key value of the first button in the system can be mapped to the corresponding key value in the system. For example, the same character "a" may have a different key code in the system than in the system. The input event sending module 413 can be used by the terminal device 100 to send input events, etc. to the terminal device 200 through the second communication connection.
[0165] The device layer of the terminal device 200 may include a display screen 201. Optionally, the device layer of the terminal device 200 may also include a keyboard 201. Of course, when the terminal device 200 is a mobile phone or tablet computer with touch functionality, the device layer of the terminal device 200 may also include a touch sensor, also known as a "touch panel." The touch sensor may be disposed above the display screen 201, and the touch sensor and the display screen 201 form a touch screen, also known as a "touch screen." The touch sensor is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor may transmit the detected touch operations to the application processor to determine the type of touch event.
[0166] The display screen 201 is an output device that can be used to display images and colors. The display screen 201 can also provide visual output related to touch operations.
[0167] The application and kernel layer of the terminal device 200 may include a display driver 423, an input event receiving module 421, and an input event response module 422. The display driver 423 is a program that drives the touch sensor and display screen of the hardware device. Optionally, the application and kernel layer of the terminal device 200 may also include a mouse driver 424 and a keyboard driver 425. The specific functions can be found in the above description and will not be repeated here.
[0168] The input event receiving module 421 can be used to detect the communication interface and obtain messages sent by the terminal device 100 through the second communication connection, including but not limited to instructions for displaying the mouse pointer, the absolute coordinates of the mouse pointer, the offset coordinates of the mouse pointer, mouse button pressing events, mouse wheel scrolling events, keyboard button pressing events, key values corresponding to keyboard buttons, etc.
[0169] The input event response module 422 can be used to process input events after the input event receiving module 421 receives a message from the terminal device 100. For example, when the input event receiving module 421 receives a message from the terminal device 100 carrying the coordinates (padX, padY) to display the mouse pointer, the input event response module 422 can respond to the message by drawing the mouse pointer at the coordinates (padX, padY) and displaying it on the display screen 201. For another example, after the input event receiving module 421 receives an input event from the terminal device 100 such as mouse movement, mouse click, mouse wheel scrolling, keyboard input, remote control handle movement, etc., the input event response module 422 can process the input event.
[0170] The above introduction to the software architecture of the communication system 10 is only an example. It should be understood that the software architecture illustrated in the embodiment of the present application does not constitute a specific limitation to the present application.
[0171] In other embodiments of the present application, the communication system 10 may include more or fewer modules than shown, or combine or split some modules, or have different architectural arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0172] In the following description, the terminal device 100 is a laptop computer, the terminal device 200 is a PC, and the laptop computer is configured with a keyboard 101, a mouse 102, a keyboard 103, and a mouse 104 as shown in Figure 1. The laptop computer can switch the focus of any input device among the keyboard 101, the mouse 102, the keyboard 103, and the mouse 104 to the PC based on the user's operation. For example, the user operates the mouse 102 to move so that the laptop computer controls the cursor to move on the display screen of the laptop computer. When the laptop computer detects that the cursor of the laptop computer moves to a specified position of the display screen of the laptop computer (such as the edge of the screen), the focus of the mouse 102 can be switched to the PC if there is a communication connection between the laptop computer and the PC. Or if the laptop computer detects that an event of any input device among the keyboard 101, the mouse 102, the keyboard 103, and the mouse 104 is a target event, the focus of the any input device is switched to the PC, or an interface as shown in Figure 5A is displayed. For example, a user presses key 1 and key 2 on keyboard 101, and the laptop detects an input event of keyboard 101. If the input event is a target event, the laptop switches the focus of keyboard 101, or the focus of keyboard 101 and mouse 102 (mouse 104) to the PC. For example, the target event can be pressing a specified key on the keyboard, or clicking the left or right button of the mouse multiple times in a row. It can be understood that the target event here is different from the preset event described below. One is for a user to trigger the focus of the input device to switch from the laptop to the PC, and the other is for triggering the focus of the input device to switch from the PC back to the laptop. For example, both the target event and the preset event are keyboard events. Taking the target event as the simultaneous pressing of the "ALT" key and the "U" key as an example, the preset event can be the simultaneous pressing of the "ALT" key and the "V" key.
[0173] The following describes how to switch the focus of the second input device (such as keyboard 103 and / or mouse 104) of the notebook computer to the PC with reference to FIG. 5A to FIG. 5C .
[0174] As shown in Figure 5A, Figure 5A is a device management setting interface 501 displayed after the laptop detects the focus switching operation. The device management setting interface 501 shown in Figure 5A may include multiple device lists, such as a shared input device list 502 and other device lists 503. Among them, the shared input device list 502 displays the input devices currently connected to the laptop. For example, "HUAWEI wired keyboard A" (corresponding to keyboard 101), "HUAWEI wired mouse N" (corresponding to mouse 102), "HUAWEI wireless keyboard B" (corresponding to keyboard 103) and "HUAWEI wireless mouse M" (corresponding to mouse 104). Of course, the user can also click "More" to trigger the laptop to display information about other input devices that are connected but not displayed in the current list. In the device management setting interface 501, the user can independently select the input device to be shared as needed. For example, the device management setting interface 501 can also include a sharing control 504 corresponding to each input device. As shown in Figure 5A, the shared controls 504 corresponding to the mouse 102, keyboard 101, mouse 104, and keyboard 103 are not turned on, which means that the focus of the current mouse 102, keyboard 101, mouse 104, and keyboard 103 has not been switched to other terminal devices. For example, when the user chooses to switch the focus of the mouse 104 and keyboard 103 to the PC, the user can operate the mouse to turn on the shared controls 504 corresponding to "HUAWEI Wireless Keyboard B" and "HUAWEI Wireless Mouse M" respectively, so as to switch the focus of the mouse 104 and keyboard 103 to the PC. When the focus of the mouse 104 and keyboard 103 is switched to the PC, the status of the corresponding shared controls of the mouse 104 and keyboard 103 in the device management setting interface 501 is turned on, as shown in Figure 5B.
[0175] Optionally, the shared input device list 502 may further include a delete control 505. When the delete control 505 is triggered, the notebook computer will delete the relevant information of the input device corresponding to the delete control 505, such as the MAC address of the input device.
[0176] It is understandable that the other device list 503 displays information about devices that are detected by the laptop / are currently connected to or have been connected to the laptop, as well as the status of the devices (e.g., paired, connected, or disconnected). As shown in FIG5A , the TV is a device that is paired with the laptop but not connected, so if the focus of the laptop's input device needs to be switched to the TV, a communication connection between the TV and the laptop needs to be established first. The status between mobile phone A and the laptop is disconnected. If the status between desktop computer p and the laptop is connected, the input device can be shared with the laptop, that is, the laptop can switch the focus of the input device to the desktop computer p. Of course, the input device of the desktop computer p can also be shared with the laptop.
[0177] In some embodiments of the present application, the information of all other terminal devices searched by the laptop can be displayed in the other device list 503. The other device list 503 can also display the information of terminal devices that can support focus switching searched by the laptop.
[0178] In some embodiments of the present application, the shared input device list 502 may include information about all input devices currently connected to the laptop computer. For example, if the laptop computer is currently connected to four input devices, namely, keyboard 101, mouse 102, keyboard 103, mouse 104, touchpad 106, and keyboard 107, the shared input device list 502 may include information about keyboard 101, mouse 102, keyboard 103, mouse 104, touchpad 106, and keyboard 107.
[0179] In other embodiments of the present application, the shared input device list 502 may only include information about input devices that support focus transfer. For example, assuming that a laptop computer is connected to a keyboard 101 and a mouse 102, and also has a touchpad 106 and a keyboard 107, but the touchpad 106 and the keyboard 107 do not support focus transfer, the shared input device list 502 may include information about the keyboard 101, the mouse 102, the keyboard 103, and the mouse 104.
[0180] Alternatively, in another possible embodiment of the present application, the shared input device list 502 includes information about all input devices and an indication of whether each input device supports focus transfer. For example, if the mouse 102 and keyboard 101 do not support focus transfer, the status of their corresponding shared controls 504 is disabled. This makes it easier for users to determine whether the corresponding input device does not support focus transfer.
[0181] In one possible implementation of the present application, the laptop computer can obtain the capability information of each input device, that is, whether it supports focus switching, so that the laptop computer can determine the device capable of focus switching based on the capability information of each input device and display it in the shared input device list 502.
[0182] In a possible embodiment of the present application, when the laptop computer detects that the focus of the mouse 104 is switched to the PC, the laptop computer can synchronously switch the focus of one of the keyboards 101 and 103 (such as keyboard 103) to the PC, thereby realizing synchronous switching of the focus of the keyboard and mouse.
[0183] In one possible embodiment of the present application, when a laptop detects that the focus of mouse 104 has been switched to the PC, the laptop may also prompt the user whether to simultaneously switch the keyboard focus to the PC. Based on the user's selection, the laptop may then synchronize the focus of the user-selected keyboard (e.g., keyboard 103) with the PC. As shown in FIG5C , the laptop displays a prompt window 500 for the user to select other input devices to synchronize with. For example, prompt window 500 displays information about input devices other than keyboard 103, as well as controls 508 and 509 corresponding to each input device. The user can select the input device to synchronize with in prompt window 500. For example, if the user uses mouse 102 to click control 508 corresponding to keyboard 103, control 508 will be selected by the laptop, as shown in FIG5C . After selecting, the user can use mouse 102 to click confirm control 506. In response to confirm control 506 being triggered, the laptop confirms that the focus of keyboard 103 has been switched to the PC. Of course, if the user does not wish to switch the focus of other input devices, the user can use mouse 102 to close prompt window 500. For example, the user may operate the mouse 102 to click the exit control 507 to trigger the laptop to close the prompt window 500 .
[0184] For example, if terminal device 100 is a PC and terminal device 200 is a laptop, when the PC detects a user-triggered operation to switch the focus of the PC's input devices to the PC, the PC may, based on the user's operation, switch the focus of some of the multiple input devices to the laptop, while retaining the focus of the remaining input devices. For example, if the PC has two input devices, mouse B and keyboard A, and detects a user instruction to switch the focus of one of mouse B and keyboard A to the laptop, the PC may, by default, retain the focus of the other input device on the PC. As shown in FIG5D , when the PC detects an operation to switch the focus of the PC's input devices to the laptop, the PC displays interface 600 as shown in FIG5D . Interface 600 displays information about the two input devices connected to the PC, such as the names of the wireless keyboard and wireless mouse, connection information, and focus location information. Since the focus of neither the wireless mouse nor the wireless keyboard has been switched to another device, as shown in FIG5D , interface 600 may display the words "Focus on this device" to indicate that the focus of neither the wireless mouse nor the wireless keyboard has been switched to another device. In addition, the interface 600 may also display sharing controls 601 and sharing controls 602 corresponding to the wireless keyboard and wireless mouse, respectively. Since the focus of the wireless mouse and wireless keyboard has not been switched to other devices, the sharing controls 601 and sharing controls 602 in Figure 5D are in the closed state. The user can select the input device to be shared in the interface 600. For example, if the user chooses to share the wireless mouse of the PC with the laptop, the user can use the wireless mouse to operate the PC so that the sharing control 602 corresponding to the wireless mouse is closed, thereby triggering the PC to switch the focus of mouse B to the laptop. The sharing control 602 shown in Figure 5E is in the open state. When the focus of the wireless mouse is switched to other devices, optionally, as shown in Figure 5E, the words "focus crossing" may be displayed in the interface 600 to indicate that the focus of the wireless mouse has been switched to other devices.
[0185] Optionally, since the input devices connected to the PC include a wireless mouse and a wireless keyboard, when the focus of the wireless mouse switches to another device, the PC can also set the state of the shared control 601 corresponding to the wireless keyboard to the disabled sharing state, as shown in Figure 5E. When the state of the shared control 601 corresponding to the wireless keyboard is disabled, the PC will not switch the focus of keyboard A to the other device. This makes it easier for the user to subsequently operate the wireless keyboard to trigger the focus of the wireless mouse to switch back to the PC.
[0186] In one possible implementation of the present application, when the terminal device 100 determines that the focus of an input device A has been switched to the terminal device 200, the terminal device 100 may also record the association between the identification information of the input device A (such as a MAC address or device information) and the identification information of the terminal device 200. This facilitates the terminal device 100 to subsequently detect an input event of the input device A and send the input event of the input device A to the terminal device 200 based on the association. In this way, when the focus of different input devices of the terminal device 100 is switched to different terminal devices, the terminal device to which the focus of each input device is switched can be quickly found. For example, if the focus of the input device A of the laptop is switched to PC1, and the focus of the input device B of the laptop is switched to PC2, the laptop can store the association between the device information of the input device A and the device information of PC1, and store the association between the device information of the input device B and the device information of PC2. If the laptop subsequently detects an input event of the input device B, it can determine to send the input event of the input device B to PC2 based on the association.
[0187] Optionally, if the terminal device 100 switches the focus of input device A from terminal device 200 back to terminal device 100, the terminal device 100 can delete the association between the identification information of input device A (such as MAC address) and the identification information of terminal device 200, or set the association to an unavailable state.
[0188] In a possible embodiment of the present application, when the terminal device 100 has more than three input devices, at least two of the three or more input devices are of different types. For example, a laptop computer has two mice and one keyboard. When the laptop computer detects an operation triggered by the user to switch the focus of the mouse to the PC, the laptop computer can automatically switch the focus of one of the keyboards to the PC, or output a prompt message to prompt the user to select which keyboard to switch the focus to the PC. Then, based on the user's operation, the focus of the keyboard selected by the user is switched to the PC, or if the user does not make any selection, the laptop computer automatically switches the focus of one of the keyboards to the PC, or does not switch the focus of the keyboard.
[0189] Optionally, before the laptop computer chooses to synchronously switch the keyboard focus to the PC, the laptop computer may further output a prompt message to prompt the user whether to perform the keyboard and mouse synchronous switching. If the user indicates that the keyboard and mouse synchronous switching is permitted, the laptop computer switches both the mouse and keyboard focus to the PC. If the user indicates that the keyboard and mouse synchronous switching is not permitted, the laptop computer switches the mouse focus to the PC.
[0190] Figure 6 is a schematic diagram illustrating the PC responding to a click event of mouse 104 after the focus of mouse 104 switches from the laptop to the PC. Following the process illustrated in Figures 5A to 5E , the focus of mouse 104 switches from the laptop to the PC, and a cursor 203 appears on the PC's display interface. As shown in Figure 6 (A), the user can manipulate the laptop's second input device (e.g., mouse 104) to cause the laptop to detect the input event from mouse 104. The laptop then transmits the input event from mouse 104 to the PC via a communication connection with the PC. The PC responds after receiving the input event from the laptop's mouse 104. For example, as shown in Figure 6 (B), the user can manipulate mouse 104 to move cursor 203 from its current position to the "Picture" icon 205 displayed on the PC's main interface 204. The user can then manipulate mouse 104 to trigger the PC to open the "Picture" icon 205 displayed on the PC's main interface 204. Specifically, the user can move mouse 104. After the laptop detects the movement of mouse 104, it reports the movement as an input event to the PC. Then, in response to the movement operation, the PC controls the cursor 203 to move to the "picture" icon 205 displayed on the main interface 204. The user can then click the mouse 104. After the laptop detects the click operation of the mouse 104, the click operation can be reported to the PC as an input event. Then, in response to the click operation, the PC opens the picture and displays the corresponding picture interface 206, as shown in Figure (C) in Figure 6. Afterwards, the user can also operate the mouse 104 to zoom in, zoom out, close, change pictures, and other operations on the picture interface 206. Alternatively, the mouse 104 can be operated to control the PC to close the picture interface 206, which is not limited in this embodiment of the present application.
[0191] It is understood that FIG6 takes the terminal device 200 as a PC as an example. If the terminal device 200 is a device that cannot recognize mouse operations (such as a mobile phone), the notebook computer 100 is further configured to convert movement operations into movement events that can be recognized by the mobile phone and send them to the mobile phone. Alternatively, the notebook computer 100 is configured to convert click operations into click events that can be recognized by the mobile phone and send them to the mobile phone.
[0192] Of course, when the mouse 104 passes from the laptop to the PC, if the keyboard 103 also passes from the laptop to the PC, then the PC can not only input content with the help of the mouse 104 but also input characters with the help of the keyboard 103. The specific process is shown in Figure 7.
[0193] Figure 7 illustrates a PC responding to keyboard 103 input events. In Figure 7, a second communication connection exists between the PC and the laptop computer, a first communication connection exists between the keyboard 103 and / or mouse 104 and the laptop computer, and the focus of the keyboard 103 and / or mouse 104 is the PC. In this scenario, the PC can receive and respond to keyboard 103 and / or mouse 104 input events detected by the laptop computer.
[0194] As shown in Figure 7 (A), the PC displays an application interface 206. After the user operates the mouse 104 to move the cursor 203 to click on the dialog box 207, the user can operate the keyboard 103 to input content in the dialog box 207. For example, the user presses a first key on the keyboard 103. After the laptop detects the press of the first key, it can send a first message to the PC via the second communication connection. This first message includes the key value of the first key (i.e., an input event from the keyboard 103). After receiving the first message from the laptop, the PC can display the corresponding characters in the dialog box 207. As shown in Figure 7 (B), the user presses the key corresponding to the string "keyi" on the keyboard 103. The laptop sends the key value corresponding to the string "keyi" as an input event to the PC. In response to the input event, the PC displays the string "keyi" in the dialog box 207. Alternatively, in addition to characters, the PC can also respond to input events such as keyboard control key commands, such as "enter" or the spacebar. As shown in Figure (C) of Figure 7, the user presses the space bar on the keyboard 103. The laptop detects the space bar being pressed and feeds back the key value corresponding to the space bar as an input event to the PC. In response to the space bar being pressed, the PC types the word "OK" in the dialog box. The user can then operate the mouse 104 so that the PC controls the cursor 203 to move to the send control on the interface. The user can then click the mouse 104 to trigger the PC to send "OK". Of course, in addition to inputting the space bar to the PC on the keyboard 103, the user can also input numeric key commands, such as "1", which is not limited in this embodiment.
[0195] As shown in Figure 8, Figure 8 is a schematic diagram of a laptop computer responding to an input event from the keyboard 101 (i.e., an unshared input device (corresponding to the second input device)). When a user needs to switch the focus of the keyboard 103 and / or mouse 104 back to the laptop computer, the user can tap at least one key on the keyboard 101, or the user can tap multiple keys on the keyboard 101 simultaneously. When the laptop computer detects that at least one key or multiple keys are triggered simultaneously, the laptop computer determines whether the at least one key or multiple keys triggered simultaneously by the user are preset events. If the at least one key or multiple keys triggered simultaneously are preset events, the laptop computer switches the focus of the keyboard 103 and / or mouse 104 from the PC back to the laptop computer. If the at least one key or multiple keys triggered simultaneously are not preset events, the laptop computer will not switch the focus of the keyboard 103 and / or mouse 104 from the PC back to the laptop computer. In other words, the laptop computer will still need to feed back the detected input events from the keyboard 103 and / or mouse 104 to the PC. As shown in Figure 8 (A), taking the preset event of a user simultaneously pressing the keys "Ctrl+Alt+X" on the keyboard as an example, if the user simultaneously presses the keys corresponding to the three characters "Ctrl+Alt+X" on the keyboard 101, in response to the key operation, the laptop computer 100 switches the focus of the keyboard 103 and / or mouse 104 from the PC back to the laptop computer. By setting a preset event in the laptop computer, and then determining whether the input event detected from the unshared input device (such as the keyboard 101) is a preset event, if the input event of the unshared input device is a preset event, the laptop computer switches the focus of the shared input device (keyboard 103 and / or mouse 104) back to the laptop computer. In this way, if the user touches the unshared input device inadvertently, causing the laptop computer to detect an input event from the unshared input device, the laptop computer will not be triggered to switch the focus back to the shared input device, thereby reducing the phenomenon of device reset due to accidental touches and improving the user experience.
[0196] Of course, in addition to displaying prompt information in the form of a card, prompt information can also be displayed in the form of a voice prompt or a pop-up window + voice prompt, which is not limited in this embodiment of the present application.
[0197] When the laptop computer detects that an input event of an unshared input device is a preset event or not a preset event, the laptop computer may display a prompt window 801, as shown in FIG8 (A). The prompt window 801 may include a first control 8011 and a second control 8012. If the first control 8011 is triggered, the laptop computer switches the focus of the shared input device (e.g., keyboard 103 and / or mouse 104) back. If the second control 8011 is triggered, the laptop computer does not switch the focus of the shared input device (e.g., keyboard 103 and / or mouse 104) back.
[0198] Optionally, the prompt window 801 may further include countdown prompt information 802 to prompt the user to perform a response operation within the time period included in the countdown prompt information 802 .
[0199] If the laptop detects that the user has not performed any operation within the duration of the countdown prompt information 802, then even if the input event of the unshared input device is a preset event, the laptop will not perform the action of switching the focus of the shared input device (such as keyboard 103 and / or mouse 104) back. If the user has not performed any operation, it means that the user does not currently want to switch the focus of the shared input device back. Alternatively, if the laptop detects that the user has not performed any operation within the duration of the countdown prompt information 802, then if the input event of the unshared input device is a preset event, the laptop will perform the action of switching the focus of the shared input device (such as keyboard 103 and / or mouse 104) back.
[0200] Optionally, when the time duration indicated in countdown prompt information 802 is reached, the laptop computer cancels display of prompt window 801. Of course, the laptop computer may also close prompt window 801 based on a user operation. For example, if the laptop computer detects a user-triggered operation on a close control on prompt window 801, the laptop computer closes prompt window 801.
[0201] When the laptop successfully switches the focus of the keyboard 103 and / or mouse 104 from the PC back to the laptop, the laptop can also output a prompt message to inform the user that the focus of the shared input device has been successfully switched back to the laptop. As shown in Figure 8 (B), the laptop can display a prompt window 803 including the prompt message. This makes it easier for the user to confirm that they can subsequently use the keyboard 103 and / or mouse 104 to input content into the laptop using the prompt message.
[0202] In one possible embodiment of the present application, as shown in FIG8(B), when the focus of the keyboard 103 and / or mouse 104 is switched back from the PC to the laptop, if the laptop detects an input event of the keyboard 103 and / or mouse 104, the laptop responds to the input event. As shown in FIG8(B), taking the example of a user operating the mouse 104 to open a video displayed on the laptop interface, the laptop will detect the opening operation of the mouse 104 as an input event, thereby displaying the playback interface 109 corresponding to the video application on the laptop display interface, as shown in FIG8(C).
[0203] In another embodiment of the present application, the laptop computer may also respond to an input event of the mouse 102 , and when the input event of the mouse 102 is a preset event, the focus of the keyboard 103 and / or the mouse 104 may be switched back to the laptop computer.
[0204] Assume that a user performs a click operation on mouse 102 (e.g., clicking the left mouse button three times in a row, clicking the right mouse button two or three times in a row, long pressing the mouse wheel, clicking the left and right mouse buttons simultaneously, double-clicking simultaneously, or clicking the left and right mouse buttons multiple times). If the laptop detects the click operation of mouse 102 and determines that the input event from mouse 102 is a preset event, the laptop switches the focus of keyboard 103 and / or mouse 104 from the PC back to the laptop. If the input event from mouse 102 is not a preset event, the laptop does not switch the focus of keyboard 103 and / or mouse 104, i.e., the focus of keyboard 103 and / or mouse 104 remains on the PC. For example, if the preset event is the user clicking the left mouse button three times in a row, then in response to the click operation, the laptop switches the focus of keyboard 103 and / or mouse 104 from the PC back to the laptop. If the user clicks the left button of mouse 102 twice in succession, the laptop computer determines that the click operation is not a preset event and maintains the focus of keyboard 103 and / or mouse 104 on the PC. By determining whether the input event captured by mouse 102 is a preset event, only when the input event is a preset event does it indicate that the user has a high subjective intention to switch the focus of keyboard 103 and / or mouse 104 back to the laptop computer. In other words, the operation to switch the focus of keyboard 103 and / or mouse 104 back to the laptop computer was not an accidental touch. Therefore, in this case, the focus of keyboard 103 and / or mouse 104 is switched back to the laptop computer, thus avoiding the focus switching back caused by the user's accidental touch.
[0205] It is worth noting that the preset events set in the laptop computer in the embodiment of the present application can be pre-configured or set by the user, and the embodiment of the present application does not limit this.
[0206] In a possible embodiment of the present application, when the focus of a first input device (such as keyboard 103 or mouse 104) of a laptop computer is switched to a PC, if the laptop computer detects that the input event of the second input device is a preset event, the laptop computer switches the focus of the first input device back to the laptop computer. Alternatively, in some embodiments of the present application, when the laptop computer detects that the input event collected by the second input device is a preset event, a prompt message may be displayed before switching the focus of the first input device back to the laptop computer. The prompt message is used for the user to confirm whether to switch the focus of the input device that has been crossed back.
[0207] As shown in Figure 9, taking the shared input device as keyboard 103 as an example, the laptop displays a prompt window 108 including prompt information on the display interface. The prompt information displayed in prompt window 108 is used to prompt the user whether to switch back to "Huawei keyboard M11" (corresponding to keyboard 103).
[0208] Optionally, the prompt window 108 further includes a first control 1081 and a second control 1082. The triggering of the first control 1081 indicates that the focus of the keyboard 103 is allowed to be switched back. The triggering of the second control 1082 indicates that the focus of the keyboard 103 is not allowed to be switched back. Therefore, in response to the operation of triggering the second control 1082, the laptop computer will not execute the action of switching back the focus of the keyboard 103. In the case where the input event of the second input device is a preset event, by displaying a prompt message to prompt the user whether to switch back the focus of the shared input device, and performing corresponding operations based on the user's operation on the prompt message, the focus switching can be made more in line with the user's intention, misjudgment can be avoided, and the user experience can be improved.
[0209] Optionally, the prompt window 108 may also display a countdown prompt message 1083, which may be used to prompt the user of the available time for operation. If the laptop detects that the user has not triggered any operation on the first control 1081 and the second control 1082 within the time included in the countdown prompt message 1083 (e.g., 5 seconds), the laptop may determine that the user does not need to switch back the focus of the keyboard 103, and thus, even if a preset event of an unshared input device is collected, the action of switching back the focus of the keyboard 103 will not be executed. Optionally, after the time included in the countdown prompt message 1083 is reached, the laptop cancels the display of the prompt window 108.
[0210] In a possible embodiment of the present application, when the focus of multiple first input devices of a laptop computer (such as the keyboard 103 and the mouse 104) are switched to the PC, if the laptop computer detects that the input event of the second input device is a preset event, the laptop computer can simultaneously switch the focus of the keyboard 103 and the mouse 104 back to the laptop computer.
[0211] Optionally, when the focus of multiple input devices (e.g., the first input device) of a laptop computer is switched to the PC, the user may only want to switch the focus of some of the multiple first input devices back to the laptop computer. Therefore, to improve operational flexibility and make the focus switch back more consistent with expectations, when the laptop computer detects that the input event of the second input device is a preset event, as shown in Figure 10, the laptop computer may also output a prompt window 109, which includes a fourth control 1091, a fifth control 1092, and a sixth control 1093. Among them, when the fourth control 1091 is triggered, the focus of the shared input device corresponding to the fourth control 1091 (e.g., keyboard 103) is switched back to the laptop computer. When the fifth control 1092 is triggered, the focus of the shared input device corresponding to the fifth control 1092 (e.g., mouse 104) is switched back to the laptop computer. When the sixth control 1093 is triggered, the focus of all shared input devices (e.g., mouse 104 and keyboard 103) is switched back to the laptop computer. Assuming that the user needs to switch the focus of the mouse 104 back to the laptop, the user can operate the unshared input device such as the mouse 102 to select the fifth control 1092. In response to the operation of triggering the fifth control 1092, the laptop switches the focus of the mouse 104 back to the laptop.
[0212] As shown in Figure 11, Figure 11 shows a scenario where the focus of multiple input devices of a laptop computer is switched to different terminal devices. Assume that the focus of the laptop computer's mouse 104 and keyboard 103 are both switched to PC1, and the focus of the laptop computer's mouse 102 is switched to PC2. That is, the laptop computer's mouse 104, keyboard 103, and mouse 102 are shared input devices. The focus of the laptop computer's keyboard 101 is not switched to any device, that is, the keyboard 101 is an unshared input device. Then, if the laptop computer detects that the input event of the keyboard 101 is a preset event, the laptop computer can switch the focus of the mouse 104 and keyboard 103 from PC1 back to the laptop computer, and switch the focus of the mouse 102 from PC2 back to the laptop computer. This method can achieve one-click switching back to all shared input devices.
[0213] However, in order to further enhance the user experience, the focus of the input device that meets the user's needs is switched back to the laptop computer. As shown in FIG11 , when the input event of the keyboard 101 is a preset event, the laptop computer can also output a prompt interface 1100. The prompt interface 1100 is used to prompt the user to select the shared input device that needs to be switched back, as well as information about the terminal device through which the focus of each shared input device passes. For example, as shown in FIG11 , the prompt interface 1100 includes a first device window 1101, a second device window 1102, and a third device window 1106. Among them, the first device window 1101 is used to display that the focus of the mouse 104 is switched to the DESKTOP-HM11 (i.e., PC1), and the first device window 1101 also includes a focus switch back control 1104. The second device window 1102 is used to display that the focus of the keyboard 103 is switched to the DESKTOP-HM11 (i.e., PC1), and the second device window 1102 also includes a focus switch back control 1105. Third device window 1106 is used to display that the focus of keyboard 101 has switched to DESKTOP-LSM (i.e., PC2). Third device window 1106 also includes a focus switch-back control 1107. When focus switch-back control 1104 is triggered, the laptop switches the focus of mouse 104 from PC1 back to the laptop in response to the triggering of focus switch-back control 1104. When focus switch-back control 1105 is triggered, the laptop switches the focus of keyboard 103 from PC1 back to the laptop in response to the triggering of focus switch-back control 1105. When focus switch-back control 1107 is triggered, the laptop switches the focus of keyboard 101 from PC2 back to the laptop in response to the triggering of focus switch-back control 1107. When focus switch-back control 1103 is triggered, the laptop switches the focus of mouse 104 and keyboard 103 from PC1 back to the laptop, and switches the focus of keyboard 101 from PC2 back to the laptop in response to the triggering of focus switch-back control 1103.
[0214] In one possible embodiment of the present application, the interface shown in FIG11 may further include a one-key switch back control 1110. When one-key switch back control 1110 is triggered, the laptop switches the focus of the mouse 104 and keyboard 103 from PC 1 back to the laptop. Similarly, when one-key switch back control 1111 is triggered, the laptop switches the focus of the keyboard 101 from PC 2 back to the laptop.
[0215] For another example, if the one-key switch back control 1103 is triggered, the laptop will switch to PC2 and the focus of all input devices switched to PC1 will be switched back to the laptop. This approach can achieve one-key switch back to the focus of all shared input devices.
[0216] In a possible embodiment of the present application, when the laptop displays the interface shown in FIG11 , if no user input operation is detected within a preset time (eg, 5 seconds), the laptop will not perform the focus switching back action.
[0217] It is worth noting that when the focus of the first input device, such as the mouse 104, is switched back to the laptop, the PC can independently decide to continue displaying the cursor on the PC interface or cancel the display of the cursor. This embodiment of the present application does not limit this.
[0218] As shown in FIG12 , FIG12 is a flow chart of a method for controlling a shared input device provided in an embodiment of the present application. The method is applied to the communication system shown in FIG1 , wherein the communication system includes a first terminal device, a second terminal device, and at least two input devices (e.g., a first input device and a second input device), wherein the at least two input devices are both connected to the first terminal device. The method includes:
[0219] Step 1201: A second communication connection is established between a first terminal device and a second terminal device.
[0220] In some embodiments, the first terminal device may be the terminal device 100 (such as a PC) shown in FIG1 , and the second terminal device may be the terminal device 200 (such as a PAD, a mobile phone) shown in FIG1 . The first terminal device and the second terminal device establish a communication connection to form a communication system 10. The description of the communication system 10 may refer to the aforementioned embodiment. The first terminal device and the second terminal device may be equipped with OS or other types of operating systems. The operating systems of the first device and the second terminal device can be the same or different, and this application does not impose any restrictions on this.
[0221] The communication connection established between the first device and the second terminal device can be a wireless connection, such as a Bluetooth connection, a Wi-Fi connection, etc., or a wired connection, such as a USB connection, etc. This embodiment does not limit the type of communication connection. This embodiment also does not impose any restrictions on the process of establishing a communication connection. In one implementation, the first terminal device and the second terminal device can establish a communication connection when they touch each other through NFC short-range communication technology. Specifically, the process of establishing a communication connection between the first terminal device and the second terminal device can refer to the description in the prior art, and the embodiment of the present application does not limit this.
[0222] In the embodiments of the present application, the first terminal device can be configured with at least two of the following input devices: a mouse, a keyboard, a handwriting tablet, etc., as the first input device and the second input device. For example, the first input device can be the mouse 102 and the keyboard 101. The second input device can be the mouse 104 and the keyboard 103, although this embodiment of the present application does not limit this.
[0223] The above-mentioned at least two input devices may refer to input peripherals connected to the first terminal device, or may be input components built into the first terminal device, such as a touchpad. In the case where there is an input peripheral among the at least two input devices, the input peripheral may establish a first communication connection with the first terminal device to achieve the purpose of accessing the first terminal device. In the embodiment of the present application, when the focus of either the first input device or the second input device is not switched to the second terminal device, the user may use the first input device or the second input device to operate the first terminal device, that is, the first terminal device responds to the input event of the first input device or the second input device detected.
[0224] The following takes the example of the first terminal device switching the focus of the first input device to the second terminal device according to the user's demand.
[0225] Step 1202: The first terminal device switches the focus of the first input device to the second terminal device.
[0226] After step 1202, since the focus of the first input device is switched to the second terminal device, the second terminal device responds to the input event of the first input device (e.g., the first input event). Specifically, when the focus of the first input device is switched to the second terminal device, since the communication connection between the first terminal device and the first input device is not interrupted, that is, the first input device is still connected to the first terminal device, if the user performs an operation on the first input device, the first terminal device can detect that the first input event of the first input device is sent to the second terminal device via the second communication connection, so that the second terminal device can respond to the first input event of the first input device.
[0227] For example, taking the first input device as a mouse, when the user moves the mouse, the first terminal device can report the detected mouse movement operation as a first input event to the second terminal device, so that the second terminal device can control the cursor to move on the display screen of the second terminal device according to the mouse movement operation.
[0228] For the specific implementation of step 1202, reference may be made to the description in the prior art, and the embodiments of the present application do not limit this.
[0229] The above step 1201 is an optional step. If the first terminal device and the second terminal device already have a communication connection before step 1202, the above step 1201 can be omitted.
[0230] After step 1202, since the focus of the first input device is switched to the second terminal device, the user can use the first input device to operate the second terminal device. The specific process is as follows:
[0231] Step 1203: The first terminal device detects a first input event of the first input device.
[0232] For example, taking the first input device as a mouse, the first input event can be an operation of moving the mouse, clicking the left mouse button, clicking the right mouse button, clicking the middle mouse button, double-clicking the left mouse button, double-clicking the right mouse button, long pressing the left mouse button, long pressing the right mouse button, sliding the mouse wheel, etc. Taking the first input device as a keyboard as an example, the first input event can be an input event such as tapping multiple keys on the keyboard. For example, the user inputs the character "keyi" to the second terminal device using the keyboard. Of course, when the first input device is a voice input device, the first input event can also be voice data collected by the voice input device. When the first input device is a touchpad or a touch screen, the first input event can also be an input event such as a touch and click operation. When the first input device is a stylus, the first input event can also be an event that the user inputs on the touch screen of the first terminal device using the stylus. The embodiments of the present application are not limited to this.
[0233] Step 1204: The first terminal device sends a first input event to the second terminal device through the second communication connection. Correspondingly, the second terminal device receives the first input event from the first terminal device through the second communication connection.
[0234] Step 1205: The second terminal device responds to the first input event.
[0235] For example, playing music in response to a single-click instruction, dragging an icon in response to a long-press instruction, displaying the character corresponding to the first key on the keyboard, and so on.
[0236] It is understandable that the specific implementation of steps 1203 to 1205 can refer to the processes shown in Figures 6 and 7, and will not be repeated here.
[0237] The first terminal device has multiple input devices, and the focus of some of the multiple input devices (such as the first input device) is switched to other terminal devices. For the first terminal device, it can establish an association relationship between the identifiers of the input devices and the other terminal devices. In this way, when the first terminal device detects an input event of the input device, it can determine to which terminal device the input event is sent based on the association relationship. For example, the multiple input devices include mouse 102, mouse 104, keyboard 101 and keyboard 103. The focus of mouse 102 and keyboard 101 is switched to PC1. The first terminal device can associate the identifier of mouse 102 and the identifier of keyboard 101 with PC1. In this way, when an input event of mouse 102 is detected later, it can determine to send the input event collected by mouse 102 to PC1 based on the association relationship. If the focus of keyboard 103 is switched to PC2, the first terminal device can associate the identifier of keyboard 103 with PC2. In this way, when an input event of keyboard 103 is detected later, it can determine to send the input event collected by keyboard 103 to PC2 based on the association relationship.
[0238] When the focus of the first input device switches to the second terminal device, since the focus of the second input device is the first terminal device, the input event of the second input device is responded to by the first terminal device. The following describes the process of the first terminal device controlling the focus of the first input device in conjunction with the input event received by the second input device. Specifically, as shown in Figure 12, after step 1205, the method provided in this embodiment of the application may further include:
[0239] Step 1206: The first terminal device detects a second input event of the second input device.
[0240] Step 1207: The first terminal device determines whether the second input event detected by the second input device is a preset event.
[0241] The second input device is any one of the at least two input devices except the first input device, and can be a mouse, keyboard, stylus, voice input device, or touchpad.
[0242] As an example, the preset event in step 1207 is one or more events stored in the first terminal device for triggering the first terminal device to perform focus switching back. For example, the preset event can be a mouse event or a keyboard event. For example, a mouse event can be a single click or double click of the left or right mouse button, or a single click or multiple consecutive clicks of the left and right mouse buttons at the same time. For another example, the preset event can be three consecutive clicks of the left mouse button, or three consecutive clicks of the right mouse button, or simultaneous clicks of the left and right mouse buttons. For example, a keyboard event refers to a specified key on the keyboard being pressed once or multiple times in succession, or the preset event can be multiple keys on the keyboard being pressed at the same time, such as the three keys "Ctrl+Alt+X" being pressed at the same time.
[0243] In the case where the first terminal device is a laptop computer and the second input device is the touchpad of the laptop computer, the preset event may also be that the laptop computer detects a specified gesture input by the user on the touchpad, such as detecting at least two fingers moving on the touchpad, a single click operation, or continuous multiple click operations. This embodiment of the present application does not limit this.
[0244] In the case where the first terminal device is a tablet computer and the second input device is the touch screen of the tablet computer, the preset event may also be that the tablet computer detects a specified gesture input by the user on the touch screen. For example, it detects at least two fingers touching and clicking or touching the touch screen multiple times in a row. Or for a tablet computer, it usually has a power button and a volume button (volume button + and volume button -). Of course, the power button and volume button can also be used together as the first input device of the tablet computer. For example, if the preset event is that the power button and volume button + are triggered at the same time, then if the tablet computer has an input device shared with other devices, the tablet computer responds to the operation of the power button and volume button + being triggered at the same time, and controls the focus of the second input device of the tablet computer to switch back to the tablet computer.
[0245] In some possible embodiments of the present application, the second input device, such as a keyboard or a mouse, may further include a recall button. When the recall button is pressed, the first terminal device determines that the second input event detected by the second input device is a preset event.
[0246] As an example, the preset event may also be as shown in FIG. 5D and FIG. 5E , where the shared control corresponding to the shared input device is closed.
[0247] In a possible embodiment of the present application, the preset event stored in the first terminal device may be pre-configured in the first terminal device or may be a user-defined setting, which is not limited in the embodiment of the present application.
[0248] Optionally, when the user switches the focus of the input device connected to the first terminal device to other terminal devices (such as the terminal device) for the first time, the first terminal device can remind the user to set the above preset events, or display the preset events currently available in the first terminal device to the user.
[0249] Optionally, the preset event in the embodiments of the present application may include multiple sub-preset input events, such as a first preset event and a second preset event. Assuming that the focus of two first input devices on a first terminal device switches to a second terminal device, the laptop can set a different preset event for each first input device based on user operations. For example, setting a first preset event for one first input device and a second preset event for another input device. In this way, if the first terminal device detects that the input event on the second input device is the first preset event, the first terminal device switches the focus back to the first input device associated with the first preset event. If the first terminal device detects that the input event on the second input device is the second preset event, the first terminal device switches the focus back to the first input device associated with the second input event. Optionally, the preset event may also include a third preset event. If the first terminal device detects that the input event on the second input device is the third preset event, the first terminal device switches the focus of both the first and second input devices back to the first terminal device. If the preset event includes different sub-preset input events, the user can trigger the first terminal device to detect different preset events based on different operations. Thus, when the focus of multiple input devices switches to the second terminal device, the corresponding first input device can be selected based on the input event on the second input device. Makes the operation more flexible.
[0250] Step 1208: When the second input event is a preset event, the first terminal device switches the focus of the first input device from the second terminal device back to the first terminal device.
[0251] Since, in the embodiment of the present application, the first terminal device will only switch the focus of the first input device back to the first terminal device when the second input event of the second input device is a preset event, this can reduce false touches compared to detecting the second input event without making any judgment and directly switching the focus back to the first input device.
[0252] The control method of a shared input device provided in an embodiment of the present application can realize that when the focus of a shared input device (such as a first input device) is switched from a terminal device (such as a first terminal device) to another terminal device (such as a second terminal device) in a communication system, the first terminal device can use the second input event detected by the unshared input device (such as the second input device) to switch the focus of the shared input device back from the second terminal device. Since the present application switches the focus of the first input device back to the first terminal device when the second input event is a preset event. As long as the input event of the unshared input device is not a preset event, it will not trigger the first terminal device to control the focus of the shared input device to return to its original position. Therefore, the phenomenon of accidental return of the input device due to mis-touch can be avoided, thereby improving the user experience. In addition, when the focus of the first input device is the second terminal device, the first terminal device can also transmit the detected first input event of the first input device to the second terminal device for the second terminal device to respond, that is, the purpose of using the first input device of the first terminal device to input information to the second terminal device or control the second terminal device can be achieved.
[0253] In a possible embodiment of the present application, as shown in FIG12 , the method provided in the embodiment of the present application may further include, after step 1207:
[0254] Step 1209: When the second input event is not a preset event, the first terminal device determines that the focus of the first input device continues to be the second terminal device.
[0255] Optionally, for a first terminal device, when the focus of the first input device switches to a second terminal device, if the first terminal device detects that the second input event of the second input device is not a preset event, the first terminal device may discard or ignore the second input event, that is, not respond to the second input event. Alternatively, the first terminal device may respond to the second input event. For example, if the second input event is to open a folder on the first terminal device, the first terminal device responds to the second input event and opens the folder on the first terminal device. Alternatively, if the second input event is to move the cursor on the first terminal device, the first terminal device responds to the second input event and controls the cursor on the first terminal device to move on the display interface of the first terminal device.
[0256] In one possible embodiment of the present application, the method provided in the embodiment of the present application may further include: when the second input event of the second input device is not a preset event, the first terminal device may further display a prompt interface, wherein the prompt interface is used to display the content of the preset event to the user. In this way, when the user needs to switch the focus back to the first input device, he or she can refer to the guidance in the prompt interface to input an operation related to the preset event to the second input device, so that the first terminal device determines that the second input event detected by the second input device is a preset event.
[0257] In a possible embodiment of the present application, as shown in FIG12 , the method provided in the embodiment of the present application may further include, after step 1208:
[0258] Step 1210: The first terminal device detects a third input event of the first input device.
[0259] After the focus of the first input device is switched back to the first terminal device, if the user operates the first input device, the first terminal device can detect a third input event of the first input device.
[0260] Step 1211: The first terminal device responds to a third input event.
[0261] It is understandable that after the focus of the first input device is switched back to the first terminal device, if the first terminal device does not detect an input event of the first input device, then the above steps 1210 to 1211 may be omitted.
[0262] In order to improve the reliability of the system and further reduce the focus switching back of the shared input device due to accidental user touch, when the second input event of the second input device is a preset event, before the first terminal device switches the focus of the first input device back to the first terminal device, the method provided in the embodiment of the present application may also include: the first terminal device outputs a first prompt message. The first prompt message is used to prompt the user whether to switch the focus of the first input device back to the first terminal device. Accordingly, the first terminal device detects the first operation, and the first terminal device switches the focus of the first input device back to the first terminal device. The first operation is used to indicate that the focus of the first input device is switched back to the first terminal device.
[0263] As an example, as shown in FIG8 , the first terminal device may output a prompt card 801 including first prompt information. The prompt card 801 may include an “Agree” control 8011 (corresponding to the first control) and a “Disagree” control 8012. If the first terminal device detects a first operation on the “Agree” control 8011, the focus of the first input device is switched back to the first terminal device. If the first terminal device detects a second operation on the “Disagree” control 8012, the first terminal device will not switch the focus of the first input device back to the first terminal device.
[0264] Combining the preset event and the user's comprehensive judgment of the first prompt information can further prevent accidental touches.
[0265] In one possible embodiment of the present application, when the first terminal device switches the focus of the first input device back to the first terminal device, the first terminal device may further output a prompt message to inform the user that the focus of the first input device has been switched back to the first terminal device. In this way, the user can use the prompt message output by the first terminal device to confirm that they can subsequently use the first input device to operate the first terminal device.
[0266] In one possible embodiment of the present application, before the first terminal device switches the focus of the first input device back to the first terminal device, the method provided in this embodiment of the present application may further include: the first terminal device detecting a third input event of the second input device. If the third input event is not a preset event, the first terminal device maintains the focus of the first input device on the second terminal device.
[0267] As shown in Figure 13, Figure 13 shows another method for controlling a shared input device provided in an embodiment of the present application. The method is applied to a communication system, which includes at least a first terminal device, a second terminal device, and a first input device connected to the first terminal device. A second communication connection exists between the first terminal device and the second terminal device. The focus of the first input device is the second terminal device, that is, the first input device is a shared input device. As shown in Figure 13, the method provided in an embodiment of the present application may also include:
[0268] Step 1301: When the focus of the first input device is on the second terminal device, the first terminal device sends a first focus return request to the second terminal device via a second communication connection. Correspondingly, the second terminal device receives the first focus return request from the first terminal device via the second communication connection.
[0269] The first focus return request is used to request to switch the focus of the first input device back to the first terminal device.
[0270] Optionally, the first focus return request carries a first field, and the first field may serve as a request field to indicate that the first terminal apparatus requests to switch the focus of the first input device back to the first terminal apparatus.
[0271] Optionally, the first focus return request includes identification information of the first input device, which facilitates the second terminal device to determine which input device the first terminal device is requesting to return focus. For example, the identification information of the first input device may be the MAC address of the first input device. This embodiment of the present application is not limited to this.
[0272] Optionally, if there are multiple first input devices, that is, the focus of the multiple first input devices of the first terminal device is switched to the second terminal device, if the first terminal device determines to switch back the focus of all the first input devices, then the first focus return request may include the identification information of each first input device. If the first terminal device determines to switch back the focus of some of the first input devices, then the first focus return request may include the identification information of some of the first input devices.
[0273] As one possible implementation, during the process of a first terminal device switching the focus of a first input device to a second terminal device, the first terminal device may send identification information of the first input device to the second terminal device. Optionally, the first terminal device may also send a mapping relationship between the identification information of the first terminal device and the identification information of the first input device to the second terminal device, thereby facilitating the second terminal device to determine the terminal device from which the first input device originated based on the mapping relationship.
[0274] Taking the communication connection as a Bluetooth communication connection as an example, the first terminal device can send a first focus return request to the second terminal device via the Bluetooth communication connection.
[0275] Step 1302: In response to the first focus return request, the second terminal device determines whether to continue to hold the focus of the first input device.
[0276] After receiving the first focus return request in step 1302 , the second terminal device determines whether it needs to continue to rely on the focus of the first input device. If it needs to continue to rely on the focus of the first input device, the second terminal device executes the following step 1303 .
[0277] If the second terminal device determines that it does not need to continue to rely on the focus of the first input device (which can also be understood as releasing the focus of the first input device), the second terminal device executes the following step 1307.
[0278] In one possible implementation of the present application, when the focus of a first input device is switched to a second terminal device, if the second terminal device can periodically detect input events collected by the first input device at predetermined intervals (e.g., 3 seconds), the second terminal device determines that it is necessary to continue to hold the focus of the first input device. Of course, if the second terminal device determines that it has not received an input event of the first input device sent by the first terminal device within a preset time (e.g., 5 seconds), the second terminal device determines that it is no longer necessary to continue to hold the focus of the first input device.
[0279] In one possible implementation of the present application, when a second terminal device receives a first focus switch-back request from a first terminal device, the second terminal device determines whether the second terminal device is currently in a focus-active state. If the second terminal device is currently in the focus-active state, a migration rejection response is fed back to the first terminal device to indicate a refusal to return the focus of the first input device to its original state.
[0280] When the focus of the first input device is switched to the second terminal device, taking the first input device as a mouse, the operation of the mouse will bring about changes such as the window focus of the second terminal device; for example, when the mouse clicks a text box, the text box will gain focus; at the same time, the window where the text box is located will gain focus. In addition, since the visual interface of the second terminal device is generally composed of various components, and the components can be contained by various visible windows, a typical example is the Android system, which abstracts each user-visible interface into a window; therefore, in order to determine whether the user is indeed in the interaction at this time, there are two judgment conditions: (1) The first input device is active, that is, the second terminal device receives continuous input events of the first input device sent by the first terminal device. (2) There is a control on the second terminal device that is in the interactive activity and needs to hold the focus of the first input device, such as an input control (for example, a textView control) is in the input process.
[0281] In another possible embodiment of the present application, the method provided by the embodiment of the present application may further include: after the second terminal device receives the first focus return request, it outputs a prompt message to prompt the user whether to agree to switch the focus of the first input device back to the first terminal device. If it is detected that the user instructs the operation of switching the focus of the first input device back to the first terminal device, the second terminal device determines that it is not necessary to continue to hold the focus of the first input device. If it is detected that the user indicates that it does not agree to the operation of switching the focus of the first input device back to the first terminal device, the second terminal device determines that it is necessary to continue to hold the focus of the first input device. The accuracy of whether the second terminal device needs to continue to hold the focus of the first input device can be further guaranteed through human-computer interaction.
[0282] Step 1303: The second terminal device sends a migration rejection response to the first terminal device, wherein the migration rejection response is used to indicate that the second terminal device does not release the focus of the first input device, or the migration rejection response is used to indicate that the second terminal device continues to hold the focus of the first input device.
[0283] Optionally, the migration rejection response may carry a second field, where the second field is used to indicate that the second terminal device does not release the focus of the first input device.
[0284] Optionally, the rejection response may also carry identification information of the second terminal device, so that the first terminal device can easily determine which device rejects the focus migration.
[0285] Step 1304: In response to the migration rejection response, the first terminal device maintains the focus of the first input device as the second terminal device.
[0286] In step 1304 , the first terminal device maintaining the focus of the first input device on the second terminal device can be understood as: the first terminal device does not perform an action of switching the focus of the first input device from the second terminal device back to the first terminal device.
[0287] In the above embodiment, since the second terminal device needs to continue to hold the focus of the first input device, the first terminal device does not switch the focus of the first input device from the second terminal device back to the first terminal device. Therefore, the first terminal device still needs to transmit the detected input event of the first input device to the second terminal device for response by the second terminal device until the focus of the first input device is switched back to the first terminal device.
[0288] In a possible embodiment of the present application, when the focus of the first input device is switched to the second terminal device, if the first terminal device detects any input event of the first input device (such as the first input event), the first terminal device sends the detected first input event of the first input device to the second terminal device, so that the second terminal device responds.
[0289] In one possible embodiment of the present application, steps 1301 to 1304 describe a process in which the first terminal device fails to successfully return the focus of the first input device via a first focus return request. In a subsequent process, the first terminal device may still send a focus return request (such as the second focus return request described below) to the second terminal device to request that the focus of the first input device be returned. Optionally, as shown in FIG13 , the following steps may also be performed after step 1304:
[0290] Step 1305: The first terminal device sends a second focus relocation request to the second terminal device. Correspondingly, the second terminal device receives the second focus relocation request from the first terminal device.
[0291] The second focus return request is used to request to return the focus of the first input device. The content of the second focus return request is the same as that of the first focus return request, and this embodiment of the application does not limit this.
[0292] Step 1306: The second terminal device determines whether to continue to hold the focus of the first input device.
[0293] For the specific implementation of step 1306, please refer to the description of step 1302 above, which will not be repeated here.
[0294] Step 1307: When the second terminal device no longer needs to hold the focus of the first input device, the second terminal device sends a focus transfer response to the first terminal device. Correspondingly, the first terminal device receives the focus transfer response from the second terminal device.
[0295] The focus transfer response indicates that the second terminal device releases the focus of the first input device.
[0296] Step 1308: In response to the focus transfer response, the first terminal device switches the focus of the first input device back to the first terminal device.
[0297] For example, after the first terminal device switches the focus of the first input device back to the first terminal device, if the first terminal device detects an input event of the first input device, optionally, as shown in FIG13 , the first terminal device may further execute step 1309 .
[0298] Step 1309: The first terminal device responds to the input event of the first input device.
[0299] In one possible implementation of the present application, the above steps 1301 and 1305 can be implemented in the following manner: when the focus of the first input device is the second terminal device, the first terminal device determines that the focus switching back condition is met, then the first terminal device sends a first focus return request or a second focus return request to the second terminal device through a communication connection.
[0300] The focus switching back condition may be one or more conditions set in the first terminal device for triggering the first terminal device to send a first focus switching back request to the second terminal device.
[0301] The above focus switching back condition can be a user-defined setting or a factory-installed condition of the first terminal device, and this embodiment of the present application does not limit this.
[0302] As an example, the communication system may further include a second input device connected to the first terminal device, with the focus of the second input device being the first terminal device. When the focus of the first input device is the second terminal device, the first terminal device detects an input event (which may be any input event) from the second input device, and the first terminal device determines that the focus switch-back condition is satisfied. For example, if the second input device is a mouse, then if a user accidentally touches the mouse, causing the mouse to move, or if the user clicks the mouse, both of these can be considered as the first terminal device detecting an input event from the second input device. In this case, the first terminal device can determine that the focus switch-back condition is satisfied, and then execute step 1301.
[0303] The input event of the second input device may be any input event or a specified input event, which is not limited in this embodiment of the present application.
[0304] In other embodiments of the present application, to prevent the first terminal device from incorrectly determining that the user has triggered focus switching back due to an accidental touch, when the first terminal device detects that the input event captured by the second input device is a preset event, the first terminal device determines that the focus switching back condition is met and executes step 1301. The specific implementation of this process can be referred to the embodiment shown in Figure 12 above and will not be repeated here.
[0305] In one embodiment of the present application, in order to facilitate the user to know whether the focus of the shared input device is successfully switched back, after the first terminal device receives the transfer rejection response, the method provided in the embodiment of the present application may further include:
[0306] The first terminal device outputs a prompt message, wherein the prompt message is used to indicate that the focus of the first input device has not been successfully switched back to the first terminal device.
[0307] In this way, the user can use this prompt information to confirm that the focus of the first input device is still on the second terminal device. Therefore, the user can continue to use the first input device to input information to the second terminal device, or continue to trigger the second input device to cause the first terminal device to continue to send focus return requests to the second terminal device.
[0308] As shown in Figure 14A, taking the first terminal device as a laptop computer as an example, when the focus of the mouse 104 and keyboard 103 is the PC, assuming that the user wants to switch the focus of the mouse 104 and keyboard 103 back to the laptop computer, the user can use the mouse 102 to trigger the laptop computer to display the input device sharing management interface 1400 as shown in Figure 14A. Multiple device sharing information (such as device sharing information 1401 and device sharing information 1402) are displayed in the input device sharing management interface 1400 to determine which is the focus of each input device. As can be seen from Figure 14A, the focus of the mouse 104 and keyboard 103 are both switched to the same PC1 (i.e., DESKTOP-HM11). The focus of the keyboard 101 is switched to another PC2 (i.e., DESKTOP-LSM). When the user needs to switch back to the focus of the input device, the user can trigger the focus switch back operation in the input device sharing management interface 1400. For example, if a user needs to switch the focus back to keyboard 103, they can use mouse 102 to click focus switch back control 1405. The laptop detects that focus switch back control 1405 has been triggered and sends a first focus switch back request to PC 1, requesting that the focus be switched back to mouse 104. After receiving the first focus switch back request, PC 1 determines that the mouse 104 and keyboard 103 are currently needed for information input, and can then send a focus switch back rejection response to the laptop.
[0309] Optionally, after receiving the focus return rejection response, the laptop computer may display a prompt message 1408 as shown in FIG14B . For example, prompt message 1408 may contain the following content: "Focus return failed." Optionally, as shown in FIG14B , prompt message 1408 may also include a details control 1409 describing the reason for the focus return failure, such as, for example, PC 1 not releasing the focus of mouse 104 and keyboard 103.
[0310] In other embodiments of the present application, since the focus of the laptop computer's mouse 104 and keyboard 103 are both switched to the same PC, when either the focus switch-back control 1405 or the focus switch-back control 1404 shown in FIG14A is triggered, the laptop computer can request that the focus of all input devices switched to the same PC be switched back. For example, when the focus switch-back control 1405 is triggered, the laptop computer sends a first focus switch-back request to the PC to switch the focus of both the mouse 104 and the keyboard 103 back. For example, the first focus switch-back request includes identification information of the mouse 104 and the keyboard 103.
[0311] In other embodiments of the present application, when either focus switch-back control 1405 or focus switch-back control 1404 is triggered, the laptop computer may request to switch back the focus of the input device corresponding to the triggered focus switch-back control. For example, when focus switch-back control 1405 is triggered, the laptop computer may send a first focus switch-back request to the PC requesting to switch back the focus of keyboard 103. For example, the first focus switch-back request may carry identification information of keyboard 103, so that the PC can determine that the laptop computer is requesting to switch back the focus of keyboard 103.
[0312] In another embodiment of the present application, the input device sharing management interface 1400 further includes a one-key switch back control 1403, which is used to trigger the laptop to switch the focus back to all shared input devices. For example, when the laptop detects that the one-key switch back control 1403 is triggered, the laptop sends a first focus switch back request to PC1 requesting the focus of the mouse 104 and keyboard 103 to be switched back, and sends a first focus switch back request to PC2 requesting the focus of the keyboard 101 to be switched back.
[0313] Optionally, to facilitate the user's confirmation that the focus of the first input device has been successfully switched back to the first terminal device, the method provided in an embodiment of the present application can further enable the first terminal device to output a prompt message after the first terminal device switches the focus of the first input device back to the first terminal device, prompting the user that the focus of the first input device has been successfully switched back to the first terminal device. As shown in FIG15 , the first terminal device can display a prompt window 1500 on its interface, which is used to indicate that the focus of the shared input device has been successfully switched back to the first terminal device.
[0314] It is understandable that, in order to implement the functions of any of the above-mentioned embodiments, the terminal device (including the first terminal device and the second terminal device) includes a hardware structure and / or software module corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0315] The embodiment of the present application can divide the terminal device (including the first terminal device and the second terminal device) into functional modules. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0316] For example, in the case of dividing each functional module in an integrated manner, a block diagram of a terminal device provided in an embodiment of the present application is shown in Figure 16. As shown in Figure 16, the terminal device may include a communication unit 1613, a processing unit 1612, and a storage unit 1611.
[0317] The communication unit 1613 is used to support communication between the terminal device and other terminal devices (such as the first terminal device or the second terminal device), and / or other processes related to the embodiments of the present application. The processing unit 1612 is used to support focus migration of the input device, and / or other processes related to the embodiments of the present application. The storage unit 1611 is used to store computer program instructions and related data related to the embodiments of the present application.
[0318] As an example, the communication unit 1613 may include a radio frequency circuit. Specifically, the terminal device may receive and transmit wireless signals via the radio frequency circuit. Typically, the radio frequency circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, and the like. Furthermore, the radio frequency circuit may communicate with other devices via wireless communications. Such wireless communications may utilize any communication standard or protocol, including but not limited to Global System for Mobile Communications, General Packet Radio Service, Code Division Multiple Access, Wideband Code Division Multiple Access, Long Term Evolution, email, and Short Message Service.
[0319] It should be understood that the various modules in the terminal device can be implemented in software and / or hardware, without specific limitation. In other words, the input device is presented in the form of functional modules. The "module" here can refer to an application-specific integrated circuit (ASIC), a circuit, a processor and memory that executes one or more software or firmware programs, an integrated logic circuit, and / or other devices that can provide the above-mentioned functions.
[0320] 17 is a schematic diagram of the structure of a chip 170 provided in an embodiment of the present application. The chip 170 includes one or more (including two) processors 1710 and a communication interface 1730.
[0321] Optionally, the chip 170 further includes a memory 1740, which may include a read-only memory and a random access memory, and provides operation instructions and data to the processor 1710. A portion of the memory 1740 may also include a non-volatile random access memory (NVRAM).
[0322] In some embodiments, the memory 1740 stores the following elements, execution modules or data structures, or a subset thereof, or an extended set thereof.
[0323] In the embodiment of the present application, the corresponding operation is performed by calling the operation instruction stored in the memory 1740 (the operation instruction may be stored in the operating system).
[0324] In one possible implementation, the first terminal device and the second terminal device have similar structures, and different devices may use different chips to implement their respective functions.
[0325] The processor 1710 controls the processing operations of either the first terminal device or the second terminal device. The processor 1710 may also be referred to as a central processing unit (CPU).
[0326] Memory 1740 may include read-only memory and random access memory, and provides instructions and data to processor 1710. A portion of memory 1740 may also include NVRAM. For example, in an application, memory 1740, communication interface 1730, and memory 1740 are coupled together via bus system 1720. Bus system 1720 may include not only a data bus but also a power bus, a control bus, and a status signal bus. However, for clarity, various buses are labeled as bus system 1720 in FIG. 17 .
[0327] The methods disclosed in the above embodiments of the present application can be applied to or implemented by processor 1710. Processor 1710 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits or software instructions in processor 1710. The above processor 1710 can be a general-purpose processor, a digital signal processor (DSP), an ASIC, a field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory 1740 , and the processor 1710 reads the information in the memory 1740 and completes the steps of the above method in combination with its hardware.
[0328] In one possible implementation, taking the chip 170 applied to a first terminal device as an example, the communication interface 1730 is configured to perform the receiving and sending steps of the first terminal device in the embodiment shown in FIG12 or FIG13. The processor 1710 is configured to perform the processing steps of the first terminal device in the embodiment shown in FIG12 and / or FIG13.
[0329] In one possible implementation, taking the chip 170 applied to a second terminal device as an example, the communication interface 1730 is configured to perform the receiving and sending steps of the second terminal device in the embodiments shown in Figures 12 and / or 13. The processor 1710 is configured to perform the processing steps of the second terminal device in the embodiments shown in Figures 12 and / or 13.
[0330] The above communication module may be a communication interface of the device, used to receive signals from other devices. For example, when the device is implemented as a chip, the communication module is a communication interface of the chip used to receive or send signals from other chips or devices.
[0331] An embodiment of the present application further provides a communication system, comprising: the first terminal device and the second terminal device in the above method example, and at least two input devices connected to the first terminal device. Furthermore, the focus of at least one of the input devices (e.g., the first input device) is the second terminal device, wherein the first terminal device is configured to execute the action executed by the first terminal device in the embodiment shown in FIG. 12 . The second terminal device is configured to execute the action executed by the second terminal device in the embodiment shown in FIG. 12 .
[0332] An embodiment of the present application further provides a communication system, comprising: the first terminal device and the second terminal device in the above method example, and a first input device connected to the first terminal device. The focus of the first input device is the second terminal device. The first terminal device is configured to execute the action executed by the first terminal device in the embodiment shown in FIG. 13 . The second terminal device is configured to execute the action executed by the second terminal device in the embodiment shown in FIG. 13 .
[0333] The present invention also provides a computer-readable storage medium for storing computer program code, wherein the computer program includes instructions for executing the method for controlling a shared input device provided in the embodiment of the present invention. The computer-readable storage medium may be a read-only memory (ROM) or a random access memory (RAM), which is not limited in the present invention.
[0334] The present application also provides a computer program product, which includes instructions. When the instructions are executed, the first terminal device performs corresponding operations corresponding to the above method.
[0335] The present application also provides a computer program product, which includes instructions. When the instructions are executed, the second terminal device performs corresponding operations corresponding to the above method.
[0336] The present application also provides a chip system for use in a terminal device, the chip system comprising: a processing unit and a communication unit. The processing unit may be, for example, a processor, and the communication unit may be, for example, an input / output interface, a pin, or a circuit. The processing unit may execute computer instructions to cause the electronic device to perform the cross-device collaborative method for input device reuse provided in the above-mentioned embodiment of the present application.
[0337] Optionally, the computer instructions are stored in a storage unit.
[0338] Optionally, the storage unit is a storage unit within the chip, such as a register, a cache, etc. The storage unit can also be a storage unit located outside the chip within the terminal, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc. The processor mentioned in any of the above can be a CPU, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the program of the control method of the above-mentioned shared input device. The processing unit and the storage unit can be decoupled and respectively set on different physical devices, and connected by wired or wireless means to implement the respective functions of the processing unit and the storage unit to support the system chip to implement the various functions in the above-mentioned embodiments. Alternatively, the processing unit and the memory can also be coupled on the same device.
[0339] The first electronic device, second electronic device, computer storage medium, computer program product, or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of the corresponding methods provided above and will not be repeated here.
[0340] Through the description of the above embodiments, those skilled in the art will understand that for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0341] It should be understood that the devices and methods disclosed in the several embodiments provided in this application can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device. In addition, some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0342] Units described as separate components may or may not be physically separate. Components shown as units may be one physical unit or multiple physical units. That is, they may be located in one place or distributed across multiple locations. Depending on actual needs, some or all of the units may be selected to achieve the objectives of this solution.
[0343] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit; may also exist physically separately; or some units may be integrated into a single unit, while some units may exist physically separately. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0344] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, all or part of the technical solution of the embodiment of the present application can be embodied in the form of a software product. The software product is stored in a storage medium. The software product includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
[0345] It should be noted that all or part of the above-mentioned embodiments provided in this application (for example, part or all of any feature) can be arbitrarily combined or used in conjunction with each other.
[0346] The above content is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A control method for a shared input device, characterized in that: The method is applied in a communication system, the communication system comprising at least two input devices, a first terminal device and a second terminal device, the at least two input devices are connected to the first terminal device, the first terminal device and the second terminal device have a communication connection, and the focus of the first input device among the at least two input devices is the second terminal device; the method comprises: When the first terminal device detects a first input event of the first input device, the first terminal device sends the first input event to the second terminal device through the communication connection; the second terminal device responds to the first input event; When the second input event of the second input device among the at least two input devices detected by the first terminal device is a preset event, the first terminal device switches the focus of the first input device from the second terminal device back to the first terminal device; When the focus of the first input device is the first terminal device, the first terminal device responds to the input event of the first input device.
2. The method according to claim 1, characterized in that Before the first terminal device switches the focus of the first input device from the second terminal device back to the first terminal device, the method further includes: If the third input event of the second input device detected by the first terminal device is not the preset event, the first terminal device determines that the focus of the first input device continues to be held by the second terminal device.
3. The method according to claim 2, characterized in that The third input event of the second input device detected by the first terminal device is not the preset event, and the method further includes: The first terminal device responds to the third input event or discards the third input event.
4. The method according to any one of claims 1 to 3, characterized in that: Before the first terminal device switches the focus of the first input device from the second terminal device back to the first terminal device, the method further includes: The first terminal device displays a first interactive interface, the first interactive interface includes at least a first control, and the first interactive interface is used to prompt whether to switch the focus of the first input device back to the first terminal device; Correspondingly, the first terminal device switches the focus of the first input device from the second terminal device back to the first terminal device, including: detecting a first operation on the first control; In response to the first operation, the first terminal device switches the focus of the first input device from the second terminal device back to the first terminal device.
5. The method according to any one of claims 1 to 4, characterized in that: The first input device is a mouse and / or a keyboard; The second input device is a mouse or a keyboard.
6. The method according to any one of claims 1 to 5, characterized in that: The first terminal device switching the focus of the first input device from the second terminal device back to the first terminal device further includes: The first terminal device sends a focus switching back message to the second terminal device through the communication connection, where the focus switching back message is used to indicate that the focus of the first input device is switched back to the first terminal device; In response to the focus switching back message, the second terminal device outputs second prompt information, where the second prompt information is used to prompt that the focus of the first input device has been switched back to the first terminal device.
7. A method for controlling a shared input device, characterized in that: The method is applied to a communication system, the communication system includes a first terminal device, a second terminal device, and a first input device connected to the first terminal device, and there is a communication connection between the first terminal device and the second terminal device, and the method includes: In a case where the focus of the first input device is the second terminal device, the first terminal device sends a first focus return request to the second terminal device through the communication connection, wherein the first focus return request is used to request to switch the focus of the first input device back to the first terminal device; In response to the first focus return request, the second terminal device determines that the focus of the first input device needs to be continued, and the second terminal device sends a focus transfer rejection response to the first terminal device through the communication connection, wherein the focus transfer rejection response is used to indicate that the second terminal device does not release the focus of the first input device; In response to the focus transfer rejection response, the first terminal device maintains the focus of the first input device as the second terminal device.
8. The method according to claim 7, characterized in that The communication system further includes a second input device connected to the first terminal device, and the first terminal device sends a first focus return request to the second terminal device through the communication connection, including: The first terminal device detects a second input event of the second input device, and the first terminal device sends the first focus return request to the second terminal device through the communication connection.
9. The method according to claim 8, characterized in that The first terminal device detects a second input event of the second input device, and the first terminal device sends the first focus return request to the second terminal device through the communication connection, including: The first terminal device detects a second input event of the second input device, and the second input event is a preset event, and the first terminal device sends the first focus return request to the second terminal device through the communication connection.
10. The method according to any one of claims 7 to 9, characterized in that: After the first terminal device maintains the focus of the first input device as the second terminal device in response to the focus transfer rejection response, the method further includes: Sending a second focus return request to the second terminal device, where the second focus return request is used to request to switch the focus of the first input device back to the first terminal device; In response to the second focus return request, the second terminal device determines to release the focus of the first input device, and the second terminal device sends a focus migration response to the first terminal device, where the focus migration response is used to indicate that the second terminal device releases the focus of the first input device; In response to the focus migration response, the first terminal device switches the focus of the first input device back to the first terminal device.
11. A method for controlling a shared input device, characterized in that: The method is applied to a first terminal device, the first terminal device has at least two input devices, and the focus of the first input device among the at least two input devices is the second terminal device; the method comprises: When the first terminal device detects a first input event of the first input device, the first terminal device sends the first input event to the second terminal device through the communication connection; If the second input event of the second input device among the at least two input devices detected by the first terminal device is a preset event, the first terminal device switches the focus of the first input device from the second terminal device back to the first terminal device; When the focus of the first input device is the first terminal device, the first terminal device responds to the input event of the first input device.
12. The method according to claim 11, characterized in that Before the first terminal device switches the focus of the first input device from the second terminal device back to the first terminal device, the method further includes: If the first terminal device determines that the third input event of the second input device is not the preset event, the first terminal device determines that the focus of the first input device continues to be held by the second terminal device.
13. The method according to claim 12, characterized in that The first terminal device determines that the third input event is not the preset event, and the method further includes: The first terminal device responds to the third input event or discards the third input event.
14. The method according to any one of claims 11 to 13, characterized in that: Before the first terminal device switches the focus of the first input device from the second terminal device back to the first terminal device, the method further includes: The first terminal device displays a first interactive interface, the first interactive interface includes at least a first control, and the first interactive interface is used to prompt whether to switch the focus of the first input device back to the first terminal device; Correspondingly, the first terminal device switches the focus of the first input device from the second terminal device back to the first terminal device, including: detecting a first operation on the first control; In response to the first operation, the first terminal device switches the focus of the first input device from the second terminal device back to the first terminal device.
15. The method according to any one of claims 11 to 14, characterized in that: The first input device is a mouse and / or a keyboard; The second input device is a mouse or a keyboard.
16. The method according to any one of claims 11 to 15, characterized in that: The first terminal device switching the focus of the first input device from the second terminal device back to the first terminal device further includes: The first terminal device sends a focus switching back message to the second terminal device through the communication connection between the first terminal device and the second terminal device, where the focus switching back message is used to indicate that the focus of the first input device is switched back to the first terminal device.
17. A method for controlling a shared input device, characterized in that: The method is applied to a second terminal device, and the second terminal device holds the focus of the first input device, and the method includes: receiving a first focus return request from a first terminal device through a communication connection with the first terminal device, wherein the first focus return request is used to request to switch the focus of the first input device back to the first terminal device; In response to the first focus return request, it is determined that the focus of the first input device needs to continue to be held, and a focus migration rejection response is sent to the first terminal device through the communication connection, wherein the focus migration rejection response is used to indicate that the second terminal device has not released the focus of the first input device.
18. The method according to claim 17, characterized in that After sending a focus transfer rejection response to the first terminal device through the communication connection, the method further includes: receiving a second focus return request from the first terminal device, wherein the second focus return request is used to request to switch the focus of the first input device back to the first terminal device; In response to the second focus return request, it is determined that the focus of the first input device does not need to be held, and a focus transfer response is sent to the first terminal device, where the focus transfer response is used to indicate that the second terminal device releases the focus of the first input device.
19. A method for controlling a shared input device, characterized in that: The method is applied to a first terminal device, the focus of a first input device connected to the first terminal device is a second terminal device, and there is a communication connection between the first terminal device and the second terminal device. The method includes: The first terminal device sends a first focus return request to the second terminal device through the communication connection, wherein the first focus return request is used to request to switch the focus of the first input device back to the first terminal device; when the focus of the first input device is the second terminal device, the first terminal device sends a first input event detected by the first input device to the second terminal device through the communication connection; receiving a focus transfer rejection response from the second terminal device; In response to the focus transfer rejection response, the first terminal device maintains the focus of the first input device as the second terminal device.
20. The method according to claim 19, characterized in that The first terminal device further has a second input device. Before the first terminal device sends a first focus return request to the second terminal device through the communication connection, the method further includes: The first terminal device detects the second input device; Correspondingly, the first terminal device sends a first focus relocation request to the second terminal device through the communication connection, including: When the first terminal device detects a second input event of the second input device, the first terminal device sends the first focus return request to the second terminal device through the communication connection.
21. The method according to claim 20, characterized in that The first terminal device detects a second input event of the second input device, and the first terminal device sends the first focus return request to the second terminal device through the communication connection, including: In a case where the second input event is a preset event, the first terminal device sends the first focus return request to the second terminal device through the communication connection.
22. The method according to any one of claims 19 to 21, characterized in that: After the first terminal device maintains the focus of the first input device as the second terminal device in response to the focus transfer rejection response, the method further includes: Sending a second focus return request to the second terminal device, where the second focus return request is used to request to switch the focus of the first input device back to the first terminal device; receiving the focus migration response from the second terminal device; In response to the focus migration response, the first terminal device switches the focus of the first input device back to the first terminal device.
23. A communication system, characterized in that: The communication system includes: a first terminal device, a second terminal device, and at least two input devices connected to the first terminal device, there is a communication connection between the first terminal device and the second terminal device, and the focus of the first input device among the at least two input devices is the second terminal device, wherein the communication system is used to implement the method as described in any one of claims 1 to 6.
24. A communication system, characterized in that: The communication system includes: a first terminal device, a second terminal device, and a first input device connected to the first terminal device, there is a communication connection between the first terminal device and the second terminal device, the focus of the first input device is the second terminal device, wherein the communication system is used to implement the method as described in any one of claims 7 to 10.
25. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by the processing circuit, the method according to any one of claims 11 to 16, or the method according to claim 17 or 18, or the method according to any one of claims 19 to 22 is implemented.
26. A terminal device, characterized in that: The terminal device includes a processor and a communication interface, wherein the communication interface is used to enable the terminal device to communicate with an external device, and the processor is used to execute computer program instructions stored in a memory to implement the method according to any one of claims 11 to 16, or the method according to claim 17 or 18, or the method according to any one of claims 19 to 22.
27. A chip system, characterized in that: The chip system includes a processing circuit and a storage medium, wherein the storage medium stores computer program instructions; when the computer program instructions are executed by the processing circuit, the method according to any one of claims 11 to 16, or the method according to claim 17 or 18, or the method according to any one of claims 19 to 22 is implemented.
Citation Information
Patent Citations
Sharing method and sharing system for input device
CN106383592A
Connection method, device and system of input device
CN114885442A
Peripheral control method, electronic equipment and system
CN115033295A
Cross-device cooperation method for input device multiplexing and electronic device
CN115145510A
