Input method synchronization method, graphical interface and related device

By automatically synchronizing the input method in the keyboard and mouse sharing scenario, the problem of inconsistent input experience between devices is solved and the user experience is improved.

CN119556804APending Publication Date: 2025-03-04HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311061800.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-22
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

How to maintain consistency in the input experience when users go from sharing PC keyboards and mouse to directly using mobile phone input, especially during input method switching between devices.

Method used

An input method synchronization method is provided, and the input method is automatically synchronized in the keyboard and mouse sharing scenario between the first device and the second device. The specific steps include establishing a connection between the first device and the second device. After detecting the key-and-mouse crossing operation, the first device sends a message to instruct the second device to display the corresponding cursor and switch the input method type.

Benefits of technology

Automatic synchronization of input method types across devices is achieved, meeting the user's need to keep the input method consistent when switching devices, and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119556804A_ABST
    Figure CN119556804A_ABST
Patent Text Reader

Abstract

The invention provides an input method synchronization method, a graphical interface and a related device. The method provided by the invention comprises the following steps: after a first device detects a keyboard and mouse traversal operation, acquiring an input method type adopted by the first device and sending the input method type to a second device, and synchronizing the input method type of the second device into the input method type adopted by the first device by the second device according to the input method type; in addition, after the first device and the second device are in the keyboard and mouse crossing state, if the first device switches the input method type, the input method type of the second device is synchronized to the input method type after the first device is switched.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communications, and in particular to an input method synchronization method, a graphical interface and related devices. Background Art

[0002] When a user uses a personal computer (PC) to share a keyboard and mouse with a mobile phone, when the user switches from sharing the PC's keyboard and mouse to input into the mobile phone, to directly using the corresponding capabilities of the mobile phone to input, how to maintain a consistent input experience when switching between sharing the PC's keyboard and mouse and directly using the corresponding capabilities of the mobile phone to input is an urgent problem to be solved. Summary of the invention

[0003] The present application provides an input method synchronization method, a graphical interface, and related devices, which can realize the function of automatic synchronization of input methods between different devices in a scenario where a first device and a second device share a keyboard and a mouse.

[0004] In a first aspect, an input method synchronization method is provided, which is applied to a first device, wherein the first device includes an input device, the input device includes a mouse, and also includes a virtual keyboard and / or a physical keyboard, the method including: the first device displays a first cursor corresponding to the mouse; the first device receives a first operation, and the first device stops displaying the first cursor; the first device sends a first message, and the first message is used to instruct the second device to display a second cursor corresponding to the mouse; the first device also sends a second message, and the second message is used to instruct the second device to switch the input method to the first input method, and the first input method is the input method used by the first device.

[0005] Implementing the method provided in the first aspect can provide users with automatic synchronization services of input method types across devices in a keyboard and mouse sharing scenario, which can meet the user's needs to keep the input method consistent when switching inputs from different devices, and is conducive to improving the user experience.

[0006] In combination with the first aspect, before the first device sends the first message, the method further includes: the first device establishing a first connection with the second device.

[0007] In this way, the first device can establish a first connection with the second device, and implement a keyboard and mouse sharing function and an input method synchronization function based on the first connection, thereby improving the possibility of implementing the solution.

[0008] In combination with the first aspect, the first device establishing the first connection with the second device specifically includes: before the first device receives the first operation, the first device establishing the first connection with the second device.

[0009] In this way, the time to establish the connection can be set before receiving the first operation, namely the keyboard and mouse crossing operation, so that after receiving the keyboard and mouse crossing operation, the first device can realize the keyboard and mouse sharing function as soon as possible based on the first connection, and synchronize the input method type as soon as possible to meet the user's requirements for latency.

[0010] In combination with the first aspect, in certain implementations of the first aspect, the first connection established between the first device and the second device specifically includes: after the first device receives the first operation, the first device establishes a first connection with the second device. Compared with the method of establishing the first connection before the keyboard and mouse crossing operation, this method saves transmission resources and avoids wasting communication resources.

[0011] In combination with the first aspect, in certain implementations of the first aspect, another first connection established between the first device and the second device specifically includes: before the first device receives the first operation, the first device establishes a first connection with the second device, the first device obtains information necessary for connecting with the second device, such as device identification location, etc., and then disconnects the first connection; after the first operation, the first device establishes a first connection with the second device again.

[0012] In this way, by establishing two communication connections, compared with the previous method of establishing the first connection, both resource saving and low latency can be achieved.

[0013] In combination with the first aspect, in certain implementations of the first aspect, the first connection specifically includes being implemented through any one or more of the following communication technologies: point-to-point P2P connection, wireless local area network WLAN, Bluetooth BT, short-range wireless communication technology NFC or infrared technology IR.

[0014] In this way, the first connection can be established through the above-mentioned multiple communication technologies, thereby improving the feasibility of this solution.

[0015] In conjunction with the first aspect, in some implementations of the first aspect, the receiving of the first operation specifically includes: a first movement operation on the mouse. The first movement operation specifically may be: operating the cursor shown by the mouse to continuously touch or exceed the edge of the screen.

[0016] In this way, the first movement operation can avoid the possibility of user's mis-triggering through multiple movements, thereby improving the user experience.

[0017] In combination with the first aspect, in some implementations of the first aspect, after receiving the first operation, the method further includes: the first device displays a first interface, and the first interface does not include an interface displayed by the second device.

[0018] In this way, in the keyboard and mouse sharing scenario, the first device and the second device are close to each other. When the user uses the keyboard and mouse of the first device to control the second device, the user can also directly see the interface of the second device. Therefore, there is no need to display the interface of the second device on the first device, thereby saving the data flow required to transmit the interface, saving communication resources, and increasing the possibility of implementing the first operation.

[0019] In combination with the first aspect, in certain implementations of the first aspect, after receiving the first operation, the method also includes: the first device receives a second operation acting on the input device; the first device sends a third message, and the third message is used to instruct the second device to execute an event corresponding to the second operation.

[0020] In this way, after the crossing, the keyboard and mouse of the first device can be used to control the second device to execute the corresponding event. Specifically, based on the second operation on the keyboard and mouse of the first device, the first device no longer executes the event corresponding to the second operation, but sends the message corresponding to the second operation to the second device, and the second device executes the corresponding event. Therefore, it is avoided that the first device responds to the redundant operation while operating the second device after being in the keyboard and mouse crossing state, which improves the user experience.

[0021] In combination with the first aspect, in some implementations of the first aspect, the first message and the second message are specifically sent in the following manner: the first device packages the first message and the second message into one message and sends the message.

[0022] The present application provides a method for the first device to package the first message and the second message into one message and then send it, which can realize packaging the sent input method type in the keyboard and mouse message and sending it together without setting an additional transmission protocol for transmitting the input method type. This can avoid wasting transmission resources and improve the transmission efficiency of messages.

[0023] In combination with the first aspect, in certain implementations of the first aspect, after the first device sends the second message, the method also includes: the first device switches the first input method to the second input method; the first device sends the fourth message, and the fourth message is used to instruct the second device to switch the input method to the second input method.

[0024] In this way, after the first device and the second device are in the keyboard and mouse crossing state, if the input method type of the first device changes, the input method of the second device will also change to the same type of input method. Through this method, the input methods of the first device and the second device can be synchronized in real time, thereby avoiding the user's extra operation of switching input methods, and improving the user's operating experience.

[0025] In combination with the first aspect, in some implementations of the first aspect, the first device adopts a first system, and the second device adopts a second system.

[0026] The present application provides that the first device adopts the first system and the second device adopts the second system, further refining the specific composition of the first device and the second device, realizing the input method synchronization function across system devices, and improving the possibility of realizing the above implementation.

[0027] In a second aspect, the present application provides an electronic device, comprising one or more memories and one or more processors; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code comprises computer instructions, and the one or more processors call the computer instructions so that the electronic device executes any one of the methods described in the first aspect above.

[0028] In a third aspect, the present application provides a communication system, which includes a first device and multiple electronic devices, the first device including one or more memories and one or more processors; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the first device to execute any method described in the first aspect above.

[0029] In a fourth aspect, the present application provides a chip, which is applied to an electronic device, and the chip includes one or more processors, and the processor is used to call computer instructions so that the electronic device executes any method described in the first aspect above.

[0030] In a fifth aspect, the present application provides a computer-readable storage medium, comprising instructions, which, when executed on an electronic device, enable the electronic device to execute any method described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 A schematic diagram of a keyboard and mouse sharing scenario provided in an embodiment of the present application;

[0032] Figure 2A-2B A schematic diagram of a keyboard and mouse traversal operation interface provided in an embodiment of the present application;

[0033] Figure 3A-3E A schematic diagram of another keyboard and mouse traversal operation interface provided in an embodiment of the present application;

[0034] Figure 4 A schematic diagram of a flow chart of an input method synchronization method provided in an embodiment of the present application;

[0035] Figure 5 A specific implementation of an input method synchronization method provided in an embodiment of the present application;

[0036] Figure 6 A specific implementation of another input method synchronization method provided in an embodiment of the present application;

[0037] Figure 7 A specific implementation of another input method synchronization method provided in an embodiment of the present application;

[0038] Figure 8 A schematic diagram of the hardware architecture of a first device provided in an embodiment of the present application;

[0039] Fig. 9 A schematic diagram of the hardware architecture of a second device provided in an embodiment of the present application;

[0040] Fig.10 A software architecture block diagram of a first device provided in an embodiment of the present application;

[0041] Fig.11 A software architecture block diagram of a second device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0043] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0044] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.

[0045] The term "user interface (UI)" in the following embodiments of the present application refers to a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is a source code written in a specific computer language such as Java and extensible markup language (XML). The interface source code is parsed and rendered on an electronic device, and finally presented as content that can be recognized by the user. The commonly used form of user interface is a graphical user interface (GUI), which refers to a user interface related to computer operation displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of an electronic device.

[0046] This application refers to the following terms:

[0047] The keyboard and mouse sharing function refers to a function in which a first device provides keyboard input capability and mouse input capability to other connected devices. Specifically, for a first device equipped with an input device, the first device can provide one or more other devices (such as a second device) with a function of sharing the input device of the first device. The input device includes a mouse and a keyboard (physical keyboard and / or virtual keyboard). For example, when the first device is a personal computer (PC) and the second device is a mobile phone, the keyboard and mouse sharing function is a function provided by the PC to enable the mobile phone to share its keyboard and mouse. In other words, the information input to the keyboard and mouse of the PC can be used to control the mobile phone.

[0048] The keyboard and mouse crossing operation, which may also be referred to as the first operation, refers to a specific operation input through the input device of the first device. Specifically, the operation is a first movement operation on the mouse of the first device, or an operation on a virtual control displayed on the screen of the first device, or a voice command, etc., which is not limited in this embodiment. Specifically, the first movement operation may be an operation of controlling the cursor corresponding to the mouse to move toward the edge of the first device one or more times in a row.

[0049] The keyboard and mouse cross-operation state refers to the state of the first device and the second device after the first device establishes a communication connection with the second device and detects the keyboard and mouse cross-operation. The state specifically includes: information input to the keyboard and mouse of the first device can be used as input information of the second device to control the second device.

[0050] The non-keyboard-mouse-passthrough state refers to the state that the first device and the second device are in before the first device receives the keyboard-mouse-passthrough operation, or after the second device receives the keyboard-mouse-passthrough end operation. When the first device and the second device are in the keyboard-mouse-passthrough state, the first device and the second device may have established a communication connection, or may not have established a communication connection.

[0051] In order to better understand the embodiments of the present application, the application scenarios to which the embodiments of the present application are applicable are first introduced.

[0052] Figure 1 A schematic diagram of a keyboard and mouse sharing scenario provided by the present application is exemplified.

[0053] like Figure 1 As shown, the application scenario involves a communication system 100, which includes a first device and a second device, wherein the first device is temporarily illustrated by a PC as an example, and the second device is temporarily illustrated by a mobile phone as an example.

[0054] The first device may provide a keyboard and mouse sharing function. After the first device turns on the keyboard and mouse sharing function, the first device may search for nearby electronic devices that can be connected, such as Figure 1 The mobile phone and tablet shown. The first device can also establish a communication connection with one or more devices found according to user operations, for example, the user drags the mobile device icon to a designated UI area to establish a communication connection with the mobile phone. The communication connection can be used for the first device to send a keyboard and mouse message to the second device after detecting a keyboard and mouse cross-operation, or for the second device to send a cross-operation end message to the first device after detecting the keyboard and mouse cross-operation end.

[0055] Optionally, in the following Figure 2A-2B or Figure 3A-3E During the described operation, the communication connection established by the first device can remain connected all the time.

[0056] In another optional solution, after the first device establishes a communication connection with the second device, the first device obtains necessary information for connecting to the second device and disconnects the communication connection. Figure 2A Medium b or Figure 3A During the keyboard and mouse crossing operation shown in b, the first device establishes a communication connection with the second device based on the necessary information obtained to connect to the second device.

[0057] In another optional solution, the first device detects that Figure 2A or Figure 3A Before the keyboard and mouse crossing operation shown in , no communication connection is established with the second device until the first device detects that Figure 2A or Figure 3AAfter the keyboard and mouse crossing operation shown in , a communication connection is established with the second device.

[0058] This embodiment will be described in detail below using only the first method of establishing a communication connection. Other methods of establishing a communication connection are all optional solutions, and this embodiment does not limit them.

[0059] The aforementioned keyboard and mouse sharing function can be specifically provided by a computer manager in the first device, which is a system-level application installed in the first device. Optionally, the keyboard and mouse sharing function can also be provided by other third-party applications, which is not limited in the embodiment of the present application.

[0060] Figure 2A-2B A schematic diagram of a user interface for sharing a keyboard and a mouse is exemplarily shown.

[0061] Figure 2A Figure a shows a user interface after the first device and the second device establish a communication connection.

[0062] like Figure 2A As shown in a, the interface of the first device may include a first device input method type 110, and the interface of the second device may include a second device input method type 120.

[0063] Optional, Figure 2A The content shown in a is only an example, and the user interface after the first device and the second device establish a communication connection may also be other interfaces, such as Figure 1 As shown, the first device input method type 110 or the second device input method type 120 may not be displayed in the initial interface, but the first device input method type 110 or the second device input method type 120 may be displayed based on user operation.

[0064] Figure 2A Figure b shows a user interface for inputting keyboard and mouse traversal operations.

[0065] like Figure 2A As shown in b in the figure, the keyboard and mouse crossing operation is, for example, an operation of controlling the cursor 1011 on the first device to move toward the side of the screen by moving the mouse. The cursor 1011 on the first device may also be referred to as a first cursor. The movement operation includes, for example, an operation of controlling the cursor 1011 to move toward the edge of the first device one or more times. The side of the screen is specifically the side of the screen close to the second device, and the operation of moving toward the side of the screen may specifically be: moving toward the side of the screen twice in a row and touching the side of the screen. Figure 2A In addition to the operation shown in b, it can also be an operation on a virtual control displayed on the screen of the first device, or a voice command, etc., which is not limited in this embodiment of the present application.

[0066] In response to Figure 2A In the keyboard and mouse cross-operation shown in b, both the first device and the second device are switched to the keyboard and mouse cross-state, which is as follows: Figure 2A As shown in c.

[0067] Figure 2A Center c shows a user interface after the first device and the second device are in a keyboard and mouse crossing state.

[0068] like Figure 2A As shown in c, the interface displayed by the first device includes the first device input method type 110 used, for example, the first device input method type 110 is the Wubi input method, and does not include the cursor 1011 corresponding to the mouse. The interface displayed by the second device includes the second device input method type 120 used, for example, the second device input method type 120 is the English input method, and includes the cursor 1021 corresponding to the mouse. The position of the cursor 1021 can be the default initial position, or based on Figure 2A The cursor corresponding to the mouse is switched from the cursor 1011 originally displayed on the first device to the cursor 1021 displayed on the second device, indicating that the first device and the second device are successfully triggered to switch to the keyboard and mouse crossover state after the keyboard and mouse crossover operation is detected, and also means that the user can control the second device by inputting information to the keyboard and mouse of the first device. The cursor 1021 on the second device can also be called a second cursor.

[0069] Optional, in Figure 2A In the user interface shown in c, the interface displayed by the first device may also include a cursor 1011 corresponding to the mouse, but the cursor 1011 does not move with the movement of the mouse, that is, the information input to the keyboard and mouse is not used to control the first device, but is used to control the second device. The interface of the second device may not include the second device input method type 120, and the second device input method type 120 needs to be displayed based on user operations.

[0070] The first device displays Figure 2A After the user interface shown in c, that is, after the first device and the second device are in the keyboard and mouse crossing state, the user can use the keyboard and mouse of the first device to operate the second device, for example, send the information input on the keyboard and mouse of the first device to the second device for controlling the second device. The user may also need to operate the second device alone instead of using the keyboard and mouse of the first device to operate the second device. At this time, in order to provide the user with a smooth input experience, it is necessary to maintain the consistency of the input method of the first device and the second device. Therefore, the user also needs to switch the input method type of the second device to make it the same as the input method type of the first device. Among them, the operation of switching the input method type of the second device can be an operation on the icon of the second device input method type 120 displayed in the virtual keyboard of the second device.

[0071] In response to Figure 2A In the input method switching operation shown in c, the second device switches the input method type. The input method type after switching is as follows: Figure 2B As shown in middle d.

[0072] Figure 2B Figure d shows a user interface after the second device input method type is switched, and the second device input method type 120 is consistent with the first device input method type 110 after switching. For example, if the first device input method type 110 is Wubi input method, the second device input method type 120 is also switched to Wubi input method. Optionally, in order to make the input method type of the second device consistent with the input method type of the first device, the user may need to operate the virtual keyboard of the second device multiple times.

[0073] Through the aforementioned Figure 2A-2B From the introduction, it can be found that after the first device and the second device are in the keyboard and mouse crossing state, the user may use the keyboard and mouse of the first device to operate the second device, or may directly operate the second device. Since the first device and the second device are equipped with different operating systems, the types of input methods used by the two may also be different. If the user needs to switch from the keyboard operation of the first device to the virtual keyboard of the second device to operate the second device, if you want to ensure the consistency of the user's keyboard input experience, if the input method type of the second device is different from the input method type of the first device, you need to switch the input method type of the second device. However, the cumbersome switching operation will reduce the user experience.

[0074] In order to solve the aforementioned problems, the present application provides an input method synchronization method, a graphical interface and related devices.

[0075] Specifically, the input method synchronization method includes: when the first device and the second device are in keyboard and mouse sharing, the input method type of the second device is automatically synchronized to the input method type used by the first device.

[0076] The method realizes the function of automatic synchronization of input methods between devices equipped with different operating systems. When switching between sharing the keyboard and mouse of the first device and directly using the corresponding input capabilities of the second device, a consistent input experience can be maintained, thereby avoiding the user's additional operation of switching input methods, thereby improving the user's operating experience.

[0077] In a specific implementation, after the first device detects a keyboard and mouse crossing operation, it obtains the input method type used by the first device and sends it to the second device. The second device synchronizes the input method type of the second device to the input method type used by the first device based on the input method type.

[0078] Among them, the input method type can be packaged in the existing common keyboard and mouse messages, and there is no need to set up an additional transmission protocol to transmit the input method type. The existing common keyboard and mouse messages can be messages for transmitting keyboard input events and mouse input events. In this way, the transmission method can have a higher transmission efficiency and reduce the complexity of the transmission message.

[0079] Next, combine Figure 3A-3E To introduce the input method synchronization method provided by this application.

[0080] Figure 3A-3E Another schematic diagram of a keyboard and mouse traversal operation interface is shown as an example.

[0081] Figure 3A A user interface after the first device and the second device shown in a establish a communication connection. Figure 3A The user interface description shown in a can refer to the above description. Figure 2A The description of a in the above paragraph will not be repeated here.

[0082] Herein, the communication connection may be referred to as a first connection.

[0083] Among them, the interface displayed by the first device can be called the first interface, and the interface displayed by the second device can be called the second interface. This embodiment does not limit the content displayed on the first interface and the second interface respectively, but the content displayed on the first interface does not include the second interface.

[0084] After the first device and the second device establish a communication connection, that is, when the Figure 3A After the user interface shown in a, the first device can also detect the keyboard and mouse crossing operation, which is specifically as follows Figure 3A As shown in b.

[0085] Figure 3A A user interface for implementing keyboard and mouse crossover operation is shown in FIG. Figure 2A The operation shown in b is similar, and the specific implementation method can refer to the above Figure 2A The description of b will not be repeated here.

[0086] In response to Figure 3A In the keyboard and mouse cross-operation shown in b, both the first device and the second device are switched to the keyboard and mouse cross-operation state. Figure 3A As shown in c. Figure 3AFigure c shows another user interface after the first device and the second device are in the keyboard and mouse cross state. Specifically, this interface is the initial interface after the first device and the second device are in the keyboard and mouse cross state. Among them, the interface displayed by the first device includes the first device input method type 110 used, and does not include the cursor 1011 corresponding to the mouse. The interface displayed by the second device includes the second device input method type 120 used, and includes the cursor 1021 corresponding to the mouse. The second device input method type 120 is synchronized with the first device input method type 110, specifically, the input method type displayed in the second device is composed of Figure 3A The English input method shown in b is automatically switched to the Wubi input method, thereby achieving synchronization with the first device input method type 110.

[0087] Optional, in Figure 3A In the user interface shown in c, the display interface of the first device does not include the interface displayed by the second device. Specifically, after the computer 101 and the mobile phone 102 are in the keyboard and mouse crossing state, the display interface of the computer does not include the display interface of the mobile phone.

[0088] The second message may include the first device input method type 110 .

[0089] The specific input method type corresponding to the first device input method type 110 may be the first input method. Specifically, when the input method type of the first device is the Wubi input method, the first input method may be the Wubi input method. The first device sends a second message to the second device, the second message instructing the second device to switch the second device input method type 120 to the first input method. Specifically, the first device sends a message carrying the Wubi input method type to the second device, the message being used to instruct the second device to switch the second device input method type 120 from Figure 3A The English input method shown in b automatically switches to Figure 3A The Wubi input method shown in c.

[0090] During the process of the first device and the second device being in the keyboard and mouse crossing state, for example, when displaying Figure 3A In the interface shown in c, the second device can also receive a keyboard and mouse crossing end operation, and the keyboard and mouse crossing end operation is specifically as follows Figure 3B As shown in middle d.

[0091] Figure 3B Figure d shows a user interface for ending a mouse-and-keyboard crossover operation. Specifically, the mouse-and-keyboard crossover operation is, for example, an operation of controlling the cursor 1021 on the second device to move toward the side of the screen by moving the mouse. The side of the screen is specifically the side of the screen close to the first device, and the operation of moving toward the side of the screen can specifically be an operation of moving toward and touching the side of the screen twice in a row. Figure 3B In addition to the operation shown in d, it can also be an operation on a virtual control displayed on the screen of the second device, or a voice command, etc., which is not limited in this embodiment of the present application.

[0092] In response to Figure 3B The keyboard and mouse crossing operation shown in d ends, and the first device and the second device end the keyboard and mouse crossing state, that is, switch to the non-keyboard and mouse crossing state. The non-keyboard and mouse crossing state is specifically as follows: Figure 3C As shown in figure e.

[0093] Figure 3C Figure e shows a user interface in a non-keyboard-mouse crossing state. Specifically, the first device displays a cursor 1011 corresponding to the mouse, while the second device no longer displays a cursor 1021 corresponding to the mouse.

[0094] In addition, the first device and the second device are both in a non-keyboard and mouse crossing state, specifically including: the first device and the second device still maintain a communication connection, the first device does not send keyboard and mouse messages to the second device, and the information input into the keyboard and mouse of the first device is used to control the first device, rather than the second device.

[0095] Optionally, when the second device exits the keyboard and mouse crossover state, that is, is in a non-keyboard and mouse crossover state, the second device input method type 120 reverts to the type before the keyboard and mouse crossover state. Specifically, Figure 3C The second device input method type 120 of "e" can fall back to the English input method.

[0096] After the first device is switched to non-keyboard and mouse crossing state, it will be displayed Figure 3C After the interface shown in e is displayed, the first device can switch the input method type. The operation that triggers the first device to switch the input type is, for example, Figure 3C The operation shown in e is the user pressing the shift button on the keyboard, or it can also be an operation on a virtual control displayed on the screen of the first device, or a voice command, etc., which is not limited in this embodiment of the present application.

[0097] In response to Figure 3C e shows the operation of changing the first device input method type 110. The first device input method type 110 changes. Figure 3C As shown in figure f.

[0098] Figure 3C FIG. 5 shows a user interface after switching the first device input method type 110. Specifically, the first device input method type 110 in the interface is Figure 3CThe Wubi input method shown in e is changed to the English input method. Since the first device and the second device are both in a non-keyboard and mouse crossing state at this time, the first device will not send the first device input method type 110 information to the second device, so the second device input method type 120 remains the original Wubi input method unchanged.

[0099] After the first device switches the input method type, it will be displayed Figure 3C After the input method type 110 shown in FIG. 1 is entered, the first device may further detect a keyboard and mouse crossing operation. The keyboard and mouse crossing operation is as follows: Figure 3D As shown in g.

[0100] Figure 3D FIG. 1 shows a user interface for keyboard and mouse crossover operation. The specific implementation method can refer to FIG. Figure 2A The description of b will not be repeated here.

[0101] In response to Figure 3D The keyboard and mouse cross-operation shown in g, the first device and the second device are switched to the keyboard and mouse cross-operation state again, as shown in FIG. Figure 3D As shown in h.

[0102] Figure 3D h shows a user interface in which the first device and the second device switch to the keyboard and mouse crossing state again. Specifically, Figure 3D h shows a user interface in which the first device and the second device are switched to the keyboard and mouse crossover state again through the keyboard and mouse crossover operation, and the first device input method type 110 and the second device input method type 120 are synchronized again. Figure 3D The Wubi input method shown in g is synchronized with the English input method used by the first device at this time. Figure 3D In the process of the interface shown in FIG. 1 , the first device input method type 110 is changed from the English input method to the Chinese input method, and accordingly, the second device input method type 120 is also automatically synchronized from the English input method to the Chinese input method. The user interface after switching the input method type is as shown in FIG. Figure 3E As shown in FIG. 1 , the first device may automatically change the first device input method type 110 from the English input method to the Chinese input method, or change the input method type based on user operation, which is not limited in the embodiment of the present application.

[0103] Figure 3E FIG. 1 shows a user interface in which the second device automatically synchronizes the second device input method type 120 to the first device input method type 110. Specifically, the first device input method type 110 is composed of Figure 3D After the English input method shown in h is changed to the Chinese input method, the second device input method type 120 is automatically changed to Figure 3D The English input method shown in h is changed to the Chinese input method, which is equivalent to the second device input method type 120 being updated synchronously with the first device input method type 110.

[0104] It can be seen from the introduction of the aforementioned UI implementation example that after the first device and the second device are both in the keyboard and mouse crossing state, the user switches from using the keyboard and mouse of the first device to directly using the second device. Due to the different operating systems installed on different devices, the input method types used by the first device and the second device may also be different. If the user switches from using the keyboard input of the first device to using the virtual keyboard input of the second device, in order to provide the user with a consistent input experience, the user needs to switch the input method type of the second device to the input method type used by the keyboard of the first device. Among them, the cumbersome operation of switching the input method type of the second device interrupts the user's smooth experience, thereby reducing the user experience.

[0105] In response to the aforementioned problems, the present invention provides a method for realizing automatic synchronization of input methods between devices equipped with different operating systems. The method can maintain the consistency of input experience, thereby avoiding the user's additional operation of switching input methods, thereby improving the user's operating experience.

[0106] Among them, in the process of using the input method synchronization method, for the transmission of keyboard and mouse messages and input method type messages after the keyboard and mouse are in the keyboard and mouse crossing state, the present invention provides a message transmission method, so that the keyboard and mouse messages and input method type information are taken into consideration when transmitting the keyboard and mouse messages. Compared with the method of setting the input method type transmission protocol separately for transmission, this transmission method has the beneficial effects of higher transmission efficiency, saving transmission resources, reducing the complexity of transmission messages, and saving message unpacking time, thereby reducing latency.

[0107] Figure 4 An input method synchronization method process provided by the present application is exemplified.

[0108] like Figure 4 As shown, the method involves modules including a keyboard and mouse service management module, a keyboard and mouse virtual capability module and an input module. For a detailed introduction to the aforementioned modules, please refer to the following description of Figure 10-11 The method specifically comprises the following steps:

[0109] S401: A first device establishes a communication connection with a second device.

[0110] After the first device detects the operation of selecting the second device and establishing a communication connection, a communication connection is established with the second device. Before the first device detects the selection of the second device, the first device may also enable the keyboard and mouse sharing function and search for nearby connectable devices, which may include the second device. The first device may enable the keyboard and mouse sharing function based on user operation, or the first device may enable the keyboard and mouse sharing function by default.

[0111] Optionally, the communication connection established by the first device may remain connected all the time.

[0112] In another optional solution, after the first device establishes a communication connection with the second device, the first device obtains necessary information for connecting to the second device and then disconnects the communication connection. After the first device detects the keyboard and mouse crossing operation, the first device establishes a communication connection with the second device again based on the necessary information of the second device obtained.

[0113] In another optional solution, the first device does not establish a communication connection with the second device before detecting the keyboard and mouse crossing operation, and the first device establishes a communication connection with the second device after detecting the keyboard and mouse crossing operation.

[0114] For the specific operation method of establishing a communication connection between the first device and the second device, please refer to the aforementioned Figure 1 The user operation includes opening the management software to search for nearby devices, and selecting a second device from the searched nearby devices to establish a communication connection.

[0115] A specific implementation of establishing a communication connection between a first device and a second device includes: a keyboard and mouse service management module of the first device establishes a connection with a keyboard and mouse service management module of the second device.

[0116] Among them, the definition of the keyboard and mouse sharing function can be referred to the previous description and will not be repeated here.

[0117] The communication connection includes a transmission connection established by the keyboard and mouse service management module of the first device and the keyboard and mouse service management module of the second device. The transmission connection includes any one or more of the following types of connections: point-to-point (peer-to-peer, P2P) connection, based on the third generation mobile communication technology (the 3 rd The connection established by the fourth generation mobile communication technology (the 4 th generation mobilecommunication technology (4G), or the fifth generation mobilecommunication technology (the 5 thThe connection established by the wireless communication technology (5G) of the present invention may be a connection established by the wireless communication technology (5G), and the protocol adopted by the aforementioned connection may be a transmission control protocol (TCP), or a user datagram protocol (UDP), etc. In addition, the transmission connection also includes wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), near field communication technology (NFC) and infrared technology (IR), etc., but the embodiments of the present application are not limited thereto.

[0118] S402: The first device detects a keyboard and mouse crossing operation, and sends a keyboard and mouse message with the input method type of the first device to the second device, so that the second device sets the input method type to be the same as the input method type of the first device.

[0119] S402-1. After the first device establishes a communication connection with the second device, the first device starts to detect whether a keyboard and mouse crossing operation is received.

[0120] An achievable detection method specifically includes: the keyboard and mouse virtual capability module of the first device obtains the cursor position and cursor displacement. The keyboard and mouse virtual capability module calculates the position of the cursor after movement based on the cursor position and cursor displacement, and determines whether the position of the cursor after movement exceeds the screen. If the position of the cursor after movement does not exceed the screen, the keyboard and mouse crossing operation is not detected, and the position of the cursor after movement is determined as the cursor position. If the position of the cursor after movement exceeds the screen, the module confirms that the keyboard and mouse crossing operation is detected. However, the embodiments of the present application are not limited to this.

[0121] Optionally, another achievable detection method specifically includes: the keyboard and mouse virtual capability module calculates the position of the cursor after movement, and counts the number of times it touches or exceeds the edge of the screen. If the set statistical number is reached within the specified time, it is considered that the keyboard and mouse crossing operation is detected, otherwise the keyboard and mouse crossing operation is not detected.

[0122] In another achievable detection method, an operation on a specific input device, such as operating a cursor shown by a mouse to continuously touch or exceed an edge of a screen, may also be referred to as a first movement operation.

[0123] The screen edge refers to the screen edge of the second device that establishes a communication connection with the first device.

[0124] The first device receives the first operation, and the first device stops displaying the cursor corresponding to the mouse. The cursor is the aforementioned Figure 3A The cursor 1011 shown may also be referred to as a first cursor.

[0125] The first operation includes the first moving operation, but the embodiment is not limited thereto.

[0126] Among them, one implementation form of the first device detecting the keyboard and mouse crossing operation can be as described above. Figure 2A Figure b, Figure 3A Figure b, Figure 3D The description of the diagram in FIG. g is omitted here. The cursor position is specifically as shown in the diagram above. Figure 2A The cursor is at the dotted line position in b, and the cursor displacement distance is as shown above. Figure 2A From the dotted line position to the solid line position in middle b.

[0127] Optionally, the aforementioned implementation of determining whether the position of the cursor after it moves exceeds the screen by calculating the position of the cursor after it moves based on the cursor position and cursor displacement can be implemented by the input module in addition to the keyboard and mouse virtual capability module. Specifically, the input module receives the keyboard and mouse events sent by the keyboard and mouse virtual capability module, obtains the cursor position and cursor displacement, and determines whether the position of the cursor after it moves exceeds the screen by calculating the position of the cursor after it moves. The above-mentioned keyboard and mouse events can also be called first messages.

[0128] The first device sends a first message, and the first message is used to instruct the second device to display a cursor corresponding to the mouse, which is the aforementioned Figure 3A The cursor 1021 shown may also be referred to as a second cursor.

[0129] Among them, the keyboard and mouse events include: keyboard input events, mouse click events, mouse movement events, etc. The keyboard and mouse messages are obtained by packaging the keyboard and mouse events, or by packaging the keyboard and mouse events and the input method type.

[0130] The keyboard and mouse messages can be packaged by the keyboard and mouse virtual capability module and / or the keyboard and mouse service management module of the first device. Optionally, the keyboard and mouse virtual capability module can be replaced by an input module that receives keyboard and mouse events and performs operations such as calculating the position of the cursor after movement and counting the number of times the cursor touches or exceeds the edge of the screen.

[0131] Among them, the input module includes the keyboard and mouse framework and the input framework. The keyboard and mouse framework is used to report keyboard and mouse events, including keyboard input information and mouse click, move, drag and long press operation information. The input framework is used to report input events.

[0132] S402-2: After the first device detects a keyboard and mouse crossing operation, the first device reads an input method type and intercepts the detected keyboard and mouse events.

[0133] A feasible input method type acquisition method specifically includes: using a keyboard and mouse virtual capability module of the first device to acquire the input method type currently being used by the first device. Optionally, the input method type acquisition method specifically also includes: first acquiring system data of the first device, and extracting input method type data from the system data.

[0134] A feasible way of intercepting detected keyboard and mouse events specifically includes: the keyboard and mouse virtual capability module of the first device uses a hook to intercept the keyboard and mouse events.

[0135] Among them, the input method types currently being used by the first device include: English input method, Chinese Pinyin input method, Wubi input method, etc.

[0136] The interception of the keyboard and mouse event includes: when the first device and the second device are in a keyboard and mouse crossing state, the keyboard and mouse virtual capability module of the first device intercepts the keyboard and mouse event, so that the first device does not respond to the keyboard and mouse event.

[0137] The keyboard and mouse events intercepted by the first device can be called third messages. After the keyboard and mouse crossover state, the operation of inputting to the keyboard and mouse of the first device through the input device can be called a second operation, which is not used to operate the first device but to operate the second device.

[0138] Optionally, the input method type currently being used by the first device may be acquired by an input method detection module in the keyboard and mouse virtualization capability module of the first device.

[0139] S402-3. After the first device reads the input method type, the first device sends the input method type to the second device.

[0140] An achievable sending method specifically includes: the keyboard and mouse virtual capability module of the first device sends the input method type to the second device through the keyboard and mouse service management module of the first device.

[0141] Another feasible sending method specifically includes: the keyboard and mouse virtual capability module of the first device sends the input method type to the second device. The aforementioned sending of the input method type to the second device can specifically be sent to the keyboard and mouse virtual capability module or the keyboard and mouse service management module of the second device.

[0142] Optionally, the aforementioned input method type can be sent from the first device to the second device in a separate data packet, or carried in a keyboard and mouse message and sent to the second device.

[0143] Optionally, the keyboard and mouse virtualization capability module of the first device may also encrypt the keyboard and mouse message before sending it to prevent the keyboard and mouse message from being leaked.

[0144] Among them, for the transmission of keyboard and mouse messages and input method types, the present invention provides a transmission method of carrying the input method type in the keyboard and mouse messages, so that both the keyboard and mouse messages and the input method type are taken into consideration when transmitting the keyboard and mouse messages. Compared with the method of setting up a separate input method type transmission protocol for transmission, this transmission method has the beneficial effects of higher transmission efficiency, saving transmission resources, reducing the complexity of transmission messages, and saving message unpacking time, thereby reducing latency.

[0145] S402-4. The second device receives the input method type of the first device, and synchronizes the input method type set on the second device with the input method type of the first device.

[0146] One feasible input method type receiving method specifically includes: the keyboard and mouse virtual capability module of the second device receives the input method type sent by the first device through the keyboard and mouse service management module of the second device. Another feasible receiving method specifically includes: the keyboard and mouse virtual capability module of the second device directly receives the input method type sent by the first device.

[0147] An achievable input method type setting method specifically includes: the keyboard and mouse virtual capability module of the second device sets the input method type of the second device to be the same as the input method type of the first device.

[0148] Optionally, when the aforementioned input method type is carried by the first device in a keyboard and mouse message and sent to the second device, the keyboard and mouse virtual capability module in the second device unpacks the input method type of the first device from the keyboard and mouse message, and sets the input method type of the second device to the same input method type as the input method type of the first device. In addition, the keyboard and mouse virtual capability module in the second device also unpacks the keyboard and mouse events from the keyboard and mouse message and processes the keyboard and mouse events, or the keyboard and mouse virtual capability module in the second device also unpacks the keyboard and mouse events from the keyboard and mouse message and sends them to the input module, and the input module processes the keyboard and mouse events.

[0149] Among them, the embodiment of the present application does not limit the execution order of the input method type setting operation and the processing of keyboard and mouse events by the input module, and the two can also be executed synchronously.

[0150] Furthermore, when processing keyboard and mouse events and setting the input method type, the input module of the second device processes the keyboard and mouse events, and the keyboard and mouse virtual capability module processes the input method type information. The input module and the keyboard and mouse virtual capability module process the keyboard and mouse events and the input method type setting in parallel. Compared with setting the input method type setting module to process messages separately, this method has the beneficial effect of saving computing resources and higher processing efficiency.

[0151] In the present application, the first device and the second device are equipped with different operating systems and may use different input methods. After adopting the method provided in the present application, when the first device and the second device are in the keyboard and mouse crossing state, the function of synchronizing the input method type of the second device with the input method type of the first device can be realized, so that when the user switches from using the first device to input the second device to directly operating the second device input, the user can avoid the need to perform additional operations of switching the input method of the second device, thereby improving the user experience.

[0152] S403: The first device detects a change in the input method type, and sends an updated input method type to the second device, so that the input method type set by the second device is synchronized with the input method type of the first device.

[0153] A feasible input method type change detection method specifically includes: the keyboard and mouse virtual capability module of the first device detects whether the input method type has changed, the keyboard and mouse virtual capability module of the first device detects the input method type being used, and compares it with the input method type used before, if the two are consistent, the input method type has not changed. If the two are inconsistent, the input method type has changed.

[0154] Optionally, the input method type change detection method further includes that after S402, the first device is in a keyboard and mouse cross-over state. When the first device is in the keyboard and mouse cross-over state, the first device periodically detects whether the input method type has changed. If the input method type change is detected, the first device performs S403 operation. The input method type change detection method is described in detail above.

[0155] Wherein, when the input method type changes, the keyboard and mouse virtual capability module of the first device can package the changed input method type separately to obtain the keyboard and mouse message. Another optional method is that the keyboard and mouse virtual capability module of the first device can package the changed input method type and the keyboard and mouse message to obtain the keyboard and mouse message.

[0156] When the input method type changes, the first device sends a fourth message to the second device, and the fourth message sent may include the changed input method type. The changed input method type may also be referred to as a second input method. The fourth message is used to instruct the second device to switch the input method to the second input method.

[0157] Optionally, the keyboard and mouse service management module of the first device may further package the obtained keyboard and mouse messages.

[0158] A feasible input method type sending method can be referred to S402-3, which will not be described in detail here.

[0159] A feasible method for receiving and setting the input method type may be referred to S402-4, which will not be described in detail here.

[0160] Figure 5 A schematic flow chart of an input method synchronization method 500 is shown.

[0161] Figure 5 It involves the keyboard and mouse business management module, keyboard and mouse virtual capability module and input module. For their functions, please refer to Figure 10-11 , that is, a software architecture block diagram of the first device and the second device.

[0162] The method 500 may include the following steps:

[0163] Phase 1 (S501-S510): The first device detects the keyboard and mouse crossing operation, and causes the second device to synchronize the input method of the first device.

[0164] S501: A keyboard and mouse service management module of a first device establishes a communication connection with a keyboard and mouse service management module of a second device.

[0165] This step may refer to a specific implementation of establishing a communication connection between a first device and a second device in S401, which will not be described in detail here.

[0166] After the keyboard and mouse service management module of the first device establishes a communication connection with the keyboard and mouse service management module of the second device, the keyboard and mouse virtual capability module of the first device starts to detect whether the keyboard and mouse crossing operation is triggered. The detection method can be specifically referred to S402-1. In other words, the two modules are coupled to each other.

[0167] S502: The keyboard and mouse virtualization capability module of the first device detects a keyboard and mouse crossing operation.

[0168] After the keyboard and mouse virtual capability module detects the keyboard and mouse crossing operation, it executes the subsequent steps shown in S503-S510 below.

[0169] S503: The keyboard and mouse virtualization capability module of the first device obtains the cursor crossing position and the input method type.

[0170] The method for obtaining the cursor crossing position that can be implemented by the keyboard and mouse virtual capability module of the first device specifically includes: the keyboard and mouse virtual capability module of the first device calculates the coordinates of the cursor after movement, and obtains the cursor crossing position through a corresponding mapping algorithm.

[0171] The input method type acquisition method that can be implemented by the keyboard and mouse virtual capability module of the first device can refer to an implementable input method type acquisition method in S402-2, which will not be repeated here.

[0172] Optionally, the step of obtaining the input method type includes using a system function to read system data, and judging whether the input method type used is a Chinese input method or an English input method based on the system data. If it is a Chinese input method, further judging the Chinese input method type. Taking a specific implementation as an example, when the first device is a PC equipped with a Windows system and the second device is a mobile phone equipped with an Android system, the specific implementation method of obtaining the input method type is as follows:

[0173] The specific value of the input method type is compared and determined. If the specific value of the data is 0, it means that the PC input method type is English input method.

[0174] If the specific value of this data is 1, the PC input method type is Chinese input method.

[0175] If the specific value is not 0 or 1, it indicates a reading abnormality and the PC input method is considered to be the default English input method.

[0176] Among them, for the Chinese input method, it is necessary to call the windows interface function again to determine whether the Chinese input method name characters contain specific characters. If the name characters contain "Smart ABC", "Quanpin", "Shuangpin" or "Pinyin", the input method is the Chinese Pinyin input method. If the name characters contain "Wubi", the input method is the Chinese Wubi input method. If the name characters do not contain the above types, it is another Chinese input method.

[0177] In this way, you can get the input method type message. The above steps can be implemented by the following code:

[0178]

[0179] S504: The keyboard and mouse virtualization capability module of the first device sends a keyboard and mouse message carrying the input method type of the first device to the keyboard and mouse service management module of the second device.

[0180] For the first device keyboard and mouse virtualization capability module to send the keyboard and mouse message to the second device keyboard and mouse service management module, reference can be made to another achievable sending method in S402-3, which will not be described in detail here.

[0181] Optionally, taking the first device as a Windows system PC as an example, the specific implementation process of sending the input method type message is as follows:

[0182] Set the keyboard and mouse message classification identification and input method type specific identification. The message type is indicated by the message header. The specific content is data 0x01 represents keyboard and mouse messages, and data 0x08 represents input method messages. The specific field value sent to represent the input method type is: 0x00 represents English input method, 0x01 represents Chinese Pinyin input method, 0x02 represents Chinese Wubi input method, 0x03 represents other input method types, and the default is English input method. The PC's keyboard and mouse virtual capability module sends the input method type by calling the existing interface function. The above process can be implemented by the following code:

[0183]

[0184] Among them, the message type is indicated by the message header, and the specific content data of the message header and the specific data representing the input method type can be changed as needed, and the embodiments of the present application are not limited to this.

[0185] S505: The keyboard and mouse virtualization capability module of the first device intercepts the detected keyboard and mouse events.

[0186] For interception of the detected keyboard and mouse events by the keyboard and mouse virtualization capability module of the first device, reference may be made to a feasible method of intercepting the detected keyboard and mouse events in S402-2, which will not be described in detail here.

[0187] Among them, S505 can be executed at any stage among S502-S506.

[0188] S506: The keyboard and mouse service management module of the second device sends a keyboard and mouse message carrying the input method type of the first device to the keyboard and mouse virtual capability module of the second device.

[0189] For the second device keyboard and mouse service management module sending a keyboard and mouse message to the second device keyboard and mouse virtual capability module, reference can be made to an implementable input method type receiving method in S402-4, which will not be repeated here.

[0190] S507: The keyboard and mouse virtualization capability module of the second device sets the mouse to cross the initial position.

[0191] The keyboard and mouse virtual capability module of the second device receives the keyboard and mouse message, unpacks it through the protocol analysis management module to obtain the keyboard and mouse event, and sets the cursor display position according to the initial position data of the cursor displayed in the keyboard and mouse event.

[0192] Optionally, the keyboard and mouse events are sent to an input module, and the input module processes the keyboard and mouse events and operates the second device, for example, the input module sets a cursor display position of the second device.

[0193] Among them, S507 is an optional operation in the input method synchronization method 500, and this embodiment does not limit this.

[0194] S508: The keyboard and mouse virtualization capability module of the second device sets the keyboard and mouse crossing state, and sets the input method type to the same type as the input method of the first device.

[0195] The keyboard and mouse virtual capability module of the second device may set the input method type by referring to an implementable input method type setting method in S402-4, which will not be described in detail here.

[0196] Optionally, the keyboard and mouse virtual capability module of the second device receives the keyboard and mouse message, unpacks it through relevant protocols, obtains the first device input method type in the keyboard and mouse message, and sets the second device input method type to the first input method type. For example, when the second device is an Android phone, the specific operation of setting the input method type of the Android phone includes: unpacking the keyboard and mouse message sent by the keyboard and mouse virtual capability module of the first device, obtaining a specific input method type value, and comparing the set specific value with the input method type value.

[0197] If the specific value is 0, set the mobile phone input method to English input method.

[0198] If the specific value is 1, set the mobile phone input method to Chinese input method.

[0199] If the specific value is 2, set the mobile phone input method to Wubi input method.

[0200] If the specific value is 3, set the mobile phone input method to English input method.

[0201] If the specific value is not 0, 1, 2 or 3, it is an abnormal data reading situation. Set the mobile phone input method to English.

[0202] The above process can be implemented by the following code:

[0203]

[0204] The keyboard and mouse virtualization capability module of the second device sets the keyboard and mouse cross-over state. The specific method may be: the keyboard and mouse virtualization capability module of the second device sets the second device state to the keyboard and mouse cross-over state through the keyboard and mouse virtualization service module.

[0205] It should be noted that the aforementioned S507 and S508 are steps that the keyboard and mouse virtualization capability module of the second device will execute after receiving the keyboard and mouse message. The embodiment of the present application does not limit the order of execution of these two steps.

[0206] S509: The keyboard and mouse virtualization capability module of the second device sends a keyboard and mouse crossing setting completion message to the keyboard and mouse virtualization capability module of the first device.

[0207] The setting completion message is used to notify the keyboard and mouse virtualization capability module of the first device to enable the first device to enter the keyboard and mouse crossing state.

[0208] Among them, the keyboard and mouse virtual capability module of the second device sends a keyboard and mouse crossing setting completion message to the keyboard and mouse virtual capability module of the first device, which is the reverse process of the keyboard and mouse virtual capability module of the first device sending a keyboard and mouse message to the keyboard and mouse virtual capability module of the second device. The specific message transmission process can refer to S402-3 in which the first device sends the input method type to the second device, and will not be repeated here.

[0209] Optionally, the aforementioned S505 may also be executed after S509.

[0210] S510: The first device keyboard and mouse virtualization capability module sets the first device to a keyboard and mouse pass-through state. A specific method for setting the first device keyboard and mouse pass-through state is as follows: the first device keyboard and mouse virtualization capability module sets the first device state to a keyboard and mouse pass-through state through a keyboard and mouse virtualization service module.

[0211] The first device is in a keyboard and mouse crossing state, and the second device is also in a keyboard and mouse crossing state, and the first device and the second device complete the keyboard and mouse sharing function.

[0212] Optional, when executing Figure 5 After the method described above, you can also execute Figure 6 The method shown, Figure 6 A schematic flow chart of another input method synchronization method 600 is shown.

[0213] like Figure 6 As shown, the method 600 may include the following steps:

[0214] Phase 2 (S601-S616): The first keyboard and mouse crossing is completed, and the keyboard and mouse crossing is performed again.

[0215] S601, after the aforementioned S509, the second device virtual capability module detects whether a keyboard and mouse crossing end operation occurs.

[0216] The virtual capability module of the second device detects whether the received keyboard and mouse operation triggers the keyboard and mouse crossing end operation. The detection method can refer to an achievable detection method of the first device in S402-1, and the method shown in S402-1 is applied to the second device. For example, when the second device is an Android phone, the operation of the Android phone to detect the end of the keyboard and mouse crossing can be to detect whether the mouse position reaches the side boundary of the Android display screen, but the embodiments of the present application are not limited to this.

[0217] The aforementioned S601 is a step that can be executed after the keyboard and mouse virtualization capability module of the second device sends a second device crossing setting completion message. The embodiment of the present application does not limit the order in which the two steps S510 and S601 are executed.

[0218] S602: The second device detects that the keyboard and mouse crossover operation ends.

[0219] Specifically, after the aforementioned S510, the second device detects a keyboard and mouse crossing end operation, wherein the keyboard and mouse crossing end operation may include: the user operates the cursor to touch the edge of the screen of the second device closest to the first device twice in a row, but the embodiment of the present application is not limited thereto.

[0220] S603: The keyboard and mouse virtual capability module of the second device sends a message of ending crossing to the keyboard and mouse virtual capability module of the first device.

[0221] Among them, the second device keyboard and mouse virtual capability module sends an end crossing message to the first device keyboard and mouse virtual capability module, which is the reverse process of the first device keyboard and mouse virtual capability module sending a keyboard and mouse message to the second device keyboard and mouse virtual capability module. The method of sending from the second device keyboard and mouse virtual capability module to the first device is similar to that of the first device keyboard and mouse virtual capability module to the second device keyboard and mouse virtual capability module. The specific message transmission process can refer to the achievable sending method in S402-3, which will not be repeated here.

[0222] S604: After the keyboard and mouse virtual capability module of the first device receives the end-travel message, the second device virtual capability module stops intercepting keyboard and mouse events.

[0223] After the keyboard and mouse virtualization capability module of the first device stops intercepting the detected keyboard and mouse events, the keyboard and mouse messages received by the first device will not be sent to the second device, but the keyboard and mouse events will be directly processed by the first device.

[0224] There is still a communication connection between the first device and the second device, and the keyboard and mouse virtual capability module of the first device restarts to detect whether a keyboard and mouse cross-operation occurs. The specific process of detecting whether a keyboard and mouse cross-operation is received can refer to an achievable detection method in S402-1, which will not be repeated here. If a keyboard and mouse cross-operation occurs, the keyboard and mouse cross-operation state can be realized again.

[0225] S605: After the keyboard and mouse virtualization capability module of the first device receives the end-travel message, the keyboard and mouse virtualization capability module of the first device sets the first device to a non-keyboard and mouse travel state.

[0226] A specific method for setting the first device to a non-keyboard-mouse-travel state may be: the keyboard-mouse virtual capability module of the first device sets the first device state to a non-keyboard-mouse-travel state through the keyboard-mouse virtual service module. It should be noted that the aforementioned S603 and S604 are steps that the first device will execute after receiving the end-travel message, and the embodiment of the present application does not limit the order of execution of these two steps.

[0227] S606: The keyboard and mouse virtualization capability module of the first device sends a non-keyboard and mouse crossing state setting completion message to the keyboard and mouse virtualization capability module of the second device, and notifies the second device that the keyboard and mouse crossing end operation is successfully completed.

[0228] Among them, the keyboard and mouse virtual capability module of the first device sends a non-keyboard and mouse crossing state setting completion message to the keyboard and mouse virtual capability module of the second device. The specific message transmission process can refer to an achievable sending method and another achievable sending method in S402-3, which will not be repeated here.

[0229] When the first device is in a non-keyboard-mouse-traversal state, if the input method type of the first device changes, the first device will not send the updated input method type to the second device, and will not synchronize the input method type of the second device. Figure 3C After the first device switches the input method to the English input method, the input method type used by the second device remains unchanged. Figure 3C The Wubi input method shown in f is not synchronized with the first device.

[0230] S607, the keyboard and mouse virtualization capability module of the second device receives the non-keyboard and mouse traversal state setting completion message, and the keyboard and mouse virtualization module of the second device sets the non-keyboard and mouse traversal state, indicating that the first keyboard and mouse traversal is completed.

[0231] A specific method for setting the non-keyboard and mouse crossing state may be: the keyboard and mouse virtualization capability module of the second device sets the second device state to the non-keyboard and mouse crossing state through the keyboard and mouse virtualization service module.

[0232] Optionally, when the second device exits the keyboard and mouse cross-over state and enters a non-keyboard and mouse cross-over state, the input method type of the second device reverts to the type before entering the keyboard and mouse cross-over state.

[0233] At this time, there is still a communication connection between the first device and the second device, and the first device and the second device can perform the keyboard and mouse cross-operation again to achieve the keyboard and mouse cross-state.

[0234] After the input method type of the first device is changed as described in S607, if the keyboard and mouse crossing operation is detected again, the first device and the second device continue to perform input method synchronization, that is, the first device and the second device perform S608-S616, which are the same as the above-mentioned S502 to S510 and are not repeated here. The first device and the second device synchronize the input method type again, such as Figure 3D As shown in g and h.

[0235] The changed input method type of the first device may be referred to as a second input method. Specifically, the second input method may be an English input method.

[0236] After the second keyboard and mouse crossing operation is performed, the input method type of the second device will be synchronized with the input method type of the first device again, so that the input method type of the second device is the same as the input method type of the first device again, such as Figure 3D In the user interface shown in h, the first device input method type 110 and the second device input method type 120 are synchronized for the second time, so that both are English input methods.

[0237] In executing the aforementioned Figure 5 and Figure 6 In the method shown, after the first device and the second device are in the keyboard and mouse crossing state, the following can also be performed: Figure 7 The input method automatic synchronization method shown.

[0238] Figure 7 A schematic flow chart of an input method automatic synchronization method 700 is shown.

[0239] like Figure 7 As shown, the method 700 may include the following steps:

[0240] Stage 3 (S701-S710): When the input method type of the first device is automatically switched in the keyboard and mouse crossing state, the second device automatically synchronizes the input method type.

[0241] S701, after the aforementioned S510, the first device and the second device are in a keyboard and mouse cross-over state. The keyboard and mouse virtualization capability module of the first device sends a message to the keyboard and mouse service management module of the second device.

[0242] The keyboard and mouse virtual capability module of the first device detects the input method type. If the input method type has not changed, the sent keyboard and mouse message does not contain the input method information. The keyboard and mouse virtual capability module of the first device sends a keyboard and mouse message to the keyboard and mouse service management module of the second device. A specific achievable method of sending the message can refer to an achievable sending method in S402-3, which will not be repeated here.

[0243] S702, the keyboard and mouse service management module of the second device sends the keyboard and mouse message to the keyboard and mouse virtual capability module of the second device. After receiving the keyboard and mouse message, the keyboard and mouse virtual capability module of the second device unpacks the message to obtain the keyboard and mouse event. A specific and achievable keyboard and mouse message receiving method can refer to a achievable input method type receiving method in S402-4, which will not be described in detail here.

[0244] Optionally, the keyboard and mouse service management module of the second device receives the keyboard and mouse message, and sends the processed keyboard and mouse message to the keyboard and mouse virtualization capability module of the second device.

[0245] S703: The keyboard and mouse virtualization capability module of the second device transmits the keyboard and mouse event to the input module for processing.

[0246] A specific method for transmitting keyboard and mouse events may refer to the description of the input module receiving the keyboard and mouse events unpacked by the keyboard and mouse virtual capability module in S402-4, which will not be described in detail here.

[0247] Optionally, the keyboard and mouse virtual capability module of the second device can process some keyboard and mouse events for controlling the second device.

[0248] S704, the input module processes the received keyboard and mouse events, sets the cursor position and keyboard input parameters, and controls the second device. A specific way for the input module to process keyboard and mouse events can refer to the input module processing keyboard and mouse events in S402-4. This realizes the keyboard and mouse sharing function of the first device controlling the second device with the keyboard and mouse.

[0249] It should be noted that the aforementioned S701-S704 is the transmission, unpacking and execution operations of the keyboard and mouse messages when the input method of the first device has not changed after the first device and the second device are in the keyboard and mouse crossing state. The aforementioned operations can omit the direct execution of S705-S710 for the transmission, unpacking and execution operations of the keyboard and mouse messages when the input method of the first device changes, or the order of S705-S710 and S701-S704 is exchanged because of the time when the input method type of the first device changes. The embodiment of the present application does not limit the order of execution of the two types of steps.

[0250] S705, after the aforementioned S510, if the keyboard and mouse virtual capability module of the first device detects that the input method type has changed, it reads the input method type information after the change, and merges the input method type information into the keyboard and mouse message to be sent.

[0251] Optionally, in an example where the first device is a Windows system PC, the method for reading the changed input method information may refer to S503 for a specific implementation of obtaining the input method type, which will not be described in detail herein.

[0252] When the input method type changes, the first device sends a fourth message to the second device, where the fourth message is used to instruct the second device to switch the input method to the second input method. Figure 3E From the above, the fourth message specifically includes the English input method. After the second device receives the fourth message including the English input, it switches the input method type to the English input method.

[0253] S706: The keyboard and mouse virtualization capability module of the first device sends a keyboard and mouse message carrying the input method type to the keyboard and mouse service management module of the second device.

[0254] Among them, the message sending step can refer to S701 and will not be repeated here.

[0255] Optionally, in the example where the first device is a Windows PC and the second device is an Android phone, the method for sending the keyboard and mouse message can refer to the specific implementation process of sending the input method type message in S504, which will not be repeated here.

[0256] S707, the keyboard and mouse service management module of the second device sends the keyboard and mouse message to the keyboard and mouse virtual capability module of the second device, and the keyboard and mouse virtual capability module of the second device receives the keyboard and mouse message, processes it, and obtains the keyboard and mouse event and input method type message. The steps of receiving and processing the keyboard and mouse message can refer to S702, and will not be repeated again.

[0257] Optionally, the keyboard and mouse service management module of the second device obtains the keyboard and mouse message after unpacking.

[0258] Optionally, after receiving the keyboard and mouse message, the keyboard and mouse virtual capability module of the second device unpacks the message through the protocol parsing management module to obtain the keyboard and mouse event and the input method type message.

[0259] S708, the keyboard and mouse virtual capability module of the second device transmits the keyboard and mouse event to the input module. The keyboard and mouse message includes the original keyboard and mouse event and the input method type after being unpacked. The keyboard and mouse virtual capability module of the second device retains the input method type message and sends the keyboard and mouse event to the input module.

[0260] The keyboard and mouse event transmission method may refer to S703 and will not be described in detail here.

[0261] S709: The input module of the second device processes the received keyboard and mouse events, and sets the cursor position and keyboard input parameters to control the second device.

[0262] Here, this step may refer to S704 and will not be described in detail here.

[0263] S710, the keyboard and mouse virtual capability module of the second device is set to the input method type of the first device according to the input method type message of the first device obtained, that is, the input method type of the second device is synchronized with the input method type of the first device, so as to realize the function that when the first device and the second device are in the keyboard and mouse crossing state, the input method type of the second device is automatically synchronized with the input method type of the first device in the scenario where the input method type of the first device changes.

[0264] For example, when the second device is limited to an Android phone, the operation of changing the input method type setting can refer to the specific operation of setting the input method type of the Android phone in S508, which will not be repeated here.

[0265] Optionally, the keyboard and mouse virtual capability module of the second device synchronizes the input method type of the second device with the input method type of the first device through the input method setting module according to the obtained input method type message.

[0266] It should be noted that the aforementioned S710 is a step that the second device will execute after receiving a keyboard and mouse message carrying an input method type message. That is to say, S710 can also be executed after S707 and before S708, or after S708 and before S709. The embodiment of the present application does not limit the order of execution of this step.

[0267] The first electronic device may be equipped with Or portable terminal devices of other operating systems, such as mobile devices, tablet computers, desktop computers, laptop computers, handheld computers, notebook computers, ultra-mobile personal computers (UMPC), netbooks, as well as cellular phones, personal digital assistants (PDA), augmented reality (AR) devices, virtual reality (VR) devices, artificial intelligence (AI) devices, wearable devices, vehicle-mounted devices, smart home devices and / or smart city devices, etc.

[0268] Figure 8 FIG. 8 is a hardware schematic diagram of an electronic device 800 provided in an embodiment of the present application. The electronic device 800 may also be referred to as a first device.

[0269] The electronic device 800 may include: a processor 801, a wireless communication module 803, a display screen 804, an internal memory 805, an external memory interface 806, a mouse module 807, a keyboard module 808, a universal serial bus (USB) interface 809, a charging management module 810, a power management module 811, a battery 812, and an antenna 2.

[0270] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 800. In other embodiments of the present application, the electronic device 800 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0271] The processor 801 may include one or more processing units, for example, the processor 801 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0272] The controller may be the nerve center and command center of the electronic device 800. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0273] The processor 801 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 801 is a cache memory. The memory may store instructions or data that the processor 801 has just used or cyclically used. If the processor 801 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 801, and thus improves the efficiency of the system.

[0274] In the embodiment of the present application, the processor 801 is used to execute Figure 4 For details about the method shown in S401-S403, please refer to the previous description of Figure 4 Specifically, the processor 801 also executes Figure 5-Figure 7 The method executed by the first device in the embodiment of the present invention, for the detailed introduction of the method, please refer to the above description of Figure 5-Figure 7 Introduction.

[0275] In some embodiments, the processor 801 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0276] The USB interface 809 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 809 can be used to connect a charger to charge the electronic device 800, and can also be used to transfer data between the electronic device 800 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other first electronic devices, such as AR devices, etc.

[0277] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 800. In other embodiments of the present application, the electronic device 800 may also adopt different interface connection methods in the aforementioned embodiments, or a combination of multiple interface connection methods.

[0278] The charging management module 810 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 810 may receive charging input from a wired charger through the USB interface 809. In some wireless charging embodiments, the charging management module 810 may receive wireless charging input through a wireless charging coil of the electronic device 800. While the charging management module 810 is charging the battery 812, it may also power the first electronic device through the power management module 811.

[0279] The power management module 811 is used to connect the battery 812, the charging management module 810 and the processor 801. The power management module 811 receives input from the battery 812 and / or the charging management module 810, and supplies power to the processor 801, the internal memory 805, the external memory, the display screen 804, and the wireless communication module 803. The power management module 811 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 811 can also be set in the processor 801. In some other embodiments, the power management module 811 and the charging management module 810 can also be set in the same device.

[0280] The wireless communication function of the electronic device 800 can be implemented through the antenna 2, the wireless communication module 803, the modem processor and the baseband processor.

[0281] Antenna 2 is used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 800 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 2 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0282] The wireless communication module 803 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 800. The wireless communication module 803 can be one or more devices integrating at least one communication processing module. The wireless communication module 803 receives electromagnetic waves via the antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 801. The wireless communication module 803 can also receive the signal to be sent from the processor 801, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0283] In the embodiment of the present application, the wireless communication module 803 is used to establish Figure 1 For details about the connection, please refer to the previous Figure 1 Specifically, the wireless communication module 803 also executes Figures 2A to 7The connection established by the first device in the connection. For a detailed introduction to this connection, please refer to the previous Figures 2A to 7 Introduction.

[0284] The electronic device 800 implements the display function through a GPU, a display screen 804, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 804 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 801 may include one or more GPUs, which execute program instructions to generate or change display information.

[0285] The display screen 804 is used to display images, videos, etc. The display screen 804 includes a display panel. The display panel can be a liquid crystal display (LCD). The display screen panel can also be made of 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, quantum dot light emitting diodes (QLED), etc. In some embodiments, the electronic device 800 may include 1 or N display screens 804, where N is a positive integer greater than 1.

[0286] In the embodiment of the present application, the display screen 804 is used to display in the first device. Figure 1 The communication connection establishment interface shown in FIG. Figure 2A to Figure 2B The display interface before and after the keyboard and mouse cross-operation is shown. FIG. 3A to FIG. 3E The display interface before and after the keyboard and mouse crossover operation using the input method synchronization method, and the display interface before and after the second keyboard and mouse crossover operation using the input method synchronization method. For a detailed description of the above interfaces, please refer to the corresponding Figures 1 to 3E Introduction.

[0287] In addition, the display screen 804 is also used to display Figure 2A to Figure 2B The keyboard and mouse operation display interface shown in the figure is as follows: FIG. 3A to FIG. 3E The operation method of using the input method synchronization method to perform keyboard and mouse crossing operation is shown. For a detailed introduction to this method, please refer to the corresponding Figures 2A to 3E Introduction.

[0288] The electronic device 800 can realize the shooting function through an ISP, a video codec, a GPU, a display screen 804, and an application processor.

[0289] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 800 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0290] Video codecs are used to compress or decompress digital videos. The electronic device 800 may support one or more video codecs. Thus, the electronic device 800 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0291] NPU is a neural network (NN) computing processor, which can quickly process input information and continuously self-learn by drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain. NPU can realize applications such as intelligent cognition of electronic device 800, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0292] The internal memory 805 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).

[0293] Random access memory may include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.;

[0294] Non-volatile memory may include disk storage devices and flash memory.

[0295] Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle; can be divided into single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage unit potential level; can be divided into universal flash storage (UFS), embedded multi media card (eMMC), etc. according to the storage specification.

[0296] The random access memory can be directly read and written by the processor 801, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data.

[0297] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 801 .

[0298] In the embodiment of the present application, the internal memory 805 is used to store Figure 4 For details about the method shown in S401-S403, please refer to the previous description of Figure 4 Specifically, the internal memory 805 also stores Figures 5 to 7 The method executed by the first device in the embodiment of the present invention, for the detailed introduction of the method, please refer to the above description of Figures 5 to 7 Introduction.

[0299] The external memory interface 806 can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device 800. The external non-volatile memory communicates with the processor 801 through the external memory interface 806 to implement a data storage function. For example, files such as music and videos are stored in the external non-volatile memory.

[0300] The mouse module 807 may include one or more mechanical mice, optical mice, laser mice, and other external input devices having an indicator for displaying the vertical and horizontal coordinate positioning of the system.

[0301] In the embodiment of the present application, the mouse module 807 is used to receive the operation of the external device of the key position information input by the first device, and control the display Figure 2A to Figure 2B and FIG. 3A to FIG. 3E For details about this operation, please refer to the previous section Figure 2A to Figure 2B and FIG. 3A to FIG. 3E Introduction to keyboard and mouse crossing operations.

[0302] The keyboard module 808 may include one or more virtual keyboards and physical keyboards, wherein the physical keyboard includes a mechanical keyboard, a membrane keyboard, a capacitive keyboard, and the like, which have key functions and are external devices that can realize key input of key position information.

[0303] In the embodiment of the present application, the keyboard module 808 is used to receive the aforementioned Figure 3C The operation of the external device for inputting key position information by pressing the first device shown in e in FIG. 1 is described in detail in the previous section. Figure 3C Introduction of Chinese e.

[0304] Electronic equipment can be equipped Or portable terminal devices with other operating systems, such as mobile devices, tablet computers, desktop computers, laptop computers, handheld computers, notebook computers, UMPCs, netbooks, as well as cellular phones, PDAs, AR devices, VR devices, AI devices, wearable devices, vehicle-mounted devices, smart home devices and / or smart city devices, etc.

[0305] The first system may be a system used by the first device, for example system, the second system may be a system used by the second device, for example, system.

[0306] Fig. 9 A schematic diagram of an electronic device 900 provided in an embodiment of the present application is shown. The electronic device 900 may also be referred to as a second device.

[0307] The electronic device 900 may include: a processor 901, a mobile communication module 902, a wireless communication module 903, a display screen 904, an internal memory 905, an external memory interface 906, a button 907, a SIM card interface 908, a USB interface 909, a charging management module 910, a power management module 911, a battery 912, and a sensor module 913, wherein the sensor module 913 may include a pressure sensor 913A, a touch sensor 913B, an antenna 1, and an antenna 2.

[0308] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 900. In other embodiments of the present application, the electronic device 900 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0309] In the electronic device, the external memory interface 906, the USB interface 909, the charging management module 910, the power management module 911 and the battery 912 are partially the same as those of the first electronic device and are not described in detail here.

[0310] The processor 901 may include one or more processing units, for example, the processor 901 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0311] The controller may be the nerve center and command center of the electronic device 900. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0312] The processor 901 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 901 is a cache memory. The memory may store instructions or data that the processor 901 has just used or cyclically used. If the processor 901 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 901, and thus improves the efficiency of the system.

[0313] In some embodiments, the processor 901 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0314] In the embodiment of the present application, the processor 901 is used to execute Figure 5-Figure 7 The method executed by the second device in the embodiment of the present invention, for the detailed introduction of the method, please refer to the above description of Figure 5-Figure 7 Introduction.

[0315] The mobile communication module 902 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 900. The mobile communication module 902 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 902 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 mobile communication module 902 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 of the functional modules of the mobile communication module 902 can be set in the processor 901. In some embodiments, at least some of the functional modules of the mobile communication module 902 can be set in the same device as at least some of the modules of the processor 901.

[0316] 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. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 901 and be set in the same device as the mobile communication module 902 or other functional modules.

[0317] The wireless communication module 903 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 900. The wireless communication module 903 can be one or more devices integrating at least one communication processing module. The wireless communication module 903 receives electromagnetic waves via the antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 901. The wireless communication module 903 can also receive the signal to be sent from the processor 901, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0318] In some embodiments, the antenna 1 of the electronic device 900 is coupled to the mobile communication module 902, and the antenna 2 is coupled to the wireless communication module 903, so that the electronic device 900 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), 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).

[0319] In the embodiment of the present application, the mobile communication module 902 and / or the wireless communication module 903 is used to establish Figure 1 For details about the connection, please refer to the previous Figure 1 Specifically, the wireless communication module 903 also executes Figures 2A to 7 The connection established by the second device in the connection. For a detailed introduction to this connection, please refer to the previous Figures 2A to 7 Introduction.

[0320] The electronic device 900 implements the display function through a GPU, a display screen 904, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 904 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 901 may include one or more GPUs, which execute program instructions to generate or change display information.

[0321] The display screen 904 is used to display images, videos, etc. The display screen 904 includes a display panel. The display panel can be a liquid crystal display (LCD). The display screen panel can also be made of 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, quantum dot light emitting diodes (QLED), etc. In some embodiments, the electronic device 900 may include 1 or N display screens 904, where N is a positive integer greater than 1.

[0322] In the embodiment of the present application, the display screen 904 is used to display in the second device. Figure 1 The communication connection establishment interface shown in FIG. Figure 2A to Figure 2B The display interface before and after the keyboard and mouse cross-operation is shown. FIG. 3A to FIG. 3E The display interface before and after the keyboard and mouse crossover operation using the input method synchronization method, and the display interface before and after the second keyboard and mouse crossover operation using the input method synchronization method. For a detailed description of the above interfaces, please refer to the corresponding Figures 1 to 3E Introduction.

[0323] In addition, the display screen 904 is also used to display Figure 2A to Figure 2B The keyboard and mouse operation display interface shown in the figure is as follows: FIG. 3A to FIG. 3E The operation method of using the input method synchronization method to perform keyboard and mouse crossing operation is shown in the figure. For a detailed introduction of this method, please refer to the corresponding Figures 2A to 3E Introduction.

[0324] The internal memory 905 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).

[0325] Random access memory may include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.;

[0326] Non-volatile memory may include disk storage devices and flash memory.

[0327] Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle; can be divided into single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage unit potential level; can be divided into universal flash storage (UFS), embedded multi media card (eMMC), etc. according to the storage specification.

[0328] The random access memory can be directly read and written by the processor 901, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data, etc.

[0329] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 901 .

[0330] In the embodiment of the present application, the internal memory 905 is used to store Figures 5 to 7 The method executed by the second device in the embodiment of the present invention, for the detailed introduction of the method, please refer to the above description of Figures 5 to 7 Introduction.

[0331] The key 907 includes a power key, a volume key, etc. The key 907 may be a mechanical key or a touch key. The electronic device 900 may receive key input and generate key signal input related to user settings and function control of the electronic device 900.

[0332] The SIM card interface 908 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 900 by inserting it into the SIM card interface 908 or pulling it out from the SIM card interface 908. The electronic device 900 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 908 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 908 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 908 can also be compatible with different types of SIM cards. The SIM card interface 908 can also be compatible with external memory cards. The electronic device 900 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 900 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 900 and cannot be separated from the electronic device 900.

[0333] The pressure sensor 913A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 913A can be set on the display screen 904. There are many types of pressure sensors 913A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 913A, the capacitance between the electrodes changes. The electronic device 900 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 904, the electronic device 900 detects the touch operation intensity according to the pressure sensor 913A. The electronic device 900 can also calculate the touch position according to the detection signal of the pressure sensor 913A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0334] The touch sensor 913B is also called a "touch panel". The touch sensor 913B can be arranged on the display screen 904, and the touch sensor 913B and the display screen 904 form a touch screen, also called a "touch screen". The touch sensor 913B is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 904. In other embodiments, the touch sensor 913B can also be arranged on the surface of the electronic device 900, which is different from the position of the display screen 904.

[0335] In order to better understand the embodiments of the present application, the software architecture block diagram of the first device and the second device in the embodiments of the present application is introduced below.

[0336] Fig.10 A software architecture block diagram of a first device is shown.

[0337] like Fig.10 As shown, the first device includes a service layer, a capability layer and a driver layer.

[0338] The business layer includes UI interface implementation module, setting management module, status management module, direction recognition module, connection discovery module, rule management module and keyboard and mouse business management module.

[0339] The UI interface implementation module is used to provide a visual interface for users. For example, the UI module can display the aforementioned Figure 1 The computer manager interface shown above Figure 2A The main interface shown in a. The settings management module is used to manage the settings capabilities of the computer manager. For example, the settings management module can provide the user with the aforementioned Figure 1 The various options in the PC Manager shown. The state management module is used to manage the information of traversable devices and the keyboard and mouse traversal direction. For example, the state management module can determine the number, location and traversal direction of traversable devices. The direction recognition module is used to call the direction recognition capability to identify the direction of the Android device relative to the PC, detect direction changes and save direction information. The connection discovery module is used to discover connectable devices and connect devices. The rule management module is used to manage the rules for connecting Android devices and the rules for changing the traversal direction. The rule management module is used to manage the rules for connecting Android devices and the rules for changing the traversal direction. The keyboard and mouse service module is used to control the keyboard and mouse traversal and establish communication connection capabilities.

[0340] The capability layer includes direction recognition capability, keyboard and mouse virtual capability module, keyboard and mouse event detection module, device management middleware module, communication module (magic link), PC housekeeper framework, account system, and storage system. Among them, the direction recognition capability is used to measure the direction information of the Android device relative to the PC, the keyboard and mouse virtual capability module is used to obtain keyboard and mouse events and the transmission of keyboard and mouse events, and can also be used to adapt the position and movement speed of the mouse for devices with different resolutions. The keyboard and mouse event detection module is used to obtain keyboard and mouse events. The device management middleware module is used to provide data sharing capabilities between devices, for example, service switching capabilities between devices. The communication module is used to support the establishment of connection channels between devices and the transmission of data capabilities. The PC housekeeper framework is used to manage PC housekeeper options. The account system is used to obtain the login account of the PC. The storage system is used to store data.

[0341] The aforementioned keyboard and mouse virtual capability module includes a keyboard and mouse virtual service module, a keyboard and mouse interception module, a keyboard and mouse capture module, an edge computing module, a conversion module, a protocol management module, a data transmission module, and an input method detection module. Among them, the keyboard and mouse virtual service module is a keyboard and mouse virtualization service entrance, which can provide a keyboard and mouse business module development interface to start or end the service, schedule the keyboard and mouse event module relationship and state management. The keyboard and mouse interception module is used to prevent the first device from continuing to respond to the keyboard and mouse event when the keyboard and mouse crossover is completed. The keyboard and mouse capture module is used to obtain the keyboard and mouse event. The edge computing module is used to determine whether the mouse is at the edge based on the position of the mouse. The conversion module is used to match the coordinates of the first device and the second device. For example, the conversion module converts the mouse crossing position on the PC screen to the position of the mouse Android device screen. The conversion module converts the movement speed of the mouse on the first device screen to the movement speed of the mouse on the second device screen. The protocol management module is used to package the intercepted keyboard and mouse events using a preset protocol and send the keyboard and mouse message to the data transmission module. The data transmission module is used to transmit the keyboard and mouse message to the second device. The input method detection module is used to detect the input method type of the first device.

[0342] The driver layer includes Bluetooth driver, WiFi driver and human interface device (HID) driver.

[0343] Fig.11 A software architecture block diagram of a second device is shown.

[0344] like Fig.11 As shown, the second device includes an application layer, an application framework layer, an Android runtime and system library, and a kernel layer.

[0345] The application layer includes: UI module, setting management module, status management module, direction recognition module, connection discovery module, keyboard and mouse service management module, keyboard and mouse event detection module, device management middleware module, communication module (magiclink), account system and service framework.

[0346] Among them, the UI module is used to provide a visual interface for users. For example, the UI module is used to display the main interface and the interface of the application program, etc. The setting management module can be used to set the keyboard and mouse functions. The state management module is used to manage the state changes during the crossing process. For example, crossed or not crossed. The direction recognition module is used to provide direction recognition capabilities. The discovery connection module is used for connection capability scheduling and data communication in the keyboard and mouse business. The keyboard and mouse business management module is used to call, trigger or close the keyboard and mouse virtual capability module. The service framework is used to manage the keyboard and mouse service capability switch registration. The keyboard and mouse virtual capability module is used to provide keyboard and mouse virtual capabilities. The keyboard and mouse event detection module is used to obtain keyboard and mouse events. The device management middleware is used to provide data sharing capabilities between devices. The communication module is used to provide connection channels and data capability transmission between devices.

[0347] It should be noted that the communication module is a module for communication between different devices. The data obtained by other modules needs to be transmitted to their devices first, and then transmitted to other devices by the communication module. In the subsequent embodiments, in order to simplify the steps, in addition to the communication module communication between different devices, other modules perform cross-device communication. It can be understood that other modules first transmit the data to the communication module, and then the communication module transmits it to the communication module of other devices, and then the communication module of other devices transmits it to the module of the required data.

[0348] The aforementioned direction recognition capability can use the capability to measure the direction information of the first device relative to the second device. The relationship between the direction recognition capability and the direction recognition module is similar and will not be repeated here.

[0349] The application framework layer includes a keyboard and mouse virtual capability module, an input module, and a storage system. The input module may include a keyboard and mouse framework and an input framework. The keyboard and mouse framework is used to report keyboard and mouse events, and the input framework is used to report input events. The storage system is used to store data.

[0350] The aforementioned keyboard and mouse virtualization capability module includes a keyboard and mouse virtualization service module, an edge computing module, a conversion module, a protocol analysis management module, a data transmission module, a virtual device management module, and an input method setting module. Fig.10The functions are similar and will not be repeated here. The protocol analysis management module is used to unpack the keyboard and mouse messages to obtain keyboard and mouse events. The data transmission module is used to receive keyboard and mouse messages and transmit them to the protocol analysis management module. The virtual device management module is an operation interface module of the input module, including providing a keyboard and mouse event control interface and performing keyboard and mouse event input control. The input method setting module is a module for setting the input method type of the second device, including receiving input method type setting data and setting the input method to the received data type function.

[0351] It should be noted that when the keyboard and mouse virtual capability module transmits data, it needs to first transmit it to the keyboard and mouse business management module, and then transmit it to other modules. In order to simplify the steps, the keyboard and mouse virtual capability module directly transmits data to other modules. It can be understood that the keyboard and mouse virtual capability module first transmits the data to the keyboard and mouse business management module, and then the keyboard and mouse business management module transmits the data to other modules. The Android runtime and system library include a core library, a virtual machine, a surface manager, a media library, and a three-dimensional graphics processing library. The Android system runtime is responsible for the scheduling and management of the Android system. The core library contains two parts: one part is the function function that the Java language needs to call, and the other part is the Android core library. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection and other functions. The system library can contain modules with multiple functions, such as: surface manager, media library, and three-dimensional graphics processing library.

[0352] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of multiple common audio and video formats, as well as static image files. The media library can support multiple audio and video encoding formats, such as JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis and layer processing.

[0353] The kernel layer is the layer between hardware and software. The kernel layer is used to drive the hardware to make it work. The kernel layer includes Bluetooth driver, audio driver, wifi driver, virtual input driver (Uinput driver), display driver and HID driver. Among them, the virtual input driver is used to inject input events. Among them, the display driver is used to display the image shown in the above solution.

[0354] It should be understood that each step in the aforementioned method embodiment provided in the present application can be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.

[0355] The present application also provides an electronic device, which may include: a memory and a processor, wherein the memory may be used to store a computer program; and the processor may be used to call the computer program in the memory so that the electronic device executes the method in any of the aforementioned embodiments.

[0356] The present application also provides a chip system, which includes at least one processor for implementing the functions involved in the method executed by the electronic device in any of the aforementioned embodiments.

[0357] In one possible design, the chip system also includes a memory, which is used to store program instructions and data, and the memory is located inside or outside the processor.

[0358] The chip system may be composed of the chip, or may include the chip and other discrete devices.

[0359] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.

[0360] Optionally, the memory in the chip system may also be one or more. The memory may be integrated with the processor or may be separately arranged with the processor, which is not limited in the embodiments of the present application. Exemplarily, the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be arranged on different chips respectively. The embodiments of the present application do not specifically limit the type of memory and the arrangement of the memory and the processor.

[0361] Exemplarily, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.

[0362] The present application also provides a computer program product, which includes: a computer program (also referred to as code, or instruction), which, when executed, enables a computer to execute the method executed by the electronic device in any of the aforementioned embodiments.

[0363] The present application also provides a computer-readable storage medium, which stores a computer program (also referred to as code or instruction). When the computer program is executed, the computer executes the method executed by the electronic device in any of the above embodiments.

[0364] The various implementation modes of the present application can be combined arbitrarily to achieve different technical effects.

[0365] In the foregoing embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in this application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidStateDisk), etc.

[0366] Those skilled in the art can understand that to implement all or part of the processes in the aforementioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes in the aforementioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

[0367] In short, the above description is only an embodiment of the technical solution of the present invention, and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present invention shall be included in the protection scope of the present invention.

Claims

1. An input method synchronization method, characterized in that: The first device includes an input device, wherein the input device includes a mouse and a virtual keyboard and / or a physical keyboard; the method includes: The first device displays a first cursor corresponding to the mouse; The first device receives a first operation, and the first device stops displaying the first cursor; The first device sends a first message, where the first message is used to instruct the second device to display a second cursor corresponding to the mouse; The first device also sends a second message, where the second message is used to instruct the second device to switch the input method to a first input method, where the first input method is the input method used by the first device.

2. The method according to claim 1, characterized in that Before the first device sends the first message, the method further includes: the first device establishing a first connection with the second device.

3. The method according to claim 2, characterized in that The first device establishing the first connection with the second device specifically includes: before the first device receives the first operation, the first device establishing the first connection with the second device.

4. The method according to claim 2 or 3, characterized in that: The first device establishing the first connection with the second device specifically includes: after the first device receives the first operation, the first device establishing the first connection with the second device.

5. The method according to any one of claims 2 to 4, characterized in that: The first connection is specifically implemented by any one or more of the following communication technologies: Point-to-point P2P connection, wireless local area network WLAN, Bluetooth BT, near-field wireless communication technology NFC or infrared technology IR.

6. The method according to any one of claims 1 to 5, characterized in that The first operation specifically includes: A first movement operation is performed on the mouse.

7. The method according to any one of claims 1 to 6, characterized in that After the first operation, the method further includes: The first device displays a first interface, and the first interface does not include an interface displayed by the second device.

8. The method according to any one of claims 1 to 7, characterized in that After the first operation, the method further includes: The first device receives a second operation performed on the input device; The first device sends a third message, where the third message is used to instruct the second device to execute an event corresponding to the second operation.

9. The method according to any one of claims 1 to 8, characterized in that The first message and the second message are specifically sent in the following manner: The first device packages the first message and the second message into one message and sends the message.

10. The method according to any one of claims 1 to 9, characterized in that After the first device sends the second message, the method further includes: The first device switches the first input method to the second input method; The first device sends a fourth message, where the fourth message is used to instruct the second device to switch an input method to the second input method.

11. The method according to any one of claims 1 to 10, characterized in that The first device adopts a first system.

12. The method according to any one of claims 1 to 11, characterized in that The second device adopts a second system.

13. An electronic device, characterized in that: The electronic device includes one or more memories and one or more processors; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method described in any one of claims 1-12.

14. A communication system, characterized in that: The communication system includes a first device and one or more second devices, the first device includes one or more memories and one or more processors; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the first device to execute the method described in any one of claims 1-12.

15. A chip, applied to electronic equipment, characterized in that: The chip includes one or more processors, and the processor is used to call computer instructions to enable the electronic device to execute the method as described in any one of claims 1-12.

16. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the electronic device is caused to execute the method as claimed in any one of claims 1 to 12.