Shared input device control method, terminal device and system

By detecting input events in the terminal device and switching the focus of the input device only when a preset event is detected, the focus return problem caused by accidental touches in multi-terminal device scenarios is solved and the user experience is improved.

CN118550419APending Publication Date: 2024-08-27HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310205240.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-24
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

In a multi-terminal device scenario, when users use multiple input devices, it is easy for the input devices to return accidentally due to accidental touches, affecting the user experience.

Method used

By detecting whether the input event is a preset event in the terminal device, the focus of the input device is only switched when the preset event is detected, avoiding focus return caused by accidental touch, and improving user experience.

Benefits of technology

It effectively avoids the accidental return of input devices due to accidental touches, and improves the stability and experience of user operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550419A
    Figure CN118550419A
Patent Text Reader

Abstract

The embodiment of the invention provides a control method of shared input equipment, terminal equipment and a system, and relates to the technical field of terminals, and the method is used for reducing the phenomenon that the input equipment is accidentally homed due to mistaken touch. The method is applied to a communication system comprising a first terminal device, a second terminal device and at least two input devices connected to the first terminal device, and under the condition that the focus of the first input device in the at least two input devices is the second terminal device. The first terminal device sends a detected first input event of the first input device to the second terminal device, so that the second terminal device responds to the first input event; the method comprises the following steps: a first terminal device detects at least two input devices; and under the condition that the second input event of the second input device detected by the first terminal device is the preset event, the first terminal device switches the focus of the first input device back to the first terminal device, so that the first terminal device responds to the input event of the first input device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] 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

[0002] 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 a 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 respond to the input event of the mouse. For example, when the user moves the mouse, the terminal device 1 provides 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.

[0003] However, in the scenario where the mouse focus passes to terminal device 2, since the keyboard focus is still 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, i.e., the focus returns to the original position. Although the above solution can realize the focus return of the input device that has passed through, the user may not want to trigger the mouse to return to the original position when using the keyboard to operate terminal device 1. Summary of the invention

[0004] The 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 how to reduce the accidental return of the input device due to mis-touch.

[0005] The embodiments of the present application provide the following technical solutions:

[0006] In a first aspect, an embodiment of the present application provides a control method for a shared input device, the method being 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 being connected to the first terminal device, the first terminal device and the second terminal device being connected by a communication connection, and the focus of the first input device among the at least two input devices being the second terminal device; the method comprising: 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.

[0007] The control method of the shared input device provided in the embodiment of the present application can be realized when the focus of the shared input device (such as the first input device) is switched from a terminal device (such as the first terminal device) in the communication system to another terminal device (such as the second terminal device), and the first terminal device uses 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. 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 first input event of the detected first input device to the second terminal device, so that the second terminal device responds, 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.

[0008] It is worth noting that, when the focus of the first input device is the second terminal device, if the first terminal device does not detect any input event of the first input device (for example, the user does not operate the first input device), the first terminal device will not feedback the input event of the first input device to the second terminal device. Similarly, when the focus of the first input device is the second terminal device, if the first terminal device does not detect any input event of the second input device, the first terminal device will not switch the focus of the first input device from the second terminal device back to the first terminal device.

[0009] 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 sends it 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.

[0010] 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.

[0011] In a 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:

[0012] 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.

[0013] 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.

[0014] In a 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 by the embodiment of the present application also 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.

[0015] 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 user expectations.

[0016] In a possible implementation of the present application, the first input device is a mouse and / or a keyboard.

[0017] In a possible implementation of the present application, the second input device is a mouse or a keyboard.

[0018] 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.

[0019] In a second aspect, an embodiment of the present application provides a control method for a shared input device, the method being applied in a communication system, the communication system comprising a first input device, a first terminal device, and a second terminal device, the first input device being connected to the first terminal device, the first terminal device and the second terminal device being connected by a communication connection, the focus of the first input device being the second terminal device, the method comprising: the first terminal device sending a first focus relocation request to the second terminal device via the communication connection. The first focus relocation 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 relocation request, the second terminal device determines that it is necessary to continue to hold the focus of the first input device, and the second terminal device sends a focus relocation rejection response to the first terminal device via the communication connection. The focus relocation 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 relocation rejection response, the first terminal device maintains the focus of the first input device as the second terminal device.

[0020] In the above scheme, 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 through a communication connection, so that the second terminal device responds to the first input event. In this way, the shared input device (such as the first input device) of the first terminal device can be used to operate another terminal device.

[0021] 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 to 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 migration 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.

[0022] In a possible implementation of the present application, the first terminal device may send a first focus relocation request to the second terminal device when a preset condition is met. For example, the preset condition may be that a second input event of a second input device connected to the first terminal device is detected, or the preset condition may be that the second input event of the second input device detected is a preset event.

[0023] In a possible implementation of the present application, the communication system also includes a second input device connected to the first terminal device, and before the first terminal device sends a first focus return request to the second terminal device via 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 via 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 via the communication connection.

[0024] In a 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 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.

[0025] 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 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 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.

[0026] It is understandable that if the first terminal device subsequently determines that the preset condition is met again, a second focus return request may be sent to the second terminal device to request that the focus of the first input device be switched back to the first terminal device.

[0027] In a third aspect, an embodiment of the present application provides a control method for a shared input device, the method being applied to a first terminal device, the first terminal device having at least two input devices, and the focus of the first input device among the at least two input devices being the second terminal device; the method comprising: 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 a 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.

[0028] In a possible implementation of the present application, in a 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.

[0029] In a 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 detects 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.

[0030] 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.

[0031] In a 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 at least includes 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.

[0032] 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.

[0033] When the first input device is a mouse, it can be understood that the first terminal device uses the mouse connected to the first terminal device as a shared input device and switches 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.

[0034] When the first input device is a keyboard, it can be understood that the first terminal device will use the keyboard connected to the first terminal device as a shared input device, and switch the focus of the keyboard to the second terminal device. 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.

[0035] 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 the 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 is sent to the second terminal device as the first input event. If the first terminal device detects a keyboard press event, the key value of the pressed key in the keyboard is sent to the second terminal device as the first input event.

[0036] When the first input device is a keyboard and a mouse, the focus of the keyboard and the mouse of the first terminal device can be synchronously switched to the second terminal device. Alternatively, the first terminal device can first switch the focus of one input device of the keyboard and the mouse to the second terminal device based on the user's operation, and then switch the focus of the other input device of the keyboard and the mouse to the second terminal device, which is not limited in the embodiments of the present application.

[0037] 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 includes: the first terminal device sends a focus switch back message to the second terminal device through the communication connection between the first terminal device and the second terminal device. 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. This makes it easier for the second terminal device to determine that the first terminal device will not send input events of the first input device to the second terminal device in the future.

[0038] In a fourth aspect, an embodiment of the present application provides a control method for a shared input device, the method being applied to a second terminal device, and in a case where the second terminal device holds the focus of the first input device, the second terminal device is used to respond to a first input event of the first input device sent by the first terminal device, the method comprising: the second terminal device receives a first focus return request from the first terminal device via 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 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.

[0039] In a possible implementation of the present application, after the second terminal device sends a focus migration rejection response to the first terminal device via a communication connection, the method further includes: the second terminal device receives a second focus return request from the first terminal device, the second focus return request being 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.

[0040] In a fifth aspect, a control method for a shared input device is applied to a first terminal device, the focus of the first input device connected to the first terminal device is the second terminal device, and there is a communication connection between the first terminal device and the second terminal device. The method provided by the 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 through 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; 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.

[0041] In the scheme 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.

[0042] In a possible implementation of the present application, the first terminal device further has a second input device, and the first terminal device sends a first focus return request to the second terminal device via the communication connection, including: the first terminal device detects a second input event of the second input device, and then the first terminal device sends the first focus return request to the second terminal device via the communication connection. This solution can implement a process in which the first terminal device requests to switch back the focus of a shared input device (such as the first input device) if the first terminal device detects any input event of an unshared input device (such as the second input device).

[0043] In a 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 a 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 implement a process in which the first terminal device requests to switch back the focus of a shared input device (such as the first input device) only when the second input event of a non-shared input device (such as the second input device) is a preset input event.

[0044] 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 further includes: sending a second focus migration request to the second terminal device. The second focus migration request is used to request to switch the focus of the first input device back to the first terminal device. Receive a 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.

[0045] In a sixth aspect, an embodiment of the present application provides a communication system, comprising: 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.

[0046] 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.

[0047] 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.

[0048] 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.

[0049] In the tenth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. 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.

[0050] 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.

[0051] In the 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.

[0052] In the 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.

[0053] In the fourteenth aspect, a chip system comprises 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.

[0054] In the fifteenth aspect, a chip system comprises 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.

[0055] In the sixteenth aspect, a chip system comprises 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.

[0056] 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, and the communication interface is used to realize communication between the chip system and an external device.

[0057] 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 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 described in the fourth aspect and various possible implementation methods of the fourth aspect.

[0058] 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 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 described in the fifth aspect and various possible implementation methods of the fifth aspect.

[0059] 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 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 described in the sixth aspect and various possible implementation methods of the sixth aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 A communication system architecture diagram provided for an embodiment of the present application;

[0061] Figure 2 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application;

[0062] Figure 3 A schematic diagram of the structure of an input device provided in an embodiment of the present application;

[0063] Figure 4 A schematic diagram of the software architecture of the communication system provided in the embodiment of the present application;

[0064] Figure 5A to Figure 5E A schematic diagram of focus switching of an input device provided in an embodiment of the present application;

[0065] Figure 6 A schematic diagram of a user operating a second terminal device by means of a "mouse" of a first terminal device provided in an embodiment of the present application;

[0066] Figure 7 A schematic diagram of a user operating a second terminal device by means of a "keyboard" of a first terminal device provided in an embodiment of the present application;

[0067] Figure 8 Schematic diagram of a first terminal device detecting a preset event and controlling the focus of a shared input device to switch back provided in an embodiment of the present application Figure 1 ;

[0068] Fig. 9 Schematic diagram of a first terminal device detecting a preset event and controlling the focus of a shared input device to switch back provided in an embodiment of the present application Figure 2 ;

[0069] Fig.10 Schematic diagram of a first terminal device detecting a preset event and controlling the focus of a shared input device to switch back provided in an embodiment of the present application Figure 3;

[0070] Fig.11 A schematic diagram of a scenario in which the focus of multiple input devices of a laptop computer provided in an embodiment of the present application is switched to different terminal devices;

[0071] Fig.12 A schematic flow chart of a method for controlling a shared input device provided in an embodiment of the present application;

[0072] Fig.13 A schematic flow chart of another method for controlling a shared input device provided in an embodiment of the present application;

[0073] Fig.14A and Fig. 14B A schematic diagram of an interface of a terminal device provided in an embodiment of the present application;

[0074] Fig.15 A schematic diagram of an interface of another terminal device provided in an embodiment of the present application;

[0075] Fig.16 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application;

[0076] Fig.17 A schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION

[0077] In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially identical functions and effects. For example, the first terminal device and the second terminal device are only used to distinguish between different terminal devices, and their order is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.

[0078] 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 as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0079] In the present application, "at least one" means one or more, and "plurality" 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" or similar expressions refers to any combination of these items, including any combination of single 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.

[0080] 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 the original data and the program 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 connected to the terminal device in a wired manner, 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 through, for example, a universal serial bus (USB). A wireless input device refers to a device connected to the terminal device in a wireless manner. For example, a wireless mouse or a wireless keyboard. A wireless mouse or a wireless keyboard can be connected to the terminal device through wireless communication methods such as Bluetooth and near field communication (NFC). The input device can generate input data from 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 embodiment of the present application does not impose any restrictions on the type of input device and the input data generated by the input device.

[0081] The terminal device can usually be connected to one or more input devices to achieve the corresponding functions. For example, taking the terminal device as a personal computer (PC) and the input device as a mouse, the PC can be connected to the mouse, and the cursor can be moved on the display screen of the PC through the mouse, as well as further functions such as opening / deleting files. The PC can also be connected to a keyboard, and the cursor on the display screen of the PC can be moved through the keyboard, and English letters, Chinese characters, numbers, punctuation marks, etc. can be input into the PC, thereby issuing commands to the PC, inputting data, etc. Of course, the user can also use the keyboard to control the PC to open / delete files and other functions. For another example, taking the terminal device as a tablet computer as an example, the tablet computer can establish a Bluetooth connection with the keyboard, and the keyboard can be used to input characters to the tablet computer, open applications / videos / audios in the tablet computer, and other functions. For another example, taking the terminal device as a tablet computer or a mobile phone as an example, the input device of the tablet computer or the mobile phone can be a touch screen of the tablet computer or the mobile phone, and the user can operate the touch screen to input characters to the tablet computer or the mobile phone, open applications / videos / audios in the tablet computer or the mobile phone, and other functions.

[0082] The terminal device in the embodiment of the present application may include but is not limited to a personal computer (PC), a smart phone, a netbook, a tablet computer, a smart camera, a PDA, a smart TV, a personal digital assistant (PDA), a portable multimedia player (PMP), a projection device, a smart screen device, an augmented reality (AR) / virtual reality (VR) device, a mixed reality (MR) device, a TV or a somatosensory game console in a human-computer interaction scene, etc. The embodiment of the present application does not limit the specific functions and structures of the terminal device.

[0083] Among them, in the embodiments of the present application, the input methods supported by the input device may include but are not limited to key input 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.

[0084] 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 a 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 respond to the input event of the mouse. For example, when the user moves the mouse, the terminal device 1 provides 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.

[0085] 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 been 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 there will be a phenomenon that the input device that has been crossed is accidentally returned to its original position due to the accidental touch of the input device that has not been crossed.

[0086] Assume that the user is now using a laptop computer for text editing, and the laptop computer is equipped with keyboard 1, keyboard 2, and mouse 1, and the user is using a tablet computer to watch videos. Assume that the user needs to use the mouse to operate the tablet computer to switch videos or set the playback progress of the video. In the case where the tablet computer is not configured with an input device or the user is not accustomed to using the input device configured on the tablet computer, the user can establish a communication connection between the laptop computer and the tablet computer. Then, the laptop computer can switch the focus of the mouse 1 and / or keyboard 1 to the tablet computer based on the user's operation, that is, the focus of the mouse 1 and / or keyboard 1 of the laptop computer is passed to the tablet computer. After that, the user can use the mouse 1 to operate the tablet computer to switch videos or set the playback progress of the video or other operations. After the focus of the mouse 1 passes to the tablet computer, since the focus of the keyboard 2 is still the laptop computer, if the user accidentally touches the keyboard 2 while using the mouse 1, since the focus of the keyboard 2 is not switched to the tablet computer, the laptop computer detects the input event of the keyboard 2 (such as a key being pressed) and controls the focus of the mouse 1 to switch back to the laptop computer. After the focus of the mouse 1 is switched back to the laptop computer, the subsequent input events of the mouse 1 are responded to by the laptop computer. In this way, when the user needs to continue to use mouse 1 to operate the tablet computer or is currently using mouse 1 to operate the tablet computer, the user cannot continue to use mouse 1 to operate the tablet computer, or the ongoing operation is interrupted. Although the laptop can detect input events from keyboard 2, the input events from keyboard 2 may be caused by accidental touches by the user, or the user does not want to switch back to the focus of mouse 1 when using keyboard 2 to operate the laptop. If the user needs to continue to use mouse 1 later or is currently using mouse 1 to operate the tablet computer, the behavior of the laptop switching back to the focus of mouse 1 when detecting input events from keyboard 2 will reduce the user experience.

[0087] 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's accidental touch of the unshared input device, and at the same time, it also reduces the burden on the first terminal device.

[0088] like Figure 1 As shown, Figure 1This is a schematic diagram of the structure of a communication system provided in an embodiment of the present application, and the system 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.

[0089] The terminal device 100 has at least two sets of input devices, and there is a first communication connection 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 through 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 Bluetooth connection, Wi-Fi connection, NFC connection, etc., the embodiment of the present application does not limit the type of the first communication connection.

[0090] Take the terminal device 100 as a notebook computer as an example. Figure 1 As shown, the at least two sets of input devices of the terminal device 100 may be at least two of the mouse 102 , the mouse 104 , the keyboard 101 , the keyboard 103 , the touchpad 106 and the keyboard 107 of the laptop computer.

[0091] The mouse 102, mouse 104, keyboard 101, and keyboard 103 can be regarded as input peripherals connected to the terminal device 100. The touchpad 106 and the keyboard 107 of the notebook computer can be regarded as input devices built into the terminal device 100.

[0092] 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 in the mouse 102, the mouse 104, the keyboard 101, the keyboard 103, the touchpad 106, and the keyboard 107 can be switched from the terminal device 100 to another terminal device (such as the terminal device 200).

[0093] 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 keeping the focus of some input devices at the terminal device 100.

[0094] In other embodiments of the present application, some of the at least two sets of input devices of the terminal device 100 support focus switching, and some input devices do not support focus switching, which is not limited in the embodiments of the present application. Which input devices support focus switching and which input devices do not support focus switching 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 device, which is not limited in the embodiments of the present application. For example, the input devices of the notebook computer itself can be set not to support focus switching, such as the touchpad 106 and the keyboard 107 do not support focus switching. 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. Or the terminal device 200 can obtain the capability information of each input device when the focus switching condition is met.

[0095] In the embodiment of the present application, when the focus of an input device is switched from one terminal device (for example, terminal device 100) to another terminal device (for example, 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 be changed 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 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 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 terminal device 100 and the terminal device 200 also have a second communication connection, therefore, 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.

[0096] It is worth mentioning that Figure 1 In the example, the mouse 102 is a wired mouse, the keyboard 101 is a wired keyboard, the mouse 104 is a wireless mouse, and the keyboard 103 is a wireless keyboard. In the actual process, all input devices connected to the terminal device 100 can be wired input devices or wireless input devices, which is not limited in the embodiment of the present application.

[0097] 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 .

[0098] Figure 1 Taking the terminal device 100 as a laptop computer, in the case where the terminal device 100 is a laptop computer with a touch function, a set of input devices of the terminal device 100 may also be input devices provided by the laptop computer, for example, a touch pad 106 of the laptop computer and / or a keyboard 107 of the laptop computer. The touch pad 106 is an input device that can move a cursor by sliding a finger.

[0099] When the terminal device 100 is a mobile phone or tablet computer with a 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 or characters and other content into the mobile phone or tablet computer.

[0100] In some embodiments of the present application, the terminal device 100 and the terminal device 200 may also have an output device for displaying the data or information of 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 the content input by the user to the terminal device 100 or the terminal device 200 via the input device. For example, Figure 1 The display of the terminal device 100 shown may display screen 105. The display of the terminal device 200 may display screen 201.

[0101] 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. Figure 1 As shown, the terminal device 200 is equipped with a keyboard 202 .

[0102] 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.

[0103] 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 a common 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 a 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. In the case where the focus of the mouse 104 and / or the keyboard 103 is switched from the terminal device 100 to the terminal device 200, the focus transfer request is used to request that the focus of the mouse 104 and / or the 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 the keyboard 103 be switched to the terminal device 200, which is not limited in the embodiment of the present application. In this way, the focus of the mouse 104 and / or the 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.

[0104] For example, in some embodiments, the data transmitted between the terminal device 100 and the terminal device 200 may be an input event of the mouse 104 detected by the terminal device 100 and transmitted from the terminal device 100 to the terminal device 200 when the mouse 104 and / or the keyboard 106 pass through the terminal device 200. For example, the 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 key pressed by the user on the keyboard 106 as an input event and send it to the terminal device 200 through the second communication connection. After the terminal device 200 receives the message sent by the terminal device 100, the terminal device 200 may display a mouse pointer (i.e., a cursor 203) on the display screen 201, or respond to the input event of the mouse 104 and / or the keyboard 106 accordingly. Therefore, the user can perform input operations on the terminal device 200 by using the mouse 104 and / or the keyboard 106 of the terminal device 100. Thus, the terminal device 100 and the terminal device 200 share a set of input devices, and the terminal device 200 does not need to be equipped with an additional input device.

[0105] 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 of the two terminal devices communicating with each other through a wired communication connection is higher. However, it is relatively convenient to connect the two terminal devices through wireless communication.

[0106] The terminal device 100 and the terminal device 200 may have a Bluetooth module and / or a wireless local area network (WLAN) module and / or an NFC module. The Bluetooth module may provide a solution including one or more Bluetooth communications in classic Bluetooth (Bluetooth 2.1) or Bluetooth low energy (BLE), and the WLAN module may provide a solution including one or more WLAN communications in 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).

[0107] In some embodiments, the second communication connection may 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. It is also called wireless fidelity direct (Wi-Fi direct) in the system. 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, to achieve point-to-point communication, such as transferring files, pictures, videos and other data. Compared with Bluetooth, Wi-Fi P2P has the advantages of faster search and transmission speeds and longer transmission distances.

[0108] Please refer to Figure 2 , Figure 2 FIG. 1 is a schematic diagram showing the hardware structure of a terminal device provided in an embodiment of the present application. Figure 2As shown, 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.

[0109] 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.

[0110] It is understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the terminal device. In other embodiments of the present application, the terminal device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange different components. 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 (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a flight controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural network processor (neural-network processing unit, NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors. A memory may also be provided in the processor 210 for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may store instructions or data that the processor 210 has just used or circulated. If the processor 210 needs to use the instruction or data again, it can be directly called from the memory. Repeated access is avoided, the waiting time of the processor 210 is reduced, and the efficiency of the system is improved.

[0111] In the embodiment of the present application, the processor 210 may include one or more microcontrollers (MCU) to be responsible for the coordinated scheduling of all other modules / timing / transactions related to the migration of the input device.

[0112] In some embodiments, the processor 210 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuits 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, etc.

[0113] The charging management module 240 is used to receive charging input from the charger. The power management module 241 is used 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 screen 294, the camera 293 and the communication module 250.

[0114] The wireless communication function of the terminal device can be implemented through antenna 1, antenna 2, communication module 250, modem processor and baseband processor.

[0115] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the terminal device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network.

[0116] In some other embodiments, the antenna can be used in combination with a tuning switch. The communication module 250 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The communication module 250 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The communication module 250 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some functional modules of the communication module 250 can be set in the processor 210.

[0117] In some embodiments, at least some functional modules of the communication module 250 and at least some modules of the processor 210 may be disposed in the same device.

[0118] 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 technology (NFC), infrared technology (IR), etc.

[0119] The communication module 250 may be one or more devices integrating at least one communication processing module. The communication module 250 receives electromagnetic waves via the antenna 2, modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 210. The communication module 250 may also receive signals to be sent from the processor 210, modulate the frequencies of the signals, amplify the signals, and convert the signals into electromagnetic waves for radiation via the antenna 2.

[0120] In an embodiment of the present application, the communication module 250 may include a Bluetooth module. The Bluetooth module may be used to send Bluetooth messages to realize interaction with multiple input devices based on Bluetooth connection. The communication module 250 may include an NFC module. The NFC module is used to realize interaction with input devices or other terminal devices based on NFC connection. The communication module 250 may include a Wi-Fi module, which is used to provide network access that complies with Wi-Fi related standard protocols for terminal devices. The terminal device can access the Wi-Fi access point through the Wi-Fi module, thereby helping users to send and receive emails, browse web pages, and access streaming media, etc. It provides users with wireless broadband Internet access. In some other embodiments, the Wi-Fi module can also be used as a Wi-Fi wireless access point to provide Wi-Fi network access for other terminal devices. Of course, the terminal device can also establish a communication connection with other terminal devices with the help of the Wi-Fi module, such as establishing a first communication connection with an input device, or establishing a second communication connection with other terminal devices.

[0121] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be sent 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 the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 260A, a receiver 260B, etc.), or displays an image or video through a display screen 294. In some embodiments, the modem processor may be an independent device.

[0122] 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.

[0123] 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.

[0124] 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 the 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.

[0125] The terminal device implements the display function through a GPU, a display screen 294, and an application processor. The GPU is a microprocessor for image processing, which 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, which execute program instructions to generate or change display information.

[0126] The display screen 294 is used to display images, videos, etc. The 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 or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc.

[0127] In the embodiment of the present application, the terminal device can perform interface rendering through the GPU, display the interface through the display screen 294, etc.

[0128] Illustratively, 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.

[0129] The terminal device can realize the shooting function through the ISP, the camera 293, the video codec, the GPU, the display screen 294 and the application processor.

[0130] 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 through the external memory interface 220 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.

[0131] Internal memory 221 may be used to store executable program code of a computer program. Exemplarily, the computer program may include an operating system program and an application program. The operating system may 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 may store an operating system, at least one application required for a function, etc. The data storage area may 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.

[0132] The sensor module 280 can sense the user's operation, such as the user touching the touch panel of the terminal device, clicking, sliding, the user approaching the screen, etc.

[0133] The terminal device can realize audio functions through the audio module 260, the speaker 260A, the receiver 260B, the microphone 260C and the application processor, such as music playing, recording, etc. For the specific working principles and functions of the audio module 260, the speaker 260A, the receiver 260B and the microphone 260C, reference can be made to the introduction in the conventional technology.

[0134] The buttons include power buttons, volume buttons, etc. The buttons can be mechanical buttons or touch buttons. The terminal device can receive button inputs and generate key signal inputs related to user settings and function controls of the terminal device.

[0135] It should be noted that Figure 2 The hardware modules included in the terminal device are described for exemplary purposes only and do not limit the specific structure of the terminal device.

[0136] In the embodiments 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, a 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, which is not limited in the embodiments of the present application.

[0137] Please refer to Figure 3 , Figure 3 1 shows a structural block diagram of an input device provided in an embodiment of the present application. Figure 3As shown, 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 ​​.

[0138] 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 (such as the control circuit 320, the communication module 350, and the input module 310 or any combination thereof).

[0139] In some embodiments, the control circuit 320, the power supply 330, the memory component 340, the communication module 350, and the power management module 360 ​​may communicate with each other via the bus 370. The input module 310 may be connected to the control circuit 320 and the power management module 360 ​​independently.

[0140] In some embodiments, the input module 310 may be connected to other modules via a bus 370 .

[0141] In some embodiments, input module 310 may be configured to receive input from a plurality of key input elements or devices.

[0142] In some embodiments, the input module 310 is operable to receive input in response to a user pressing the following components, including: keys (e.g., 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 (e.g., touch pads, touch pins), etc.

[0143] 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 .

[0144] Exemplarily, 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 an embodiment 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. Different key codes corresponding to multiple key input elements may be specific to the operating system.

[0145] 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.

[0146] 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.).

[0147] The memory component 340 may be configured to store data. In some embodiments, the data may include 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.

[0148] 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. Among them, 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. Among them, the wireless communication module is used to support the input device 300 to achieve wireless connection with the terminal device. For example, the wireless communication module includes a Bluetooth module or an NFC module. The Bluetooth module can be used to be responsible for sending Bluetooth messages to achieve Bluetooth connection interaction with multiple terminal devices. The wired communication module is used to achieve 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.

[0149] It should be noted that Figure 3 The structure of the input device 300 shown is only an exemplary description, and does not limit the specific structure of the input device 300. The structure of the first input device and the second input device in the embodiment of the present application can refer to Figure 3 Description.

[0150] 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.

[0151] Figure 4 1 is a system software architecture block diagram of the communication system 10 provided in the embodiment of the present application. Figure 4 As shown, 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 and communication can be performed through the second communication connection.

[0152] In some embodiments, the software architecture of the communication system 10 can be divided into an application & kernel layer and a device layer. The application layer can include a series of application packages.

[0153] 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, which is not limited in the embodiments of the present application.

[0154] The device layer of the terminal device 100 may include input / output devices such as a display screen 105, a mouse 102, a mouse 104, a keyboard 101, and a keyboard 103. The display screen 105 is an output device for displaying images, videos, etc. The display screen 105 includes a display panel. The terminal device 100 may include one or more display screens, and N is an integer greater than 1.

[0155] Mouse 102 / mouse 104 is an input device, which is an indicator of the vertical and horizontal coordinates in the display system of terminal device 100. Using a mouse can make the operation of terminal device 100 easier and faster. Mouse types may include roller ball mouse, optical mouse, wireless mouse, wired mouse, etc. In the present application, a mouse can be extended to any device that can generate a cursor and perform point selection.

[0156] 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.

[0157] The application & 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, etc. The driver can communicate with the hardware device through the bus, control the hardware to enter various working states, obtain the value of the device-related register, and thus obtain the state of the device. For example, the driver can obtain user operation events, such as mouse input, keyboard input, rotating the terminal device, etc., and convert the events into data. The display driver 414 can be a program used to drive the display.

[0158] The mouse driver 415 can be 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 buttons of the mouse are pressed or released; third, providing the application with some auxiliary functions for mouse operations.

[0159] The keyboard driver 416 is an interrupt program that can generate a scan code according to the pressed key, and then obtain the American standard code for information interchange (ASCII) from the scan code, and then put it into the cache queue for output or other calls. The application & kernel layer of the terminal device 100 can also include an input event detection module 410, an input event generation module 411, an input event judgment module 412, an input event sending module 413, an input event response module 414, etc.

[0160] The input event detection module 410 is used to detect input events collected by an input device.

[0161] 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 the keyboard 101 is a preset event when the focus of the mouse 104 is switched to the terminal device 200. When the input event of the mouse 102 or the 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 responds to the input event of the mouse 104.

[0162] Optionally, the terminal device 100 may further include an input event generating module 411, wherein the input event generating module 411 may be used to convert the input event of the input device acquired by the input event detecting module 410 into a corresponding input event that can act on the terminal device 200. For example, when detecting that the mouse pointer reaches 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 it to the terminal device 200 through the input event sending module 413. The terminal device 200 receives the message and displays the mouse pointer at the corresponding position, forming a visual effect of the mouse pointer shuttling 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 mouse, keyboard, handwriting board) of the terminal device 100 will be captured, and then the 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 may 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 input events of the system to the input events of the system according to the first mapping table, and the input events of the system 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 key value in the corresponding system. For example, the key code in the system may not be the same as the key code in the system for the same character "a". The input event sending module 413 can be used for the terminal device 100 to send input events, etc. to the terminal device 200 through the second communication connection.

[0163] 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 a tablet computer with a touch function, 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 arranged on 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 a touch operation acting on or near it. The touch sensor may transmit the detected touch operation to the application processor to determine the type of touch event.

[0164] 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.

[0165] The application & kernel layer of the terminal device 200 may include a display screen driver 423, an input event receiving module 421, and an input event response module 422. Among them, the display screen driver 423 is a program that drives the touch sensor and display screen of the hardware device. Optionally, the application & kernel layer of the terminal device 200 may also include a mouse driver 424 and a keyboard driver 425. The specific functions can be referred to the above description, which will not be repeated here.

[0166] 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 key pressing events, key values ​​corresponding to keyboard keys, etc.

[0167] 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 that carries the coordinates (padX, padY) to display the mouse pointer, the input event response module 422 can respond to the message, draw the mouse pointer at the coordinates (padX, padY), and display it on the display screen 201. For another example, after the input event receiving module 421 receives input events such as mouse movement, mouse click, mouse wheel scrolling, keyboard input, remote control handle movement, etc. from the terminal device 100, the input event response module 422 can process the input event.

[0168] 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.

[0169] In other embodiments of the present application, the communication system 10 may include more or fewer modules than shown in the figure, or combine some modules, or split some modules, or have different architecture arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0170] In the following description, the terminal device 100 is a notebook computer, the terminal device 200 is a PC, and the notebook computer is configured as follows: Figure 1The keyboard 101, mouse 102, keyboard 103 and mouse 104 shown. The laptop computer can switch the focus of any input device among the keyboard 101, mouse 102, keyboard 103 and 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, mouse 102, keyboard 103 and mouse 104 is a target event, the focus of any input device is switched to the PC, or a display as shown in FIG. Figure 5A The interface shown. For example, the user presses button 1 and button 2 on the keyboard 101, and the laptop detects the input event of the keyboard 101. If the input event is a target event, the laptop switches the focus of the keyboard 101, or the focus of the keyboard 101 and the focus of the 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 a different event from the preset event described below, one for triggering the focus of the input device from the laptop to the PC, and the other for triggering the focus of the input device from the PC back to the laptop. For example, the target event and the preset event are both 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.

[0171] The following combination Figure 5A to Figure 5C Describe 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.

[0172] like Figure 5A As shown, Figure 5A The device management setting interface 501 is displayed after the notebook computer detects the focus switching operation. Figure 5AThe device management setting interface 501 shown 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 connected input devices that are not displayed in the current list. In the device management setting interface 501, users can independently select the input devices 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 Figure 5A As shown, 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 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 the "HUAWEI Wireless Keyboard B" and the "HUAWEI Wireless Mouse M", respectively, 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 FIG. Figure 5B shown.

[0173] 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.

[0174] It is understandable that the other device list 503 displays information about devices detected by the laptop computer / currently connected to or previously connected to the laptop computer, as well as the status of the devices (e.g., paired, connected, or not connected). Figure 5A As shown, the TV is a device that is paired with the laptop but not connected. Therefore, if you need to switch the focus of the laptop's input device to the TV, you need to first establish a communication connection between the TV and the laptop. The status between mobile phone A and the laptop is not connected. The status between desktop computer p and the laptop is connected, so 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, and of course, it can also receive the input device of the desktop computer p and share it with the laptop.

[0175] 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 the terminal devices that can support focus switching searched by the laptop.

[0176] In some embodiments of the present application, the shared input device list 502 may include information of all input devices currently connected to the laptop computer. For example, if all input devices currently connected to the laptop computer are four, namely keyboard 101, mouse 102, keyboard 103, mouse 104, touchpad 106, and keyboard 107, the shared input device list 502 includes information of keyboard 101, mouse 102, keyboard 103, mouse 104, touchpad 106, and keyboard 107.

[0177] In other embodiments of the present application, the shared input device list 502 may also only include information of input devices that support focus migration. For example, assuming that the laptop computer is connected to a keyboard 101 and a mouse 102, and the laptop computer also has a touchpad 106 and a keyboard 107, but the touchpad 106 and the keyboard 107 do not support focus migration, the shared input device list 502 includes information of the keyboard 101, the mouse 102, the keyboard 103, and the mouse 104.

[0178] Or in another possible embodiment of the present application, the shared input device list 502 includes information of all input devices and an indication of whether each input device supports focus transfer. For example, if the mouse 102 and the keyboard 101 do not support focus transfer, the status of their corresponding shared controls 504 is sharing prohibited. This makes it easier for users to determine that the corresponding input device does not support focus switching.

[0179] In a possible implementation of the present application, the laptop computer may obtain 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 according to the capability information of each input device and display it in the shared input device list 502.

[0180] 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 achieving synchronous switching of the focus of the keyboard and mouse.

[0181] In a possible embodiment of the present application, when the laptop detects that the focus of the mouse 104 is switched to the PC, the laptop may also prompt the user whether to synchronously switch the focus of the keyboard to the PC. Then, based on the user's selection operation, the laptop may synchronously switch the focus of the keyboard selected by the user (such as keyboard 103) to the PC. Figure 5C As shown, the laptop displays a prompt window 500, which is used by the user to select other input devices for synchronous switching. For example, the prompt window 500 displays information about other input devices except the keyboard 103, as well as controls 508 and 509 corresponding to each input device. The user can select the input device to be synchronously switched in the prompt window 500. For example, the user uses the mouse 102 to click the control 508 corresponding to the keyboard 103, and the control 508 will be set to a selected state by the laptop, as shown in FIG. Figure 5C As shown. After the selection, the user can use the mouse 102 to click the confirmation control 506. In response to the confirmation control 506 being triggered, the laptop computer determines to switch the focus of the keyboard 103 to the PC. Of course, if the user does not want to switch the focus of other input devices, the user can operate the mouse 102 to close the prompt window 500. For example, the user can operate the mouse 102 to click the exit control 507 to trigger the laptop computer to close the prompt window 500.

[0182] For example, when terminal device 100 is a PC and terminal device 200 is a laptop, when the PC detects an operation triggered by a user to switch the focus of the PC's input device to the PC, the PC can switch the focus of some of the multiple input devices to the laptop based on the user's operation, while retaining the focus of the remaining input devices. For example, the PC has two input devices, namely mouse B and keyboard A. When the PC detects that the user instructs to switch the focus of one of the input devices, mouse B and keyboard A, to the laptop, the PC can retain the focus of the other input device, mouse B and keyboard A, to the PC by default. Figure 5D As shown in FIG. 1 , the PC detects an operation of switching the focus of the PC input device to the laptop computer, and the PC displays the following Figure 5D Interface 600 is shown. Interface 600 displays information about two input devices connected to the PC, such as the names of the wireless keyboard and the wireless mouse, connection information, and focus information. Since the focus of the wireless mouse and the wireless keyboard is not switched to other devices, Figure 5DAs shown, the words "Focus on this device" may be displayed in the interface 600 to indicate that the focus of the wireless mouse and the wireless keyboard has not been switched to other devices. In addition, the interface 600 may also display the sharing controls 601 and 602 corresponding to the wireless keyboard and the wireless mouse, respectively. Since the focus of the wireless mouse and the wireless keyboard has not been switched to other devices, Figure 5D In the interface 600, the sharing control 601 and the sharing control 602 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, so as to trigger the PC to switch the focus of the mouse B to the laptop. Figure 5E The sharing control 602 is shown in an open state. When the focus of the wireless mouse is switched to another device, optionally, Figure 5E As shown, the words “focus crossing” may also be displayed in the interface 600 to indicate that the focus of the wireless mouse is switched to other devices.

[0183] Optionally, since the input devices connected to the PC include a wireless mouse and a wireless keyboard, when the focus of the wireless mouse is switched to other devices, the PC can also set the state of the shared control 601 corresponding to the wireless keyboard to a prohibited sharing state, such as Figure 5E When the state of the sharing control 601 corresponding to the wireless keyboard is the sharing disabled state, the PC will not switch the focus of the keyboard A to other devices. This makes it easy for the subsequent user to operate the wireless keyboard to trigger the focus of the wireless mouse to switch back to the PC.

[0184] In a possible implementation of the present application, when the terminal device 100 determines that the focus of an input device A is switched to the terminal device 200, the terminal device 100 may also record the association relationship between the identification information of the input device A (such as the MAC address or device information) and the identification information of the terminal device 200. This facilitates the terminal device 100 to detect the input event of the input device A later and send the input event of the input device A to the terminal device 200 according to the association relationship. 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, 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, then the laptop can store the association relationship between the device information of the input device A and the device information of PC1, and store the association relationship between the device information of the input device B and the device information of PC2. If the laptop detects the input event of the input device B later, it can determine to send the input event of the input device B to PC2 according to the association relationship.

[0185] Optionally, if the terminal device 100 switches the focus of the input device A from the terminal device 200 back to the terminal device 100, the terminal device 100 may delete the association between the identification information of the input device A (such as the MAC address) and the identification information of the terminal device 200, or set the association to an unavailable state.

[0186] In a possible embodiment of the present application, when the terminal device 100 has more than three input devices, at least two of the more than three 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 a user to switch the focus of the mouse to the PC, the laptop computer can automatically select to 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 selects to switch the focus of one of the keyboards to the PC, or does not switch the focus of the keyboard.

[0187] Optionally, before the laptop computer chooses to synchronously switch the keyboard focus to the PC, the laptop computer may also output a prompt message to prompt the user whether to perform the keyboard-mouse synchronous switching. If the user indicates that the keyboard-mouse synchronous switching is allowed, the laptop computer switches the focus of both the mouse and keyboard to the PC. If the user indicates that the keyboard-mouse synchronous switching is not allowed, the laptop computer switches the focus of the mouse to the PC.

[0188] Figure 6 1 is a schematic diagram of the PC responding to a click event of the mouse 104 after the focus of the mouse 104 is switched from the laptop to the PC. Figure 5A to Figure 5E In the process shown, the focus of the mouse 104 is switched from the laptop to the PC, and a cursor 203 is displayed on the display interface of the PC, as shown in FIG. Figure 6 As shown in (A) of FIG. 1 , the user can manipulate the second input device (such as mouse 104) of the laptop computer so that the laptop computer detects the input event of the mouse 104. The laptop computer then feeds back the input event of the mouse 104 to the PC through the communication connection between the laptop computer and the PC. The PC responds after receiving the input event of the mouse 104 from the laptop computer. For example Figure 6As shown in Figure (B), the user can operate the mouse 104 to move the cursor 203 from the current position to the "Picture" icon 205 displayed on the main interface 204 of the PC. The user can then operate the mouse 104 to trigger the PC to open the "Picture" icon 205 displayed on the main interface 204 of the PC. Specifically, the user can perform a moving operation on the mouse 104. After the laptop detects the moving operation of the mouse 104, it reports the moving operation as an input event to the PC. Then, in response to the moving operation, the PC controls the cursor 203 to move to the "Picture" icon 205 displayed on the main interface 204. Thereafter, the user can perform a click operation on the mouse 104. After detecting the click operation of the mouse 104, the laptop can report the click operation as an input event to the PC. Then, in response to the click operation, the PC opens the picture and displays the corresponding picture interface 206, as shown in FIG. Figure 6 As shown in FIG. (C) in FIG. Afterwards, the user can also operate the mouse 104 to zoom in, zoom out, close, change pictures, etc. 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 the present embodiment of the application.

[0189] Understandably, Figure 6 Taking 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 also used to convert the movement operation into a movement event that can be recognized by the mobile phone and send it to the mobile phone. Or convert the click operation into a click event that can be recognized by the mobile phone and send it to the mobile phone.

[0190] Of course, when the mouse 104 is transferred from the laptop to the PC, if the keyboard 103 is also transferred from the laptop to the PC, 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 as follows: Figure 7 shown.

[0191] Figure 7 It is a schematic diagram of the PC responding to keyboard 103 input events. Figure 7 In the embodiment, there is a second communication connection between the PC and the laptop, a first communication connection between the keyboard 103 and / or the mouse 104 and the laptop, and the focus of the keyboard 103 and / or the mouse 104 is the PC. In this scenario, the PC can receive input events of the keyboard 103 and / or the mouse 104 detected by the laptop and respond.

[0192] like Figure 7As shown in FIG. 1 (A), the PC displays an application interface 206. When the user operates the mouse 104 so that the cursor 203 clicks the dialog box 207, the user can operate the keyboard 103 to input content in the dialog box 207. For example, the user presses the first key of the keyboard 103. After the laptop detects that the first key is pressed, it can send a first message to the PC through the second communication connection. The first message includes the key value of the first key (i.e., the input event of the keyboard 103). After receiving the first message from the laptop, the PC can display the corresponding characters in the dialog box 207. Figure 7 As shown in (B) of FIG. 1 , the user presses the key corresponding to the string of characters "keyi" on the keyboard 103. The laptop sends the key value of the key corresponding to the string of characters "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. Optionally, in addition to characters, the PC can also respond to input events such as keyboard control key commands, such as "enter", or the space bar. Figure 7 As shown in Figure (C), the user presses the space bar of the keyboard 103, and the laptop detects the space bar of the keyboard 103 being pressed, and then feeds back the key value corresponding to the space bar as an input event to the PC. The PC types the word "OK" in the dialog box in response to the space bar being pressed. After that, the user can also operate the mouse 104 so that the PC controls the cursor 203 to move to the send control on the interface, and then the user can 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 a numeric key command, such as "1", which is not limited in this embodiment.

[0193] like Figure 8 As shown, Figure 8 It is a schematic diagram of a laptop computer responding to an input event of the keyboard 101 (i.e., an unshared input device (corresponding to the second input device)). In the case where the user needs to switch the focus of the keyboard 103 and / or the mouse 104 back to the laptop computer, the user can tap at least one key in the keyboard 101, or the user can tap multiple keys in the keyboard 101 at the same time. In the case where 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 triggered by the user or the multiple keys triggered simultaneously are preset events. In the case where at least one key or multiple keys triggered simultaneously are preset events, the laptop computer switches the focus of the keyboard 103 and / or the mouse 104 from the PC back to the laptop computer. If 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 the mouse 104 from the PC back to the laptop computer, that is, the laptop computer still needs to feed back the detected input events of the keyboard 103 and / or the mouse 104 to the PC. As Figure 8 As shown in (A) of FIG. , taking the preset event that the user simultaneously presses 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 the mouse 104 from the PC back to the laptop computer. By setting a preset event in the laptop computer, and then judging whether the input event of the unshared input device (such as the keyboard 101) detected 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, so that when the user touches the unshared input device without subjective intention and causes the laptop computer to detect the input event of the unshared input device, it will not trigger the laptop computer to switch back to the focus of the shared input device, thereby reducing the phenomenon of device return due to accidental touch and improving the user experience.

[0194] 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 the embodiment of the present application.

[0195] When the notebook computer detects that the input event of the unshared input device is a preset event or not a preset event, the notebook computer may display a prompt window 801, such as Figure 8 As shown in (A) of FIG. 801 , 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 performs an action of switching back the focus of the shared input device (such as the keyboard 103 and / or the mouse 104). If the second control 8011 is triggered, the laptop computer does not perform an action of switching back the focus of the shared input device (such as the keyboard 103 and / or the mouse 104).

[0196] 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 .

[0197] If the laptop detects that the user has not performed any operation within the duration included in the countdown prompt information 802, then even if the input event of the unshared input device is a preset event, the laptop does not perform the action of switching back the focus of the shared input device (such as the keyboard 103 and / or the mouse 104). If the user has not performed any operation, it means that the user does not currently want to switch back the focus of the shared input device. Or if the laptop detects that the user has not performed any operation within the duration included in the countdown prompt information 802, then if the input event of the unshared input device is a preset event, the laptop performs the action of switching back the focus of the shared input device (such as the keyboard 103 and / or the mouse 104).

[0198] Optionally, when the time included in the countdown prompt information 802 is reached, the laptop computer cancels the display of the prompt window 801. Of course, the laptop computer can also close the prompt window 801 based on the user's operation. For example, if the laptop computer detects the user's triggering operation of closing the control on the prompt window 801, the laptop computer closes the prompt window 801.

[0199] When the laptop successfully switches the focus of the keyboard 103 and / or the mouse 104 from the PC back to the laptop, the laptop may also output a prompt message to prompt the user to successfully switch the focus of the shared input device back to the laptop. Figure 8 As shown in (B) of FIG. 8 , the notebook computer may display a prompt window 803 including prompt information. This facilitates the user to determine with the help of the prompt information that the keyboard 103 and / or the mouse 104 may be used to input content to the notebook computer later.

[0200] In a possible embodiment of the present application, Figure 8 As shown in FIG. 1B , when the focus of the keyboard 103 and / or the mouse 104 is switched from the PC back to the laptop, if the laptop detects an input event of the keyboard 103 and / or the mouse 104, the laptop responds to the input event. Figure 8 As shown in FIG. 1B , taking the case where a user operates the mouse 104 to open a video displayed on the interface of a laptop computer as an example, the laptop computer detects the opening operation of the mouse 104 as an input event, thereby displaying a playback interface 108 corresponding to the video application on the display interface of the laptop computer, as shown in FIG. Figure 8 As shown in Figure (C).

[0201] 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 is switched back to the laptop computer.

[0202] Assume that the user performs a click operation on the mouse 102 (for example, clicks the left button of the mouse three times in a row, clicks the right button of the mouse two or three times in a row, long presses the mouse wheel, clicks the left and right buttons of the mouse at the same time, double-clicks at the same time or clicks the left and right buttons of the mouse multiple times). When the laptop detects the click operation of the mouse 102, if the laptop determines that the input event of the mouse 102 is a preset event, the laptop switches the focus of the keyboard 103 and / or the mouse 104 from the PC back to the laptop. In the case where the input event of the mouse 102 is not a preset event, the laptop does not perform the action of switching the focus of the keyboard 103 and / or the mouse 104, that is, the focus of the keyboard 103 and / or the mouse 104 is maintained as the PC. Taking the preset event as the user clicking the left button of the mouse three times in a row as an example, if the user clicks the left button of the mouse 102 three times in a row, then in response to the click operation, the laptop switches the focus of the keyboard 103 and / or the mouse 104 from the PC back to the laptop. If the user clicks the left button of the mouse 102 twice in succession, the laptop computer determines that the click operation is not a preset event, and maintains the focus of the keyboard 103 and / or the mouse 104 as the PC. By judging whether the input event collected by the mouse 102 is a preset event, only when the input event is a preset event, it indicates that the user's subjective intention to switch the focus of the keyboard 103 and / or the mouse 104 back to the laptop computer is very high. In other words, the operation of triggering the switching of the focus of the keyboard 103 and / or the mouse 104 back to the laptop computer is not an accidental touch. Therefore, in this case, the focus of the keyboard 103 and / or the mouse 104 is switched back to the laptop computer, which can avoid the focus switching back caused by the user's accidental touch.

[0203] 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.

[0204] 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 an input event of a 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 an 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 traversed input device back.

[0205] like Fig. 9As shown, 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. Among them, the prompt information displayed in the prompt window 108 is used to prompt the user whether to switch back to "Huawei keyboard M11" (corresponding to keyboard 103).

[0206] Optionally, the prompt window 108 also 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 the second control 1082 being triggered, the laptop computer will not perform 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 combining the display of prompt information 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 information, the focus switching back can be more in line with the user's intention, avoid misjudgment, and improve the user experience.

[0207] Optionally, the prompt window 108 may also display a countdown prompt message 1083, which may be used to prompt the user of the operable time. If the laptop detects that the user has not triggered an operation on the first control 1081 and the second control 1082 within the time (e.g., 5 seconds) included in the countdown prompt message 1083, the laptop may determine that the user does not need to switch back to the focus of the keyboard 103, so that even if a preset event of an unshared input device is collected, the action of switching back to 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.

[0208] In a possible embodiment of the present application, when the focus of multiple first input devices (such as keyboard 103 and mouse 104) of the laptop computer 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.

[0209] Optionally, when the focus of multiple input devices (such as the first input device) of the 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, in order to improve the flexibility of operation and make the focus switching back more in line with expectations, when the laptop computer detects that the input event of the second input device is a preset event, such as Fig.10As shown, the laptop computer can also output a prompt window 109, which includes a fourth control 1091, a fifth control 1092, and a sixth control 1093. Among them, the fourth control 1091 is triggered to switch the focus of the shared input device (such as keyboard 103) corresponding to the fourth control 1091 back to the laptop computer. The fifth control 1092 is triggered to switch the focus of the shared input device (such as mouse 104) corresponding to the fifth control 1092 back to the laptop computer. The sixth control 1093 is triggered to switch the focus of all shared input devices (such as mouse 104 and keyboard 103) back to the laptop computer. Assuming that the user needs to switch the focus of mouse 104 back to the laptop computer, the user can operate an unshared input device such as mouse 102 to select the fifth control 1092. In response to the operation of the fifth control 1092 being triggered, the laptop computer switches the focus of mouse 104 back to the laptop computer.

[0210] like Fig.11 As shown, Fig.11 In the scenario where the focus of multiple input devices of a laptop computer is switched to different terminal devices, it is assumed 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 of all shared input devices.

[0211] However, in order to further improve the user experience, the focus of the input device that meets the user's needs is switched back to the laptop, such as Fig.11 As shown, when the input event of the keyboard 101 is a preset event, the notebook computer can also output a prompt interface 1100. The prompt interface 1100 is used to prompt the user to select the shared input device to be switched back, and the information of the terminal device through which the focus of each shared input device passes. Fig.11As shown, the prompt interface 1100 includes a first device window 1101, a second device window 1102, and a third device window 1106. The first device window 1101 is used to display that the focus of the mouse 104 is switched to 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 DESKTOP-HM11 (i.e., PC1), and the second device window 1102 also includes a focus switch back control 1105. The third device window 1106 is used to display that the focus of the keyboard 101 is switched to DESKTOP-LSM (i.e., PC2), and the third device window 1106 also includes a focus switch back control 1107. When the focus switch back control 1104 is triggered, the laptop computer switches the focus of the mouse 104 from PC1 back to the laptop computer in response to the operation of the focus switch back control 1104 being triggered. The focus switch back control 1105 is triggered, and the laptop switches the focus of the keyboard 103 from PC1 back to the laptop in response to the triggering of the focus switch back control 1105. The focus switch back control 1107 is triggered, and the laptop switches the focus of the keyboard 101 from PC2 back to the laptop in response to the triggering of the focus switch back control 1107. The focus switch back control 1103 is triggered, and the laptop switches the focus of the mouse 104 and keyboard 103 from PC1 back to the laptop, and switches the focus of the keyboard 101 from PC2 back to the laptop in response to the triggering of the focus switch back control 1103.

[0212] In a possible embodiment of the present application, the above Fig.11 The interface shown may also include a one-key switch back control 1110. When the one-key switch back control 1110 is triggered, the laptop switches the focus of the mouse 104 and the keyboard 103 from PC1 back to the laptop. Similarly, when the one-key switch back control 1111 is triggered, the laptop switches the focus of the keyboard 101 from PC2 back to the laptop.

[0213] 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 method can achieve one-key switch back to the focus of all shared input devices.

[0214] In a possible embodiment of the present application, the notebook computer displays the following Fig.11 In the case of the interface shown, if no operation of the user input is detected within a preset time (such as 5 seconds), the laptop computer will not perform the focus switching back action.

[0215] 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 to display the cursor on the PC interface or cancel the display of the cursor, which is not limited in this embodiment of the present application.

[0216] like Fig.12 As shown, Fig.12 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 Figure 1 In the communication system shown, 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, and the method includes:

[0217] Step 1201: A second communication connection is established between a first terminal device and a second terminal device.

[0218] In some embodiments, the first terminal device may be Figure 1 The terminal device 100 shown in FIG. 1 (such as a PC) and the second terminal device may be Figure 1 The terminal device 200 (such as a PAD, a mobile phone) shown in the figure, the first terminal device and the second terminal device establish a communication connection, and form a communication system 10. The description of the communication system 10 can refer to the above embodiment. The first terminal device and the second terminal device can be equipped with OS or other types of operating systems. The operating systems of the first device and the second terminal device may be the same or different, and this application does not impose any restrictions on this.

[0219] 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.

[0220] The first terminal device in the embodiment of the present application may be configured with at least two of the input devices such as a mouse, a keyboard, and a handwriting tablet as the first input device and the second input device. For example, the first input device may be a mouse 102 and a keyboard 101. The second input device may be a mouse 104 and a keyboard 103, which is not limited in the embodiment of the present application.

[0221] The at least two input devices mentioned above 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 in 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.

[0222] The following takes the example that the first terminal device switches the focus of the first input device to the second terminal device according to the user's demand.

[0223] Step 1202: The first terminal device switches the focus of the first input device to the second terminal device.

[0224] 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 (such as the first input event) of the first input device. 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 through the second communication connection, so that the second terminal device responds to the first input event of the first input device.

[0225] 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.

[0226] 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 are not limited thereto.

[0227] 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.

[0228] 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:

[0229] Step 1203: The first terminal device detects a first input event of the first input device.

[0230] For example, taking the first input device as a mouse, the first input event may 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 may be an input event such as tapping a plurality of keys on the keyboard. For example, the user inputs the character "keyi" to the second terminal device with the help of the keyboard. Of course, when the first input device is a voice input device, the first input event may 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 may also be an input event such as a touch and click operation. When the first input device is a stylus, the first input event may also be an event input by the user using the stylus on the touch screen of the first terminal device. The embodiments of the present application are not limited to this.

[0231] 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.

[0232] Step 1205: The second terminal device responds to the first input event.

[0233] 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 of the keyboard, and so on.

[0234] It is understandable that the specific implementation of steps 1203 to 1205 can refer to Figure 6 and Figure 7 The process shown will not be repeated here.

[0235] The first terminal device has multiple input devices, and the focus of some input devices (such as the first input device) among the multiple input devices is switched to other terminal devices. For the first terminal device, it can establish an association relationship between the identifiers of the part of the input devices and 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 according to the association relationship. For example, the multiple input devices include mouse 102, mouse 104, keyboard 101 and keyboard 103, and the focus of mouse 102 and keyboard 101 is switched to PC1, then the first terminal device can associate the identifier of mouse 102 and the identifier of keyboard 101 with PC1, so that when the input event of mouse 102 is detected later, it can determine to send the input event collected by mouse 102 to PC1 according to 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, so that when the input event of keyboard 103 is detected later, it can determine to send the input event collected by keyboard 103 to PC2 according to the association relationship.

[0236] When the focus of the first input device is switched 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 to switch back in combination with the input event of the second input device. Specifically, Fig.12 As shown, after step 1205, the method provided in the embodiment of the present application may further include:

[0237] Step 1206: The first terminal device detects a second input event of the second input device.

[0238] Step 1207: The first terminal device determines whether the second input event detected by the second input device is a preset event.

[0239] The second input device is any input device of the at least two input devices except the first input device. The second input device may be a mouse, a keyboard, a stylus, a voice input device or a touch pad.

[0240] 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 switch back the focus. For example, the preset event may be a mouse event or a keyboard event. For example, a mouse event may be a single click or double click of the left or right button of a mouse, or a single click or multiple consecutive clicks of the left and right buttons of a mouse at the same time. For another example, the preset event may 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 buttons of a mouse. 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 may 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.

[0241] When 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. The embodiments of the present application are not limited to this.

[0242] 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, at least two fingers are detected to touch and click or touch the touch screen multiple times in succession. Or for a tablet computer, it usually has a power button and a volume button (volume button + and volume button one), and 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 in the case where the tablet computer has input devices 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.

[0243] In some possible embodiments of the present application, the second input device such as a keyboard or a mouse may also have 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.

[0244] As an example, the preset event can also be as follows Figure 5D and Figure 5E As shown, the shared control corresponding to the shared input device is closed.

[0245] 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.

[0246] 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 event, or display the preset events currently available in the first terminal device to the user.

[0247] Optionally, the preset event in the embodiment of the present application may include multiple sub-preset input events, such as a first preset event and a second preset event. Assuming that there are two first input devices in the first terminal device and the focus is switched to the second terminal device, the laptop can set different preset events for each first input device based on the user's operation, such as setting a first preset event for one first input device and setting a second preset event for another input device, so that if the first terminal device detects that the input event of the second input device is the first preset event, the first terminal device switches the focus of the first input device associated with the first preset event back. If the first terminal device detects that the input event of the second input device is the second preset event, the first terminal device switches the focus of the first input device associated with the second input event back. Optionally, the preset event may also include a third preset event. If the first terminal device detects that the input event of the second input device is the third preset event, the first terminal device switches the focus of both the first input device and the second input device back to the first terminal device. In the case where 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, so that when the focus of multiple input devices is switched to the second terminal device, according to the input event of the second input device, the corresponding first input device is selected to be switched back. Makes the operation more flexible.

[0248] 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.

[0249] 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 directly switching the focus back to the first input device without making any judgment upon detecting the second input event.

[0250] The control method of the shared input device provided in the embodiment of the present application can be realized when the focus of the shared input device (such as the first input device) is switched from a terminal device (such as the first terminal device) in the communication system to another terminal device (such as the second terminal device), and the first terminal device uses 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. 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 first input event of the detected first input device to the second terminal device, so that the second terminal device responds, 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.

[0251] In a possible embodiment of the present application, Fig.12 As shown, the method provided in the embodiment of the present application may further include, after step 1207:

[0252] 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.

[0253] Optionally, for the first terminal device, when the focus of the first input device is switched to the 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 also 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. Or 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.

[0254] In a possible embodiment of the present application, the method provided by 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, the prompt interface being used to display the content of the preset event to the user. In this way, when the user needs to switch back to the focus of the first input device, he 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.

[0255] In a possible embodiment of the present application, Fig.12 As shown, the method provided in the embodiment of the present application may further include, after step 1208:

[0256] Step 1210: The first terminal device detects a third input event of the first input device.

[0257] 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.

[0258] Step 1211: The first terminal device responds to a third input event.

[0259] 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, the above steps 1210 to 1211 may be omitted.

[0260] 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 to switch the focus of the first input device back to the first terminal device.

[0261] As an example, Figure 8As shown, the first terminal device can output a prompt card 801 including the first prompt information. The prompt card 801 can 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.

[0262] Combining the preset event and the user's comprehensive judgment on the first prompt information can further prevent accidental touches.

[0263] In a 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 prompt 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 determine that the first input device can be used to operate the first terminal device later with the help of the prompt message output by the first terminal device.

[0264] In a 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 the embodiment of the present application may further include: the first terminal device detects 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 as the second terminal device.

[0265] like Fig.13 As shown, Fig.13 Another control method for a shared input device provided in an embodiment of the present application is applied to a communication system, wherein the communication system 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 is provided 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. Fig.13 As shown, the method provided in the embodiment of the present application may also include:

[0266] Step 1301: 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 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.

[0267] The first focus return request is used to request to switch the focus of the first input device back to the first terminal device.

[0268] Optionally, the first focus return request carries a first field, and the first field can be used 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.

[0269] Optionally, the first focus transfer request includes identification information of the first input device, so that the second terminal device can determine which input device the first terminal device requests to transfer the focus back to. For example, the identification information of the first input device can be the MAC address of the first input device. This embodiment of the application does not limit this.

[0270] Optionally, if there are multiple first input devices, that is, the focus of 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 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 first input devices, then the first focus return request may include the identification information of some first input devices.

[0271] As a possible implementation, when the first terminal device switches the focus of the first input device to the second terminal device, the first terminal device may send the identification information of the first input device to the second terminal device. Optionally, the first terminal device may also send the 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, so that the second terminal device can determine which terminal device the first input device comes from according to the mapping relationship.

[0272] Taking the communication connection as a Bluetooth communication connection as an example, the first terminal device can send a first focus relocation request to the second terminal device via the Bluetooth communication connection.

[0273] 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.

[0274] 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 .

[0275] 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 .

[0276] In a possible implementation of the present application, when the focus of the first input device is switched to the second terminal device, if the second terminal device can periodically detect the input events collected by the first input device every predetermined time (for example, 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 the input event of the first input device sent by the first terminal device within a preset time (for example, 5 seconds), the second terminal device determines that it is not necessary to continue to hold the focus of the first input device.

[0277] In a possible implementation of the present application, when the second terminal device receives the first focus switch back request from the first terminal device, the second terminal device determines whether the second terminal device is currently in a focus active state. If it is in the focus active state, a rejection migration response is fed back to the first terminal device to indicate a rejection of returning the focus of the first input device to its original position.

[0278] 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 get the focus; at the same time, the window where the text box is located will get the focus. In addition, since the visual interface of the second terminal device is generally composed of various components, and the components can be contained in various visible windows, a typical example is the Android system, which abstracts each user-visible interface into a window; therefore, in order to determine that 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 input.

[0279] 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 he 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.

[0280] 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.

[0281] 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.

[0282] Optionally, the migration 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.

[0283] Step 1304: In response to rejecting the migration response, the first terminal device maintains the focus of the first input device as the second terminal device.

[0284] In step 1304 , the first terminal device maintaining the focus of the first input device as 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.

[0285] 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 subsequently 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.

[0286] 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.

[0287] In a possible embodiment of the present application, the above steps 1301 to 1304 describe a process in which the first terminal device fails to successfully switch back the focus of the first input device through the first focus switch back request. In the subsequent process, the first terminal device can still send a focus switch back request (such as the second focus switch back request described below) to the second terminal device to request to switch back the focus of the first input device. Optionally, Fig.13 As shown, after step 1304, the following steps may also be included:

[0288] Step 1305: The first terminal device sends a second focus transfer request to the second terminal device. Correspondingly, the second terminal device receives the second focus transfer request from the first terminal device.

[0289] 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 the content of the first focus return request, which is not limited in the embodiment of the present application.

[0290] Step 1306: The second terminal device determines whether to continue to hold the focus of the first input device.

[0291] For the specific implementation of step 1306, please refer to the description of step 1302 above, which will not be repeated here.

[0292] Step 1307: When the second terminal device does not need to continue 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.

[0293] The focus transfer response indicates that the second terminal device releases the focus of the first input device.

[0294] Step 1308: 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.

[0295] 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, Fig.13 As shown, the first terminal device may also execute step 1309.

[0296] Step 1309: The first terminal device responds to an input event of the first input device.

[0297] In a 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, and 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.

[0298] 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.

[0299] The above focus switching back condition may be a user-defined setting or a factory-default condition of the first terminal device, which is not limited in the embodiment of the present application.

[0300] As an example, the communication system may further include a second input device connected to the first terminal device, and the focus of the second input device is 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) of the second input device, and the first terminal device determines that the focus switching back condition is satisfied. For example, if the second input device is a mouse, then if the user accidentally touches the mouse, causing the mouse to move, or the user clicks the mouse, it can be regarded as the first terminal device detecting an input event of the second input device. At this time, the first terminal device can determine that the focus switching back condition is satisfied, and then execute step 1301.

[0301] The input event of the second input device may be any input event or a specified input event, which is not limited in the embodiment of the present application.

[0302] In other embodiments of the present application, in order to prevent the first terminal device from erroneously determining that the user triggers the focus switch back due to an accidental touch, when the first terminal device detects that the input event collected by the second input device is a preset event, the first terminal device determines that the focus switch back condition is met and executes step 1301. The specific implementation of this process can refer to the above Fig.12 The embodiments shown will not be described in detail here.

[0303] 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 rejection response of the migration, the method provided by the embodiment of the present application may further include:

[0304] The first terminal device outputs a prompt message, wherein the prompt message is used to prompt that the focus of the first input device is not successfully switched back to the first terminal device.

[0305] In this way, the user can use the prompt information to determine that the focus of the first input device is still 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 so that the first terminal device continues to send a focus transfer request to the second terminal device.

[0306] like Fig.14A As shown, taking the first terminal device as a laptop computer as an example, when the focus of the mouse 104 and the keyboard 103 is the PC, assuming that the user wants to switch the focus of the mouse 104 and the keyboard 103 back to the laptop computer, the user can use the mouse 102 to trigger the laptop computer to display the following Fig.14AThe input device sharing management interface 1400 is shown. In the input device sharing management interface 1400, multiple device sharing information (such as device sharing information 1401 and device sharing information 1402) are displayed to determine which is the focus of each input device. Fig.14A It can be seen that the focus of the mouse 104 and the 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 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 the user needs to switch back the focus of the keyboard 103, the user can use the mouse 102 to click the focus switch back control 1405. The laptop detects that the focus switch back control 1405 is triggered and sends a first focus switch back request to PC1 to request to switch back the focus of the mouse 104. After PC1 receives the first focus switch back request, PC1 determines that the mouse 104 and keyboard 103 are currently needed to input information, then PC1 can send a focus return rejection response to the laptop.

[0307] Optionally, after receiving the focus return rejection response, the laptop computer may display the following Fig. 14B The prompt information 1408 shown. For example, the content of the prompt information 1408 may be: focus switching back failed. Optionally, as Fig. 14B As shown, the prompt information 1408 may also include a detail control 1409 , and the detail control 1409 is used to describe the reason why the focus switching back fails, for example, the PC 1 does not release the focus of the mouse 104 and the keyboard 103 .

[0308] In other embodiments of the present application, since the focus of the mouse 104 and the keyboard 103 of the notebook computer are switched to the same PC, Fig.14A When any one of the focus switch back controls 1405 and 1404 is triggered, the laptop computer can request to switch back the focus of all input devices switched to the same PC. 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 back the focus of both the mouse 104 and the keyboard 103. For example, the first focus switch back request includes identification information of the mouse 104 and the keyboard 103.

[0309] In some other embodiments of the present application, when any one of the focus switch back control 1405 and the 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 the focus switch back control 1405 is triggered, the laptop computer sends a first focus switch back request to the PC to request to switch back the focus of the keyboard 103. For example, the first focus switch back request may carry the identification information of the keyboard 103, so that the PC can determine that the laptop computer requests to switch back the focus of the keyboard 103.

[0310] 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 computer to switch back the focus of all shared input devices. For example, when the laptop computer detects that the one-key switch back control 1403 is triggered, the laptop computer sends a first focus switch back request to PC1 requesting to switch back the focus of the mouse 104 and the keyboard 103, and sends a first focus switch back request to PC2 requesting to switch back the focus of the keyboard 101.

[0311] Optionally, in order to facilitate the user to determine that the focus of the first input device has been successfully switched back to the first terminal device, the method provided in the embodiment of the present application can also output a prompt message after the first terminal device switches the focus of the first input device back to the first terminal device to prompt the user that the focus of the first input device has been successfully switched back to the first terminal device. Fig.15 As shown, the first terminal device may display a prompt window 1500 on its interface, and the prompt window 1500 is used to prompt that the focus of the shared input device has been successfully switched back to the first terminal device.

[0312] 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 each function. Those skilled in the art should easily realize 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.

[0313] In the embodiment of the present application, the terminal device (including the first terminal device and the second terminal device) can be divided 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 module 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 function division. There may be other division methods in actual implementation.

[0314] For example, when the functional modules are divided in an integrated manner, Fig.16 As shown in FIG. 1 , a block diagram of a terminal device provided in an embodiment of the present application is shown. Fig.16 As shown, the terminal device may include a communication unit 1613 , a processing unit 1612 and a storage unit 1611 .

[0315] 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.

[0316] As an example, the communication unit 1613 may include a radio frequency circuit. Specifically, the terminal device may receive and send wireless signals through 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, etc. In addition, the radio frequency circuit may also communicate with other devices through wireless communication. The wireless communication may use 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, short message service, etc.

[0317] It should be understood that each module in the terminal device can be implemented in software and / or hardware form, and there is no specific limitation on this. In other words, the input device is presented in the form of a functional module. The "module" here can refer to a specific application integrated circuit ASIC, a circuit, a processor and a memory that executes one or more software or firmware programs, an integrated logic circuit, and / or other devices that can provide the above functions.

[0318] Fig.17 1 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 .

[0319] 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).

[0320] In some embodiments, the memory 1740 stores the following elements, execution modules or data structures, or a subset thereof, or an extended set thereof.

[0321] 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).

[0322] In a possible implementation manner, the structures of the first terminal device and the second terminal device are similar, and different devices may use different chips to implement their respective functions.

[0323] The processor 1710 controls the processing operation of any one of the first terminal device and the second terminal device. The processor 1710 may also be referred to as a central processing unit (CPU).

[0324] The memory 1740 may include a read-only memory and a random access memory, and provides instructions and data to the processor 1710. A portion of the memory 1740 may also include an NVRAM. For example, in an application, the memory 1740, the communication interface 1730, and the memory 1740 are coupled together via a bus system 1720, wherein the bus system 1720 may include a power bus, a control bus, and a status signal bus in addition to a data bus. However, for the sake of clarity, in Fig.17 Various buses are labeled as bus system 1720.

[0325] The method disclosed in the above embodiment of the present application can be applied to the processor 1710, or implemented by the processor 1710. The processor 1710 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 1710. The above processor 1710 can be a general-purpose processor, a digital signal processor (digital signal processing, DSP), an ASIC, a field-programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The 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 the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, 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.

[0326] In a possible implementation, taking the chip 170 applied to the first terminal device as an example, the communication interface 1730 is used to execute Fig.12 or Fig.13 The first terminal device receives and sends the steps in the embodiment shown. The processor 1710 is configured to execute Fig.12 and / or Fig.13 The steps of the processing of the first terminal device in the illustrated embodiment.

[0327] In a possible implementation, taking the chip 170 applied to the second terminal device as an example, the communication interface 1730 is used to execute Fig.12 and / or Fig.13 The steps of receiving and sending by the second terminal device in the embodiment shown. The processor 1710 is configured to execute Fig.12 and / or Fig.13 The steps of the processing of the second terminal device in the illustrated embodiment.

[0328] 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 in a chip, the communication module is a communication interface of the chip used to receive or send signals from other chips or devices.

[0329] The embodiment of the present application also provides a communication system, which includes: 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. The focus of at least one input device (such as the first input device) of the input devices is the second terminal device, wherein the first terminal device is used to execute Fig.12 In the embodiment shown, the action is performed by the first terminal device. The second terminal device is used to perform Fig.12 The actions performed by the second terminal device in the illustrated embodiment.

[0330] The embodiment of the present application also provides a communication system, which includes: 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, and the first terminal device is used to execute Fig.13 In the embodiment shown, the action is performed by the first terminal device. The second terminal device is used to perform Fig.13 The actions performed by the second terminal device in the illustrated embodiment.

[0331] The embodiment of the present application also provides a computer-readable storage medium for storing computer program code, the computer program including instructions for executing the control method of a shared input device provided in the embodiment of the present application. The readable medium may be a read-only memory (ROM) or a random access memory (RAM), which is not limited in the embodiment of the present application.

[0332] 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.

[0333] 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.

[0334] The embodiment of the present application also provides a chip system applied to a terminal device, the chip system includes: a processing unit and a communication unit, the processing unit, for example, may be a processor, the communication unit, for example, may be an input / output interface, a pin or a circuit, etc. The processing unit may execute computer instructions to enable the electronic device to execute the cross-device collaborative method for multiplexing input devices provided in the embodiment of the present application.

[0335] Optionally, the computer instructions are stored in a storage unit.

[0336] Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc. The storage unit can also be a storage unit located outside the chip in 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. Among them, 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 realize the respective functions of the processing unit and the storage unit, so as to support the system chip to realize the various functions in the above-mentioned embodiments. Alternatively, the processing unit and the memory can also be coupled on the same device.

[0337] The first electronic device, the second electronic device, the computer storage medium, the computer program product or the chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.

[0338] Through the description of the above implementation mode, those skilled in the art can understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In practical 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.

[0339] It should be understood that the devices and methods disclosed in the several embodiments provided in the present application can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device. In addition, some features can be ignored or not performed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0340] The units described as separate components may or may not be physically separated. The components shown as units may be one physical unit or multiple physical units. That is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected to achieve the purpose of this solution according to actual needs.

[0341] In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit; or may exist physically separately; or some units may be integrated into one unit, and some units may exist physically separately. The above-mentioned integrated units may be implemented in the form of hardware or in the form of software functional units.

[0342] 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 to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to perform 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.

[0343] It should be noted that all or part of the above-mentioned embodiments provided in the present application (for example, part or all of any feature) can be arbitrarily combined or used in combination with each other.

[0344] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope 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.