Input method, input device and system of a device
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2022-08-04
- Publication Date
- 2026-08-07
AI Technical Summary
[0003]现有的方案中,为了实现一套键鼠控制多个终端设备,多个终端设备需要处于同一个局域网中,并且对键盘、鼠标的要求比较高
[0006] In the above method, the first terminal device and the second terminal device do not need to build a complex networking environment. The input information of the second input device is forwarded through the first input device, which reduces the complexity of the solution implementation. Furthermore, this application does not limit whether the second input device has multi-connection capabilities, which reduces the requirements for input devices and lowers the user's usage costs.
Smart Images

Figure CN117555433B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to an input method, input device and system for a device. Background Technology
[0002] With the rapid development of terminal technology, users often encounter situations where they use multiple terminal devices simultaneously in their daily work or life. If each terminal device uses a separate set of input devices (such as a keyboard and mouse) for control, it can lead to cumbersome operations when switching between terminal devices. Therefore, to use multiple terminal devices more efficiently, it is necessary to share a single set of input devices among them.
[0003] In existing solutions, to enable a single keyboard and mouse to control multiple terminal devices, these devices need to be on the same local area network, and the requirements for the keyboard and mouse are relatively high. Therefore, how to conveniently enable a single input device to control multiple terminal devices has become an urgent problem to be solved. Summary of the Invention
[0004] This invention provides an input method, input device, and system for a device. Multiple input devices can be switched between multiple terminal devices without the need for connection between the terminal devices, and the cost of the input devices is low.
[0005] Firstly, a device input method is provided, applied to a communication system. The communication system includes a first input device, a second input device, a first terminal device, and a second terminal device. The first input device maintains a communication connection with both the first and second terminal devices, and the second input device maintains a communication connection with the first terminal device. The method includes: the first input device, in response to a first operation, switching its focus from the first terminal device to the second terminal device; the second input device, in response to a second operation, sending first input information to the first terminal device; then, the first terminal device sends second input information to the first input device based on the received first input information, and the first input device then sends the received second input information back to the second terminal device; the second terminal device responds to the second operation based on the received second input information.
[0006] In the above method, the first terminal device and the second terminal device do not need to build a complex networking environment. The input information of the second input device is forwarded through the first input device, which reduces the complexity of the solution implementation. Furthermore, this application does not limit whether the second input device has multi-connection capabilities, which reduces the requirements for input devices and lowers the user's usage costs.
[0007] In one implementation, the first input device responds to a first operation, and the method further includes: the first input device sending a first broadcast message to the first terminal device and the second terminal device, the first broadcast message being used to indicate that the current focus device of the first input device is the second terminal device.
[0008] When the focus of the first input device changes, a broadcast message should be sent to all currently connected terminal devices so that all terminals can be aware of the input device's status and respond accordingly.
[0009] In another possible implementation, the first input information may be the same as or different from the second input information.
[0010] In another possible implementation, the first input device is a mouse and the second device is a keyboard.
[0011] In another possible implementation, the first terminal device runs a first system, and the second input information includes a key code and a system identifier, wherein the key code is a key code under the first system, and the system identifier is used to indicate the first system.
[0012] The second input information carries the identifier of the first system, so that when the second terminal device receives the second input information through the first input device, it can interpret the meaning of the key code based on the system identifier and make a response.
[0013] In another possible implementation, when the focus of the first terminal device switches to the second terminal device, the second terminal device creates a new virtual device, which corresponds to the second input device.
[0014] Since the second terminal device and the second input device have not established a connection, a virtual input device corresponding to the second input device needs to be established to process the received input information.
[0015] In another possible implementation, the second terminal device runs a second system, and the second terminal device responds to the second operation based on the second input information by: the second terminal device converting the second input information into input information under the second system; and the second terminal device sending the second input information to the second system through a virtual device so that the second terminal device responds to the second operation.
[0016] When the second terminal device receives the second input information, it needs to convert the second input information so that the second system can understand it.
[0017] In another possible implementation, in response to a third operation performed on the first input device, the first input device switches its focus from the second terminal device to the terminal device; the first input device sends a second broadcast message to both the first terminal device and the second terminal device, the second broadcast message indicating that the first input device's current focus device is the first terminal device.
[0018] When the focus of the first input device switches from the second terminal device to the first terminal device, a broadcast message needs to be sent to all terminal devices currently connected to the first input device in order to synchronize the information of the current focus host of the first input device.
[0019] In another possible implementation, when the focus device of the first input device is not the second terminal device, the second terminal device deletes the virtual device.
[0020] In a second aspect, a device input method is provided, applied to a first input device, which maintains a communicative connection with a first terminal device and a second terminal device. The method includes: the first input device receiving a focus shift instruction sent by the first terminal device, switching the focus device of the first input device from the first terminal device to the second terminal device; the first input device receiving second input information sent by the first terminal device, the second input information being generated by the first terminal device based on the first input information sent by the second input device, the second input device maintaining a connection with the first terminal device; and the first input device sending the second input information to the second terminal device so that the second terminal device performs a response operation based on the second input information.
[0021] In the above method, after the first input device switches the focus from the first terminal device to the second terminal device, the first input device forwards the input information of the second input device to the second terminal device so that the second terminal device can respond. Although the second input device and the second terminal device do not establish a connection, the input operation of the second input device can still be reflected on the second terminal device, simulating the scenario of focus switching of the second input device.
[0022] In another implementation, after receiving a focus shift instruction, the first input device sends a first broadcast message to the first terminal device and the second terminal device. The first broadcast message is used to indicate that the current focus device of the first input device is the second terminal device.
[0023] In another implementation, the first input information may be the same as or different from the second input information.
[0024] In another implementation, the first input device is a mouse.
[0025] Thirdly, an input device is provided, which has the ability to connect to multiple terminal devices simultaneously. The input device includes: a communication interface for transmitting and receiving radio signals; a memory for storing computer program instructions; and a processor for executing the computer program instructions to support the input device in implementing the method described in any of the various implementations of the first aspect.
[0026] Fourthly, a system is provided, the communication system comprising a first terminal device, a second terminal device, and a first input device; the communication system is used to implement the method as described in any implementation of the first aspect.
[0027] Fifthly, a computer-readable storage medium is provided that stores computer program instructions that, when executed by a processor, implement the method as described in any possible implementation of the second aspect.
[0028] Sixthly, a chip system is provided, comprising a processor and a memory, wherein the memory stores computer program instructions; when executed by the processor, the computer program instructions implement the method as described in any possible implementation of the second aspect. The chip system may be composed of chips or may include chips and other discrete devices.
[0029] In a seventh aspect, a computer program product is provided that, when run on a computer, enables the implementation of the method as described in any possible implementation of the second aspect. Attached Figure Description
[0030] Figure 1 This is a conventional system architecture diagram provided for an embodiment of this application.
[0031] Figure 2 This is a system architecture diagram provided for an embodiment of this application.
[0032] Figure 3 This is a hardware architecture diagram of a terminal device provided in an embodiment of this application.
[0033] Figure 4 This is a hardware architecture diagram of an input device provided in an embodiment of this application.
[0034] Figure 5 This is a schematic diagram of a user interface provided in an embodiment of this application.
[0035] Figure 6 This is a signaling interaction diagram provided for an embodiment of this application.
[0036] Figure 7 This is a schematic diagram of a device manager provided in an embodiment of this application.
[0037] Figure 8 This is a signaling interaction diagram provided for an embodiment of this application. Detailed Implementation
[0038] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in this text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0039] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this embodiment, unless otherwise stated, "a plurality of" means two or more.
[0040] It's understandable that terminal devices typically connect to one or more input devices (such as input peripherals) to perform corresponding functions. For example, a personal computer (PC) can connect to a mouse to move the cursor on the PC screen and perform functions such as opening / deleting files. A PC can also connect to a keyboard to move the cursor on the PC screen, input characters, and open / delete files. Similarly, a tablet computer can connect to a keyboard to input characters and open applications / videos / audio files on the tablet.
[0041] Based on conventional methods, when a user uses multiple terminal devices simultaneously, the process of operating multiple devices is very cumbersome and inefficient because the user needs to carry and maintain the input devices associated with each terminal device, or the user needs to manually disconnect / reconfigure the connection between the input devices and the terminal devices.
[0042] To provide a more convenient multi-device operation experience, one approach is to switch between multiple devices using a control input device, enabling flexible operation or control of multiple terminal devices through a single input device.
[0043] For example, please refer to Figure 1 , Figure 1 This diagram illustrates a process of controlling multiple terminal devices using a single set of input devices. Figure 1In the scenario shown, the input devices are a keyboard and a mouse. Terminal device 1 and terminal device 2 have established a connection, which can be a P2P (Peer-to-Peer) connection, or both can be located on the same local area network. Figure 1 In the described scenario, the mouse and keyboard only need to maintain a connection with terminal device 1. Terminal device 1 listens for events where the mouse moves to the edge of its screen. When it determines that the mouse has moved off the screen edge based on its displacement, it sends the mouse displacement and the position information of the position off the screen to terminal device 2. Then, terminal device 2 calculates and displays the position of the mouse on its screen based on the received mouse displacement and position information of the position off the screen.
[0044] exist Figure 1 In this proposed solution, neither the keyboard nor the mouse establishes a connection with terminal device 2. Instead, information is sent from terminal device 1 to terminal device 2, simulating a scenario where one set of input devices can control two terminal devices. However, this solution requires a stable and reliable connection between terminal device 1 and terminal device 2. As the number of terminal devices increases, the network becomes complex and lacks scalability.
[0045] To address the aforementioned issues, this application provides a more intelligent multi-device operation experience. This application provides a method for connecting an input device, which can be applied to scenarios where multiple terminal devices are interconnected, enabling the same input device to be arbitrarily migrated between multiple terminal devices.
[0046] As an example, in this embodiment, the input device can be a wireless peripheral or a wired peripheral. A wireless peripheral refers to an input device that provides input to a terminal device based on a wireless transmission protocol (such as Bluetooth or 2.4G communication protocol), such as a wireless mouse or wireless keyboard. A wired peripheral includes, for example, a wired mouse or wired keyboard that connects to the host computer via a USB interface and is used to provide input to the terminal device.
[0047] Taking a Bluetooth peripheral as an input device as an example, the Bluetooth peripheral can communicate with the terminal device based on the Bluetooth protocol, which supports multiple connection protocol stacks between devices; or, the input device can communicate with the terminal device based on the 2.4G communication protocol; or, the input device can be a wired peripheral, which can communicate with the terminal device through a USB channel.
[0048] In this embodiment of the application, the input methods supported by the input device may include, but are not limited to, button input (such as mouse, keyboard, etc.), scroll wheel input (such as mouse, etc.), gesture input, body language input, voice input, facial expression input, eye movement input, etc.
[0049] The following describes the application scenarios of the embodiments of this application. For example... Figure 2 As shown, it includes a first terminal device 210, a second terminal device 220, a first input device 240, and a second input device 230.
[0050] The terminal device 1 or terminal device 2 described in this application embodiment may include, but is not limited to, personal computers (PCs), smartphones, netbooks, tablet computers, smart cameras, handheld computers, smart TVs, personal digital assistants (PDAs), portable multimedia players (PMPs), projection devices, smart screen devices, augmented reality (AR) / virtual reality (VR) devices, mixed reality (MR) devices, television sets, or motion-sensing game consoles in human-computer interaction scenarios. This application does not limit the specific functions and structures of the terminal devices.
[0051] Please refer to Figure 3 , Figure 3 A schematic diagram of the hardware structure of an electronic device 300 is shown. This electronic device 300 can be either the terminal device 210 or the terminal device 220 provided in this application embodiment. The electronic device 300 can include at least one of the following: mobile phone, foldable electronic device, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, super mobile personal computer, netbook, cellular phone, PDA, AR device, VR device, artificial intelligence device, wearable device, in-vehicle device, smart home device, and smart city device. This application embodiment does not impose any special limitations on the type of electronic device 100.
[0052] Electronic device 300 may include a processor 310, internal memory 321, USB connector 330, charging management module 340, power management module 341, battery 342, antenna 1, antenna 2, mobile communication module 350, wireless communication module 360, audio module 370, speaker 370A, receiver 370B, microphone 370C, headphone connector 370D, sensor module 380, button 390, motor 391, indicator 392, camera 393, display screen 394, memory card connector 320, and SIM card interface 395, etc. The sensor module 380 may include a pressure sensor 380A, gyroscope sensor 380B, barometric pressure sensor 380C, magnetic sensor 380D, accelerometer sensor 380E, proximity sensor 380F, proximity light sensor 380G, fingerprint sensor 380H, temperature sensor 380J, touch sensor 380K, ambient light sensor 380L, bone conduction sensor 380M, etc.
[0053] The structures illustrated in the embodiments of this application do not constitute a limitation on the electronic device 300. In other embodiments of this application, the electronic device 300 may include more or fewer components than illustrated. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0054] Processor 310 may include one or more processing units, such as application processors, modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0055] The processor 310 can generate operation control signals based on the instruction opcode and timing signals to control the instruction fetching and execution.
[0056] The processor 310 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 310 may be a cache memory. This memory can store instructions or data that have been used or are frequently used by the processor 310.
[0057] In some embodiments, the processor 310 may include one or more interfaces. These interfaces may include integrated circuit I2C interfaces, I2S interfaces, PCM interfaces, UART interfaces, MIPI interfaces, GPIO interfaces, SIM interfaces, and / or USB interfaces, etc. The processor 310 can connect to modules such as touch sensors, audio modules, wireless communication modules, displays, or cameras through at least one of these interfaces.
[0058] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a limitation on the electronic device 300. In other embodiments of this application, the electronic device 300 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0059] USB connector 330 is a USB standard-compliant connector used to connect electronic device 300 to peripheral devices. USB connector 330 can be a Mini-USB connector, Micro-USB connector, USB Type-C connector, etc. USB connector 330 can be used to connect a charger to charge electronic device 300. It can also be used to connect other electronic devices, enabling data transfer between electronic device 300 and other electronic devices. It can also be used to connect headphones, allowing audio stored in the electronic device to be output through the headphones. This connector can also be used to connect other electronic devices, such as VR devices.
[0060] The charging management module 340 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 340 receives charging input from the wired charger via a USB connector 130. In some wireless charging embodiments, the charging management module 340 receives wireless charging input via a wireless charging coil. While charging the battery 342, the charging management module 340 can also supply power to the electronic device 300 via the power management module 341. The battery 342 may include at least one set of electrode terminals, each set including at least one positive terminal. In one embodiment, when the battery includes two sets of electrode terminals, the electronic device can be configured with two wired charging paths or two wireless charging paths, each wired or wireless charging path connecting to at least one set of electrode terminals. Multiple charging paths simultaneously charge the battery 342, increasing charging power and reducing temperature rise. In another embodiment, when the battery includes two sets of electrode terminals, one set is used for wired charging and the other for wireless charging, allowing for a more flexible charging circuit layout. Based on the same design concept, those skilled in the art can configure more than two sets of electrode terminals and more than two charging paths according to design needs.
[0061] The power management module 341 connects the battery 342, the charging management module 340, and the processor 310. The power management module 341 receives input from the battery 342 and / or the charging management module 340, providing power to the processor 310, internal memory 321, display screen 394, camera 393, etc. The power management module 341 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 341 may also be located within the processor 310. In other embodiments, the power management module 341 and the charging management module 340 may be housed in the same device.
[0062] The wireless communication function of electronic device 300 can be realized through antenna 1, antenna 2, mobile communication module 350, wireless communication module 360, modem processor and baseband processor, etc.
[0063] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 300 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.
[0064] The mobile communication module 350 can provide a wireless communication solution including at least one of 2G, 3G, 4G, 5G, or 6G for use on the electronic device 300. The mobile communication module 350 may include at least one filter, switch, power amplifier, low-noise amplifier, etc. The mobile communication module 350 can filter, amplify, and otherwise process the electromagnetic waves received by the antenna 1 before transmitting them to the modem processor for demodulation. The mobile communication module 350 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via the antenna 1. In some embodiments, at least some functional modules of the mobile communication module 350 may be housed in the processor 310. In some embodiments, at least some functional modules of the mobile communication module 350 and at least some modules of the processor 310 may be housed in the same device.
[0065] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates 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 processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 370A, receiver 370B, etc.) or displays images or videos through a display screen 394. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 310 and may be housed in the same device as the mobile communication module 350 or other functional modules.
[0066] The wireless communication module 360 can provide applications on the electronic device 100, including wireless local area network (WLAN) modules, Bluetooth modules, BLE modules, ultra-wideband (UWB) modules, global navigation satellite system (GNSS) modules, FM modules, near field communication (NFC) modules, or infrared modules, etc. The wireless communication module 360 can be one or more devices integrating at least one communication processing module. The wireless communication module 360 receives electromagnetic waves via antenna 2, modulates and filters the electromagnetic wave signals, and sends the processed signal to processor 310. The wireless communication module 360 can also receive signals to be transmitted from processor 310, modulate and amplify them, and convert them into electromagnetic waves for radiation via antenna 2.
[0067] In some embodiments, antenna 1 of electronic device 300 is coupled to mobile communication module 350, and antenna 2 is coupled to wireless communication module 360, enabling electronic device 100 to communicate with other electronic devices via wireless communication technology. This wireless communication technology may include GSM, GPRS, CDMA, WCDMA, TD-SCDMA, LTE, BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS may include GPS, Global Navigation Satellite System (GLONASS), BeiDou Navigation Satellite System (BDS), Quasi-Zenith Satellite System (QZSS), and / or Satellite Based Augmentation Systems (SBAS).
[0068] Electronic device 300 can implement display functions through a GPU, display screen 394, and application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and graphics rendering. Processor 310 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0069] Display screen 394 is used to display images, videos, etc. In some embodiments, electronic device 100 may include one or more display screens 394. Display screen 394 may be at least one of LCD, OLED, AMOLED, FLED, Miniled, MicroLED, Micro-OLED, quantum dot light-emitting diode (QLED) displays, etc.
[0070] Electronic device 300 can realize camera function through camera module 393, ISP, video codec, GPU, display screen 394, application processor AP, neural network processor NPU, etc.
[0071] The camera module 393 can be used to acquire color image data and depth data of the subject. The Information Service Provider (ISP) can be used to process the color image data acquired by the camera module 393. For example, when taking a picture, the shutter is opened, and light passes through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the photosensitive element transmits this electrical signal to the ISP for processing, converting it into a visible image. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be integrated into the camera module 393.
[0072] In some embodiments, the camera module 393 may consist of a color camera module and a 3D sensing module.
[0073] In some embodiments, the photosensitive element of the camera in a color camera module may include a CCD or a CMOS phototransistor. The photosensitive element converts light signals into electrical signals, which are then transmitted to the ISP for conversion into digital image signals. The ISP outputs the digital image signals to the DSP for processing.
[0074] In some embodiments, the 3D sensing module may be a structured light 3D sensing module. The structured light 3D sensing module may include an infrared emitter, an infrared camera module, etc. The structured light 3D sensing module first emits a light spot of a specific pattern onto the object being photographed, then receives the encoded pattern of the light spot on the object's surface, and compares it with the original projected light spot to determine the object's three-dimensional coordinates. These three-dimensional coordinates may include the distance between the electronic device 300 and the object being photographed. The 3D sensing module can obtain the distance (i.e., depth) between itself and the object being photographed by measuring the infrared reflection time, thus obtaining a 3D depth map.
[0075] Structured light 3D sensing modules can also be applied to facial recognition, motion-sensing game consoles, and industrial machine vision inspection. 3D sensing modules can also be used in game consoles, AR, and VR.
[0076] In other embodiments, the camera module 393 may also consist of two or more cameras. These two or more cameras may include a color camera, which can be used to acquire color image data of the object being photographed. These two or more cameras may employ stereoscopic vision technology to acquire depth data of the object being photographed.
[0077] In some embodiments, the electronic device 300 may include one or more camera modules 393. The electronic device 100 may include a front-facing camera module 393 and a rear-facing camera module 393. The front-facing camera module 393 can be used to acquire color image data and depth data of the photographer, while the rear-facing camera module can be used to acquire color image data and depth data of the subject (such as a person, landscape, etc.) in front of the photographer.
[0078] In some embodiments, the CPU, GPU, or NPU in the processor 310 can process the color image data and depth data acquired by the camera module 393. In some embodiments, the NPU can identify the color image data acquired by the camera module 393 using neural network algorithms based on skeletal point recognition technology, such as convolutional neural network algorithms (CNN), to determine the skeletal points of the person being photographed. The CPU or GPU can also be used to run neural network algorithms to determine the skeletal points of the person being photographed based on the color image data. In some embodiments, the CPU, GPU, or NPU can also be used to confirm the body shape of the person being photographed (such as body proportions, the degree of fatness or thinness of body parts between skeletal points) based on the depth data acquired by the camera module 393 (which may be a 3D sensing module) and the identified skeletal points, and can further determine the beautification parameters for the person being photographed, and finally process the captured image of the person being photographed based on the body beautification parameters so that the body shape of the person being photographed in the captured image is beautified.
[0079] Video codecs are used to compress or decompress digital video. Electronic device 300 may support one or more video codecs. Thus, electronic device 300 can play or record video in various encoding formats, such as MPEG1, MPEG2, MPEG3, MPEG4, etc.
[0080] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs can enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0081] The memory card connector 320 can be used to connect memory cards, such as Micro SD cards and Nano SD cards, to expand the storage capacity of the electronic device 300. The memory card communicates with the processor 110 through the memory card connector 120 to achieve data storage functionality. In some embodiments, the memory card and SIM card can share the same connector in a time-sharing manner, and the electronic device can identify whether the card connected to the connector is a memory card or a SIM card, thus achieving the corresponding function. Alternatively, the memory card and SIM card can be simultaneously housed in the same connector, electrically connected to different contacts of the electronic device 300, respectively implementing storage and SIM functions.
[0082] Internal memory 321 can be used to store computer executable program code, including instructions. Internal memory 321 may include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 300 (such as audio data, phonebook, etc.). Furthermore, internal memory 321 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 310 executes various functional methods or data processing of electronic device 300 by running instructions stored in internal memory 321 and / or instructions stored in memory disposed in the processor.
[0083] Electronic device 300 can implement audio functions such as music playback and recording through audio module 370, speaker 370A, receiver 370B, microphone 370C, headphone connector 370D, and application processor.
[0084] The audio module 370 is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. The audio module 370 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 370 may be located in the processor 310, or some functional modules of the audio module 370 may be located in the processor 310.
[0085] The speaker 370A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. Electronic device 300 can listen to music through the speaker 370A or output audio signals for hands-free calling.
[0086] The receiver 370B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a phone call or voice message, the receiver 370B can be brought close to the listener's ear to hear the voice.
[0087] Microphone 370C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can bring their voice close to microphone 370C to input the sound signal. Electronic device 300 may have at least one microphone 370C. In some embodiments, electronic device 300 may have two or more microphones 370C, which, in addition to collecting sound signals, can also achieve noise reduction. In other embodiments, electronic device 100 may also use the microphone to identify the sound source, enabling directional recording, etc.
[0088] The headphone connector 370D is used to connect wired headphones. The headphone connector 370D can be a USB connector 330 or a 3.5mm connector compliant with the Open Mobile Terminal Platform (OMTP) standard, or a connector compliant with the Cellular Telecommunications Industry Association of the USA (CTIA) standard.
[0089] Pressure sensor 380A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, pressure sensor 380A may be disposed on display screen 394. Pressure sensor 380A
[0090] There are many types of pressure sensors, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to the pressure sensor 380A, the capacitance between the electrodes changes. The electronic device 300 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to the display screen 394, the electronic device 300 detects the intensity of the touch operation based on the pressure sensor 380A. The electronic device 300 can also calculate the touch position based on the detection signal from the pressure sensor 380A. In some embodiments, touch operations applied to the same touch position but with different intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS message is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS message is executed.
[0091] The gyroscope sensor 380B can be used to determine the motion attitude of the electronic device 300. In some embodiments, the gyroscope sensor 380B can determine the angular velocity of the electronic device 300 around three axes (i.e., the x, y, and z axes). The gyroscope sensor 380B can be used for image stabilization. For example, when the shutter is pressed, the gyroscope sensor 380B detects the angle of the shake of the electronic device 300, calculates the distance that the lens module needs to compensate based on the angle, and controls the lens to move in the opposite direction to counteract the shake of the electronic device 300, thus achieving image stabilization. The gyroscope sensor 380B can also be used in navigation and motion-sensing game scenarios.
[0092] The barometric pressure sensor 380C is used to measure air pressure. In some embodiments, the electronic device 00 calculates altitude based on the air pressure value measured by the barometric pressure sensor 380C to assist in positioning and navigation.
[0093] The magnetic sensor 380D includes a Hall effect sensor. The electronic device 300 can use the magnetic sensor 380D to detect the opening and closing of the flip cover. When the electronic device is a foldable device, the magnetic sensor 380D can be used to detect the folding or unfolding of the electronic device, or the folding angle. In some embodiments, when the electronic device 300 is a flip phone, the electronic device 300 can detect the opening and closing of the flip cover based on the magnetic sensor 380D. Then, based on the detected opening and closing state of the cover or the flip cover, features such as automatic flip unlocking can be set.
[0094] The 380E accelerometer can detect the magnitude of acceleration in various directions (typically three axes) of an electronic device 00. When the electronic device 300 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of electronic devices and is applicable to screen orientation switching, pedometers, and other applications.
[0095] A distance sensor 380F is used to measure distance. Electronic device 300 can measure distance via infrared or laser. In some embodiments, during a shooting scene, electronic device 00 can utilize the distance sensor 80F for distance measurement to achieve fast focusing.
[0096] The proximity sensor 380G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED. The electronic device 300 emits infrared light outward through the LED. The electronic device 300 uses the photodiode to detect infrared reflected light from nearby objects. When the intensity of the detected reflected light is greater than a threshold, it can be determined that an object is approaching the electronic device 300. When the intensity of the detected reflected light is less than the threshold, the electronic device 300 can determine that no object is approaching the electronic device 300. The electronic device 300 can use the proximity sensor 380G to detect when a user holds the electronic device 300 close to their ear for a phone call, so as to automatically turn off the screen to save power. The proximity sensor 380G can also be used in holster mode and pocket mode for automatic unlocking and locking of the screen.
[0097] The ambient light sensor 380L can be used to sense ambient light intensity. The electronic device 300 can adaptively adjust the brightness of its display screen 394 based on the sensed ambient light intensity. The ambient light sensor 380L can also be used to automatically adjust the white balance when taking photos. The ambient light sensor 380L can also work in conjunction with the proximity sensor 380G to detect whether the electronic device 300 is obstructed, such as when the electronic device is in a pocket. When obstruction or being in a pocket is detected, certain functions (such as touch functionality) can be disabled to prevent accidental operation.
[0098] The fingerprint sensor 380H is used to collect fingerprints. The electronic device 300 can utilize the characteristics of the collected fingerprints to achieve fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering calls with fingerprints, etc.
[0099] Temperature sensor 380J is used to detect temperature. In some embodiments, electronic device 300 uses the temperature detected by temperature sensor 380J to execute a temperature handling strategy. For example, when the temperature detected by temperature sensor 380J exceeds a threshold, electronic device 300 reduces processor performance to reduce power consumption and implement thermal protection. In other embodiments, when the temperature detected by temperature sensor 380J is below another threshold, electronic device 300 heats battery 342. In still other embodiments, when the temperature is below yet another threshold, electronic device 300 may boost the output voltage of battery 342.
[0100] Touch sensor 380K, also known as a "touch device," can be located on display screen 394. The touch sensor 380K and display screen 394 together form a touchscreen, also known as a "touchscreen." Touch sensor 380K detects touch operations applied to or near it. The touch sensor can transmit 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 display screen 394. In other embodiments, touch sensor 380K may also be located on the surface of electronic device 300, in a different position than display screen 394.
[0101] The bone conduction sensor 380M can acquire vibration signals. In some embodiments, the bone conduction sensor 380M can acquire vibration signals from the vibrating bone segments of the human vocal cords. The bone conduction sensor 380M can also contact the human pulse to receive blood pressure signals. In some embodiments, the bone conduction sensor 380M can also be incorporated into headphones to form bone conduction headphones. The audio module 370 can parse the voice signals from the vibrating bone segments of the vocal cords acquired by the bone conduction sensor 380M to realize voice functionality. The application processor can parse heart rate information from the blood pressure signals acquired by the bone conduction sensor 380M to realize heart rate detection functionality.
[0102] Button 390 may include a power button, volume buttons, etc. Button 390 may be a mechanical button or a touch button. Electronic device 300 may receive button input and generate key signal inputs related to user settings and function control of electronic device 300.
[0103] Motor 391 can generate vibration alerts. Motor 391 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can be corresponding to touch operations applied to different applications (such as taking photos, playing audio, etc.). Motor 391 can also correspond to different vibration feedback effects for touch operations applied to different areas of the display screen 394. Different application scenarios (such as time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.
[0104] Indicator 392 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.
[0105] The SIM card interface 395 can be a hardware module used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 395 to make contact with and detach from the electronic device 300. The electronic device 300 can support one or more SIM card interfaces. The SIM card interface 395 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 395 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 395 can also be compatible with different types of SIM cards. The SIM card interface 395 can also be compatible with memory cards. The electronic device 300 interacts with the network through the SIM card to realize functions such as calls and data communication. In some embodiments, the electronic device 300 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 300 and cannot be separated from the electronic device 300.
[0106] It should be noted that, Figure 3 The hardware modules included in the terminal device shown are merely illustrative and do not limit the specific structure of the terminal device.
[0107] The following is for reference. Figure 4 , Figure 4 This diagram illustrates a structural block diagram of an input device 400 according to an embodiment of this application. The input device 400 includes a processing unit 410, a storage unit 420, a communication unit 430, and an input unit 440. The processing unit 410 may be a central processing unit (CPU) or a microcontroller (MCU), etc. The storage unit 420 may include DDR SDRAM (Double Data Rate SDRAM) or non-volatile memory, such as FLASH memory. The storage unit of the input device can be used to store connected host information; for example, it stores the device identifier of the connected host. The storage unit of the input device can also be used to record and maintain the currently focused host of the input device. The communication unit may include a Bluetooth module for Bluetooth communication with the terminal device; or, the communication unit may include a 2.4G Wi-Fi chip for communication with the terminal device based on the 2.4G network protocol; or, the communication unit may be a USB port for communication with the terminal device via a wired USB channel. It should be noted that this application does not specifically limit the modules included in the input device; the choice depends on the specific circumstances.
[0108] Furthermore, in the embodiments provided in this application, when the first input device is a mouse, the mouse can have a multi-connection function. A mouse with a multi-connection function can maintain wired or wireless connections with multiple terminal devices simultaneously. As described above, wireless connections can include Bluetooth connections, 2.4G Wi-Fi connections, etc., and wired connections can include USB connections, etc. When the mouse has any two or more of the above-mentioned wireless and wired connection capabilities, the mouse has a multi-connection function. For example, when the mouse's Bluetooth module supports the Bluetooth 5.0 communication protocol, that is, supports the multi-connection protocol stack, the mouse can simultaneously establish Bluetooth channels with multiple terminal devices to achieve multi-connection. As another example, when the mouse has a Bluetooth module and also has a 2.4G Wi-Fi chip, it can simultaneously establish communication channels with multiple terminal devices through Bluetooth and Wi-Fi respectively to achieve multi-connection. As yet another example, when the mouse has a Bluetooth module and also has a USB port, it can simultaneously establish communication channels with multiple terminal devices through Bluetooth and wired connections respectively. This application does not specifically limit the configuration for achieving multi-connection, but depends on the situation.
[0109] For example, when an input device has multiple connectivity features, a hardware switch can be set on the input device to enable or disable this feature. Alternatively, users can enable or disable the multiple connectivity features of the input device through a user interface, such as... Figure 5 As shown.
[0110] It is understood that this application only uses two terminal devices as an example. The number of terminal devices can be increased if the input device's connectivity allows, and this application does not impose specific limitations on this. Figure 2 In the application scenario shown, the first input device 240 establishes connections with both terminal devices 210 and 220 simultaneously, which can be either wireless or wired connections. The second input device 230 establishes a connection only with terminal device 210, which can also be either wireless or wired connections.
[0111] The following is combined with Figure 2 as well as Figure 6 This application introduces a device input method provided by an embodiment. Taking a mouse as the first input device 240 and a keyboard as the second input device 230 as an example.
[0112] Step S601: The first input device establishes a communication connection with multiple terminal devices.
[0113] The first input device 240 enables the multi-connection function in response to the multi-connection function switch being turned on, or in response to the user enabling the multi-connection function through the UI interface. For example, if the first input device 240 originally only had a wired connection with the second terminal device 220, in response to the enabling of the multi-connection function, the first input device 240 searches for nearby terminal devices and also establishes a communication connection with the first terminal device 210. As another example, if the first input device 240 originally only had a Bluetooth connection with the first terminal device 210, in response to the enabling of the multi-connection function, the first input device 240 can switch Bluetooth channels and send a Bluetooth proximity discovery pairing broadcast to discover nearby connectable terminal devices, thereby maintaining Bluetooth communication connections between the first input device 240, the first terminal device 210, and the second terminal device 220 simultaneously.
[0114] It should be noted that there is no specific limitation on when the first terminal device establishes connections with other multiple terminals. After the multi-connection function is enabled, connections with other terminal devices can be initiated immediately, or connections can be initiated when there is a need to switch between terminal devices, for example, when the mouse moves off the screen from the first terminal device.
[0115] Step S602: The second input device establishes a communication connection with the first terminal device.
[0116] For example, the second input device 230 establishes a connection with the first terminal device 210, which can be a wired connection or a wireless connection. In the embodiments provided in this application, there is no specific requirement for whether the second input device has a multi-connection function.
[0117] Step S603: When the focus of the first input device switches from the first terminal device to the second terminal device, a virtual input device is established in the second terminal device, which corresponds to the second input device.
[0118] After establishing a connection with the first input device, both the first and second terminal devices will monitor and record the status of the first input device, and can provide an interface for other terminal devices to query. For example, after establishing a connection with the first input device, the first terminal device can save the device ID of the first input device and record its current connection status as "connected". Further, in the embodiments provided in this application, when the first input device is a mouse, the first terminal device will also record the device identifier of the mouse's current focus device. Alternatively, it can directly record whether the mouse's current focus is on the first terminal device.
[0119] Since the first input device has established connections with both the first terminal device and the second terminal device in step S601, it can freely switch between them. When the mouse cursor slides off the screen from the edge of the first terminal device to other surrounding terminal devices, the mouse focus switches from the first terminal device to the other device. For example, the first terminal device 210 and the second terminal device 220... Figure 2 As shown in the positional layout, when the mouse cursor continues to slide to the right from the right edge of the screen of the first terminal device 210, the mouse cursor will appear on the left edge of the screen of the second terminal device 220, thus switching the mouse focus.
[0120] The first terminal device can monitor the movement of the mouse cursor. When the mouse cursor moves to the edge of the screen, the first terminal device notifies the mouse to switch focus to the second terminal device, for example, by sending a focus shift instruction to the mouse. After the mouse switches focus to the second terminal device, the mouse sends a broadcast message to all currently connected terminal devices, announcing that the mouse's current focus device is the second terminal device.
[0121] When the focus of the first input device has switched to the second terminal device, it indicates that the user's usage needs have shifted from the first terminal device to the second terminal device. Therefore, in addition to the focus switch of the first input device, it is also necessary to ensure that input operations on the second input device can be responded to on the second terminal device. When the focus of the first input device (e.g., a mouse) switches from the first terminal device to the second terminal device, after receiving a broadcast from the mouse indicating the current focus host, the second terminal device establishes a virtual input device corresponding to the second input device to facilitate control of the second terminal device's response. The implementation mechanism of the virtual keyboard device differs across different terminal systems. For example, when the second terminal device is an Android or Linux device, it can be implemented by creating an input device within the system; when the second terminal device is a Windows device, it can be implemented by creating an HID device using the HID framework.
[0122] Step S604: In response to an input operation on the second input device, the first terminal device obtains the first input information of the second input device and sends the second input information to the first input device based on the first input information.
[0123] For example, when the second input device is a keyboard, when the user presses a key on the keyboard, the first terminal device receives the key code (first input information) sent by the keyboard, and then converts it into a key code (second input information) that matches the first terminal device, and then sends the key code (second input information) that matches the first terminal device to the first input device.
[0124] Alternatively, when the second input device is a keyboard, after the user presses a key, the keyboard sends a key code to the underlying driver of the first terminal device. The first terminal device then sends the key code directly to the first input device without any conversion. That is, the first input information and the second input information are the same information.
[0125] In one embodiment, the input information includes keyboard key codes and the system type of the first terminal device, wherein the system type of the first terminal device is a first system.
[0126] In one embodiment, the input information only includes keyboard key codes. In this embodiment, the system types of both parties can be confirmed in advance when the mouse establishes a connection with the two terminal devices, so it is not necessary to include the system type in the input information.
[0127] Optionally, the input information may further include the device identifier of the first terminal device.
[0128] Step S605: After receiving the second input information, the first input device forwards the second input information to the second terminal device.
[0129] Although the first input device has switched the focus host, it still maintains the connection with both the first and second terminal devices. Therefore, it can receive input information from the first terminal device and forward the input information to the second terminal device.
[0130] Step S606: The second terminal device responds to the input operation in step S604 based on the received input information.
[0131] The second terminal device converts the second input information into input information that matches the second system of the second terminal device, and injects the converted input information into the second system through a virtual input device.
[0132] Under normal circumstances, when an input device establishes a communication connection with a terminal device, the terminal device can maintain and manage the input device's information. The terminal device's system can view the connected input device, its type, and its operating status. For example, ... Figure 7 As shown, when a Windows device is connected to peripherals such as a mouse and keyboard, the information of the input device can be viewed in the system's Device Manager. The mouse and keyboard are both displayed as HID devices in the Windows device. In the embodiment provided in this application, the first input device and the second terminal device do not establish a connection. Therefore, in order to inject the input operation of the first input device into the second system of the second terminal device, a virtual input device needs to be established in the second system so that the second terminal device can respond to the input operation.
[0133] Step S607: When the focus of the first input device switches from the second terminal device back to the first terminal input device, the second terminal device deletes the virtual input device established in step S603.
[0134] For example, when the mouse moves away from the left edge of the screen of the second terminal device, the second terminal device notifies the mouse to switch its focus to the first terminal device. After the mouse switches its focus to the first terminal device, it broadcasts to all currently connected terminal devices, notifying them that the mouse's current focus device is the first terminal device. The second terminal device, sensing that the mouse focus has switched, can delete the virtual input device previously created in step S603.
[0135] The following is a specific example illustrating the method provided in this application embodiment. The first terminal device 210 runs a Windows system (first system), and the second terminal device 220 runs an Android system (second system). The first input device 240 is a mouse, and the second input device 230 is a keyboard. The first input device maintains a communication connection with both the first and second terminal devices, and the mouse can freely switch focus between the two input devices. The second input device maintains a communication connection only with the first terminal device. The communication connection method described above is as described above and will not be repeated here.
[0136] The mouse cursor moves from the screen of the first terminal device 210 to the screen of the second terminal device 220, and clicks in the text input box of the second terminal device, switching the focus. When the mouse focus switches to the second terminal device 220, a virtual keyboard device corresponding to the physical keyboard is created on the second terminal device 220. When the user presses the key "W" on the keyboard 230, the first terminal device receives the key code from the keyboard and generates the Windows system key code 0x57. Then, the first terminal device 210 sends the key code 0x57 and the identifier of the first system to the mouse, where the identifier of the first system indicates that the first system is a Windows system. The mouse sends the received key code and the identifier of the first system to the second terminal device. The second terminal device determines the corresponding key code 51 under the Android system based on the identifier of the first system and the key code 0x57, and then injects the key code into the second system through the virtual keyboard device. The letter "W" will appear in the input box of the second terminal device.
[0137] When the mouse cursor moves from the screen of the second terminal device 220 back to the screen of the first terminal device, the mouse focus switches from the second terminal device to the first terminal device. Optionally, the second terminal device deletes the previously created virtual keyboard device.
[0138] In the embodiments provided in this application, when the mouse focus switches from the first terminal device to the second terminal device, the first terminal device connected to the keyboard intercepts keyboard input and forwards the input information to the second terminal device via the mouse. After establishing a virtual keyboard device on the second terminal device, input information can be injected into the system of the second terminal device through the virtual keyboard device, so that the second terminal device can respond. In the method provided in this application embodiment, the first terminal device and the second terminal device do not need to establish a connection, thus eliminating the need for a complex networking environment. In addition, the method provided in this application embodiment has no special requirements for the first input device; it only needs to be an input device that can be connected to the terminal device, reducing the user's usage cost.
[0139] The following is combined with Figure 8 This application introduces another device input method provided by an embodiment. It includes a first input device and a second input device. The first input device has multiple connection capabilities, meaning it can simultaneously establish connections with a first terminal device and a second terminal device. The first terminal device runs a first system, and the second terminal device runs a second system.
[0140] Step S801: The first input device 240 establishes a connection with the first terminal device 210 and the second terminal device 220.
[0141] As mentioned above, the first input device 240 can establish connections with the first terminal device 210 and the second terminal device 220 via wireless or wired means, respectively. After the connection is established, the initial focus of the first input device 240 is on the first terminal device.
[0142] Step S802: The second input device 230 establishes a connection with the first terminal device 210.
[0143] Step S803: The first terminal device sends an indication message to the first input device. This device connection indication message is used to indicate that the first terminal device has established a connection with the second input device.
[0144] Step S804: The first input device forwards the instruction information to the second terminal device so that the second terminal device can perform the corresponding operation according to the instruction information, such as step S804.
[0145] It should be noted that steps S803 and S804 can be executed before the first input device switches focus, i.e., before step S805, or after the focus switches, or when the first terminal device receives input information sent by the second input device, such as in step S807. This application does not limit this.
[0146] Step S805: The first input device switches the focus device from the first terminal device to the second terminal device and sends a broadcast message to all currently connected terminal devices.
[0147] The focus switching process can be referred to in step S603 above. After the focus is switched, the mouse will send a broadcast message to all currently connected hosts to synchronize the information of the current first input device's focus host.
[0148] Step S806: The second terminal device establishes a virtual device corresponding to the second input device.
[0149] Previously, the second terminal device had received the instruction information, that is, the second terminal device had determined that the second input device had established a communication connection with the first terminal device. Therefore, when the first input device switches focus, the second terminal device will create a virtual device corresponding to the second input device.
[0150] Step S807: The second input device receives the user's operation and sends the first input information to the first terminal device.
[0151] When the second input device is a keyboard, the user presses a key on the keyboard, and the keyboard sends a key code to the driver of the first terminal device.
[0152] Step S808: The first terminal device receives the first input information sent by the second input device and determines whether the current focus device of the first input device is the first terminal device. If the current focus of the first input device is the first terminal device, proceed to step S809; if the current focus of the first input device is not the first terminal device but the second terminal device, skip step S809 and proceed directly to step S810. When the mouse switches focus, it broadcasts to all terminal devices to notify which terminal device the mouse is currently focusing on. Therefore, the first terminal device can sense whether the current focus device of the mouse is the first terminal device.
[0153] Step S809: The first terminal device responds to the input information sent by the second input device and performs the corresponding operation.
[0154] Step S810: The first terminal device sends the second input information to the first input device based on the first input information.
[0155] In one implementation, the second input information is the same as the first input information. For example, when the second input device is a keyboard, the first terminal device directly forwards the key codes sent by the keyboard to the first input device.
[0156] In another implementation, the second input information is generated based on the first input information. For example, when the second input device is a keyboard, the first terminal device converts the key codes sent by the keyboard into key codes under the first system, and then sends the converted key codes to the first input device.
[0157] Additionally, the input device may also carry a system identifier or device identifier for the first terminal device, used to identify the system running on the first terminal device. In one scenario, after the mouse establishes a connection with multiple terminal devices, each of the multiple terminal devices acquires the identifiers of the surrounding terminal devices and the system running on that terminal device. Therefore, the system running on the first terminal device can be identified using either the device identifier or the system identifier.
[0158] It should be noted that if the second input information is directly the first input information, then the second input information does not need to include the device identifier or system identifier, and the second terminal device can directly respond and operate based on the second input information.
[0159] Step S811: The first input device sends the second input information to the second terminal device.
[0160] Step S812: The second terminal device responds based on the second input information.
[0161] For example, when the second input device is a keyboard, in one implementation, the second input information is the first input information. The second terminal device can directly determine the key code under the second system based on the key code sent by the keyboard to the first terminal device, and then the second system executes the operation corresponding to the key code.
[0162] In one implementation, the second input information is a key code under the first system, and the second terminal device converts the key code into a key code under the second system so that the second system can perform the corresponding operation.
[0163] In another implementation, when the first system and the second system are the same system, the second system does not need to be converted.
[0164] Step S813: When the focus of the first input device switches from the second terminal device to another terminal device, the second terminal device deletes the virtual device created in step S807.
[0165] When the second input device receives the user's input operation again, the second input device continues to execute step S805, and the first terminal device continues to execute steps S806-S812.
[0166] The steps of the methods or algorithms described in conjunction with the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in RAM, flash memory, ROM, EPROM, EEPROM, registers, hard disk, portable hard disk, CD-ROM, or any other form of storage medium well known in the art. An exemplary storage medium is coupled to the processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside in an ASIC. Alternatively, the ASIC can reside in an electronic device. Of course, the processor and storage medium can also exist as discrete components in an input device.
[0167] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
Claims
1. An input method for a device, characterized in that, The method is applied to a communication system, which includes a first input device, a second input device, a first terminal device, and a second terminal device. The first input device maintains a communication connection with both the first and second terminal devices. The second input device maintains a communication connection with the first terminal device, but is not connected to the second terminal device. The first input device responds to the first operation by switching the focus from the first terminal device to the second terminal device, where the first operation is an operation performed on the first input device; The first input device sends a first broadcast message to the first terminal device and the second terminal device, the first broadcast message being used to indicate that the current focus device of the first input device is the second terminal device; When the focus switches from the first terminal device to the second terminal device, the second terminal device creates a new virtual device, which corresponds to the second input device. In response to the second operation, the second input device sends the first input information to the first terminal device, whereby the second operation is an operation performed on the second input device. The first terminal device receives and intercepts the first input information, and sends the second input information to the first input device. The second input information is generated based on the received first input information. The first input device sends the second input information to the second terminal device; The second terminal device responds to the second operation based on the virtual device and the second input information.
2. The method according to claim 1, characterized in that, The first input information may be the same as or different from the second input information.
3. The method according to claim 1 or 2, characterized in that, The first input device is a mouse, and the second input device is a keyboard.
4. The method according to claim 3, characterized in that, The first terminal device runs a first system, and the second input information includes a key code and a system identifier. The key code is a key code under the first system, and the system identifier is used to indicate the first system.
5. The method according to claim 1, characterized in that, The second terminal device runs the second system, and the second terminal device responds to the second operation based on the virtual device and the second input information, including: The second terminal device sends the second input information to the second system through a virtual device, causing the second terminal device to respond to the second operation.
6. The method according to claim 1, characterized in that, The second terminal device runs the second system, and the second terminal device responds to the second operation based on the virtual device and the second input information, including: The second terminal device converts the second input information into input information under the second system; The second terminal device sends the converted input information to the second system through a virtual device, causing the second terminal device to respond to the second operation.
7. The method according to claim 1 or 2, characterized in that, The method further includes: In response to a third operation, the first input device switches its focus from the second terminal device to the first terminal device, wherein the third operation is an operation performed on the first input device; The first input device sends a second broadcast message to the first terminal device and the second terminal device, the second broadcast message being used to indicate that the current focus device of the first input device is the first terminal device.
8. The method according to claim 7, characterized in that, The method further includes: When the focus device of the first input device is not the second terminal device, the second terminal device deletes the virtual device.
9. A device input method, characterized in that, The method, applied to a first input device, which maintains a communicative connection with a first terminal device and a second terminal device, includes: The first input device receives a focus shift instruction sent by the first terminal device, switches the focus device of the first input device from the first terminal device to the second terminal device, and sends a first broadcast message to the first terminal device and the second terminal device; the first broadcast message is used to indicate that the current focus device of the first input device is the second terminal device. When the focus device of the first input device switches from the first terminal device to the second terminal device, the second terminal device includes a newly created virtual device, which corresponds to the second input device. The first input device receives second input information sent by the first terminal device. The second input information is generated by the first terminal device based on the first input information received and intercepted from the second input device. The second input device maintains a connection with the first terminal device. The first input device sends the second input information to the second terminal device so that the second terminal device can perform a response operation based on the second input information.
10. The method according to claim 9, characterized in that, The first input information may be the same as or different from the second input information.
11. The method according to claim 9 or 10, characterized in that, The first input device is a mouse.
12. An input device, characterized in that, The input device has the ability to connect to multiple terminal devices simultaneously, and the input device includes: A communication interface used for transmitting and receiving radio signals; Memory is used to store computer program instructions; A processor for executing the computer program instructions to support the input device in implementing the method as described in any one of claims 1-8.
13. A communication system, characterized in that, The communication system includes: a first terminal device, a second terminal device, and a first input device; the communication system is used to implement the method as described in any one of claims 1-8.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed by a processing circuit, implement the method as described in any one of claims 9-11.
15. A chip system, characterized in that, The chip system is capable of providing multiple MAC addresses. The chip system includes a processing circuit and a storage medium, and the storage medium stores computer program instructions. When the computer program instructions are executed by the processing circuit, they implement the method as described in any one of claims 9-11.
Citation Information
Patent Citations
Operation method for display device
KR1020110012548A
Automatic multi-host switching for an input device
US20170351471A1