WO2024046315A1 - 一种输入设备的事件处理方法和装置 - Google Patents

一种输入设备的事件处理方法和装置 Download PDF

Info

Publication number
WO2024046315A1
WO2024046315A1 PCT/CN2023/115517 CN2023115517W WO2024046315A1 WO 2024046315 A1 WO2024046315 A1 WO 2024046315A1 CN 2023115517 W CN2023115517 W CN 2023115517W WO 2024046315 A1 WO2024046315 A1 WO 2024046315A1
Authority
WO
WIPO (PCT)
Prior art keywords
event
electronic device
key
operating system
input
Prior art date
Application number
PCT/CN2023/115517
Other languages
English (en)
French (fr)
Inventor
闫金保
Original Assignee
荣耀终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Publication of WO2024046315A1 publication Critical patent/WO2024046315A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication

Definitions

  • the present application relates to the field of communications, and specifically, to a processing method and device for an input device.
  • the present application provides an input device event processing method, device, computer-readable storage medium and computer program product, which can realize automatic conversion of shortcut key events of the input device between different operating systems, thereby realizing shortcut key events. It takes effect across different operating systems, improving operating efficiency and greatly improving the user's operating experience.
  • an event processing method for an input device is provided. The method is applied to a first electronic device, a first operating system is running in the first electronic device, and the first electronic device and the second electronic device are in In the connection state, the second electronic device runs a second operating system, the second operating system is different from the first operating system, and the method includes:
  • a first event of the first input device or the second input device is detected, the first electronic device and the first input device are in a connected state, and the first electronic device and the second input device are in a connected state;
  • event information is generated based on the event type of the first event and a first mapping relationship, where the event information includes a key scan code and the first event type, and the first mapping relationship It includes the corresponding relationship between the key scan code and the first key code, the key scan code is the key scan code corresponding to the first event under the second operating system, and the first key code is the third key code.
  • the key code of an event under the first operating system
  • the event information is sent to the second electronic device, where the event information is used to convert the first event into an event under a second operating system.
  • the above technical solution may be executed by a first electronic device (such as a PC) or a chip in the first electronic device (such as a chip in a PC).
  • a first electronic device such as a PC
  • a chip in the first electronic device such as a chip in a PC.
  • sending the event information to the second electronic device includes:
  • the event information is sent to the second electronic device based on a first transmission format, where the first transmission format is a key event transmission format predefined by the first electronic device and the second electronic device.
  • sending event information through a predetermined transmission format can ensure that the opposite end (ie, the second electronic device) can parse the event information.
  • the first input device is a mouse
  • the first event is an event generated by the user by sliding the scroll wheel of the mouse or clicking a mouse button. Therefore, for the shortcut key event related to the mouse, the first electronic device can convert the shortcut key event related to the mouse and send it to the second electronic device, so that the second electronic device can respond.
  • the second input device is a keyboard
  • the first event is an event generated by the user operating (such as pressing and releasing the keyboard) a key in the keyboard. Therefore, for the shortcut key event related to the keyboard, the first electronic device can convert the shortcut key event related to the keyboard and send it to the second electronic device, so that the second electronic device can respond.
  • the first electronic device can also convert shortcut key events realized through the combination of keyboard and mouse and send them to the second electronic device so that the second electronic device can respond.
  • the method further includes:
  • the focus device is the first electronic device
  • the first event is executed in the first electronic device.
  • the first input device is a mouse; determining the focus device includes:
  • the focal device is the second electronic device
  • the focus device is the first electronic device.
  • the first operating system is a Windows system
  • the second operating system is an Android system. Therefore, embodiments of the present application can convert shortcut key events under the Windows system into shortcut key events under the Android system, so as to realize automatic conversion of shortcut key events of the input device between the Windows operating system and the installed operating system.
  • a method for connecting an input device is applied to a second electronic device, a second operating system is running in the second electronic device, and the second electronic device is connected to the first electronic device. state, the first electronic device runs a first operating system, the second operating system is different from the first operating system, and the method includes:
  • Receive event information from the first electronic device includes a key scan code and a first event type identifier, the key scan code is the key scan code corresponding to the first event under the second operating system, the The first operating system runs on the first electronic device, the first event is an event under the first operating system, and the first event is the first input device or the second input detected by the first electronic device.
  • the interface is called to respond based on the key scan code and the first event type identifier.
  • calling an interface based on the key scan code and the first event type Response including:
  • the key scan code is a key code corresponding to the lock screen event shortcut key
  • the first event type is a key press type
  • the calling system interface compares the key scan code and the first event type.
  • Response processing includes:
  • the screen lock interface is called to lock the screen of the electronic device.
  • calling an interface to respond based on the key scan code and the first event type includes:
  • the event distribution mechanism is used to send the key scan code and the first event type to the application program for response processing.
  • the application program of the second electronic device responds to the shortcut key event.
  • the key scan code includes a shortcut key related to a copy text event, and the first event type is a key press type;
  • an event distribution mechanism to send the key scan code and the first event type to the application program for response processing includes:
  • obtaining the key scan code and the first event type according to the event information includes:
  • the event information is parsed based on a first transmission format to obtain the key scan code and the first event type.
  • the first transmission format is predefined by the first electronic device and the second electronic device. Key event transmission format.
  • the first operating system is a Windows system
  • the second operating system is an Android system. Therefore, embodiments of the present application can convert shortcut key events under the Windows system into shortcut key events under the Android system, so as to realize automatic conversion of shortcut key events of the input device between the Windows operating system and the installed operating system.
  • a communication system in a third aspect, includes a first electronic device and a second electronic device.
  • the communication system further includes a first input device and a second input device.
  • the first electronic device is configured to perform any method in the first aspect.
  • the second electronic device is used to perform any method in the second aspect.
  • the first electronic device runs a first operating system
  • the second electronic device runs a second operating system
  • the second electronic device is connected to the first electronic device
  • the second electronic device The second operating system is different from the first operating system
  • the first operating system is a Windows system
  • the second operating system is an Android system.
  • a fourth aspect provides an event processing device for an input device, including a unit for executing any one of the methods in the first aspect.
  • the device may be a first electronic device (such as a PC device), or a chip in the first electronic device (such as a chip in a PC device).
  • the device includes an input unit, a display unit and a processing unit.
  • the device runs a first operating system.
  • the first operating system is a Windows system.
  • the processing unit may be a processor, the input unit may be a communication interface, and the display unit may be a graphics processing module and a screen; the first electronic device may further include a memory, and the memory may be a For storing the computer program code, when the processor executes the computer program code stored in the memory, the first electronic device is caused to execute the method of any implementation of the first aspect.
  • the processing unit may be a logical processing unit inside the chip
  • the input unit may be an input interface, a pin or a circuit, etc.
  • the display unit may be a graphics processing unit inside the chip.
  • the chip may also include a memory, which may be a memory within the chip (for example, a register, a cache, etc.), or a memory located outside the chip (for example, a read-only memory, a random access memory, etc.);
  • the memory is used to store computer program code.
  • the processor executes the computer program code stored in the memory, the chip is caused to perform any implementation method in the first aspect.
  • an event processing device for an input device including a unit for executing any one of the methods in the second aspect.
  • the device may be a second electronic device (such as a tablet), or a chip in the second electronic device (such as a chip in a tablet).
  • the device includes an input unit, a display unit and a processing unit.
  • a second operating system runs on the device.
  • the second operating system is the Android system.
  • the processing unit may be a processor, the input unit may be a communication interface, and the display unit may be a graphics processing module and a screen; the second electronic device may also include a memory, and the memory may be a For storing the computer program code, when the processor executes the computer program code stored in the memory, the second electronic device is caused to execute the method of any implementation of the second aspect.
  • the processing unit may be a logical processing unit inside the chip
  • the input unit may be an input interface, a pin or a circuit, etc.
  • the display unit may be a graphics processing unit inside the chip.
  • the chip may also include a memory, which may be a memory within the chip (for example, a register, a cache, etc.), or a memory located outside the chip (for example, a read-only memory, a random access memory, etc.);
  • the memory is used to store computer program code.
  • the processor executes the computer program code stored in the memory, the chip is caused to perform any implementation method in the second aspect.
  • a computer-readable storage medium stores computer program code.
  • the computer program code When the computer program code is run by an event processing device of an input device, the device executes the first step. The method of any implementation of the second aspect, or causing the device to perform the method of any implementation of the second aspect.
  • a computer program product includes: computer program code.
  • the computer program code When the computer program code is run by an event processing device of an input device, the device performs any one of the first aspects. A method of implementing the method of the second aspect, or causing the device to perform any method of implementing the method of the second aspect.
  • Figure 1 is an example diagram of an application scenario according to the embodiment of the present application.
  • Figure 2 is a schematic diagram of a hardware system suitable for the electronic device of the present application
  • FIG. 3 is a schematic block diagram of the hardware structure of an input device suitable for this application.
  • Figure 4 is a schematic diagram of a software system suitable for the electronic device of the present application.
  • Figure 5 is a schematic flow chart of an event processing method for an input device according to an embodiment of the present application.
  • Figure 6 is an example diagram of a shortcut key event according to the embodiment of the present application.
  • Figure 7 is another example diagram of a shortcut key event according to an embodiment of the present application.
  • Figure 8 is another shortcut key event example diagram according to the embodiment of the present application.
  • Figure 9 is a schematic block diagram of an event processing device of an input device according to an embodiment of the present application.
  • Figure 10 is another schematic block diagram of an event processing device of an input device according to an embodiment of the present application.
  • the event processing method of the input device can be applied to electronic devices.
  • the electronic device can be a tablet computer, a notebook computer, a wearable device, a multimedia playback device, an e-book reader, a personal computer (PC), a personal digital assistant (PDA), a netbook, or an enhanced display (augmented reality, AR) equipment, virtual reality (VR) equipment, smartphones, smart TVs, smart screen equipment, smart cameras, portable multimedia players (PMP), projection equipment, mixed reality (mixed reality, MR) equipment, televisions or electronic devices such as somatosensory game consoles in human-computer interaction scenarios.
  • This application does not limit the specific form of electronic equipment.
  • Electronic devices can usually be connected to one or more input devices (such as input peripherals) to implement corresponding functions. It can be understood that the input device may be a wireless peripheral or a wired peripheral, and there is no specific limitation on this.
  • a wireless peripheral device refers to an input device that implements input to a terminal device based on a wireless transmission protocol (such as Bluetooth protocol or 2.4G communication protocol, etc.).
  • the input methods supported by the input device may include but are not limited to key input methods (such as mouse, keyboard, etc.), rolling wheel methods (such as mouse, etc.), gesture input methods, body language input methods, and voice input methods. , expression input method, eye movement input method, etc.
  • the embodiments of the present application do not limit the specific communication method between the input device and the electronic device.
  • the Bluetooth peripheral can communicate with the electronic device based on the Bluetooth protocol that supports multi-connection protocol stacks between devices, so that multiple electronic devices can share the input device.
  • a personal computer PC can be connected to a mouse, and the mouse can realize the movement of the cursor on the PC display screen, and further functions such as opening/deleting files.
  • the PC can also be connected to a keyboard, through which functions such as moving the cursor on the PC display, entering characters, opening/deleting files, etc. can be realized.
  • a tablet computer can be connected to a keyboard, and functions such as inputting characters to the tablet computer and opening applications/videos/audio on the tablet computer can be realized through the keyboard.
  • the event processing method for input devices can be applied in multi-device collaboration scenarios across operating systems.
  • the multi-device collaboration scenario across operating systems includes: PC (running the Windows operating system) and tablet (running the Android system), where a communication connection is established between the PC and the tablet.
  • PC running the Windows operating system
  • tablet running the Android system
  • a communication connection is established between the PC and the tablet.
  • the current focus device is a tablet. Due to different operating systems, when the PC's input peripherals are operated using shortcut keys, the tablet cannot recognize the shortcut key events and cannot respond to the shortcut key events, which greatly affects the operation efficiency. Users Not a good experience.
  • the focus device refers to an electronic device that has established a communication connection with the input device and that the input device can currently directly control.
  • the non-focus device refers to an electronic device that has established a communication connection with the input device but that the input device cannot currently directly control. For example, if the input device is a wireless mouse and the wireless mouse is shared by a PC and a tablet, after the wireless mouse is moved to the PC, the focus device is the PC; after the wireless mouse is moved to the tablet, the focus device is the tablet.
  • Figure 1 shows an example diagram of an application scenario of an embodiment of the present application.
  • the PC and tablet establish a wireless communication connection.
  • the mouse can move freely between the PC and tablet.
  • input via the mouse and keyboard is available.
  • the tablet cannot respond to the shortcut key operation.
  • Instantly Shortcut keys cannot function in this scenario, thus affecting the user's operating efficiency.
  • PCs and tablets can be connected via Bluetooth, wireless LAN, infrared, etc.
  • an embodiment of the present application intends to propose an event processing method for an input device, by converting the shortcut key events of the input device from the first operating system to a second operating system that can recognize it.
  • Event information can realize automatic conversion of input device shortcut key events between different operating systems, so that shortcut keys can take effect between different operating systems.
  • FIG. 2 is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application.
  • the first electronic device may adopt the structure shown in FIG. 2 .
  • the second electronic device may adopt the structure shown in FIG. 2 .
  • the electronic device 200 may include a processor 210, memory (including an external memory interface 220 and an internal memory 221), a universal serial bus (USB) interface 230, a charging management module 240, and a power management module. 241, battery 242, antenna 1, antenna 2, communication module 250, audio module 260, speaker 270A, receiver 270B, microphone 270C, headphone interface 270D, sensor module 280, button 290, motor 291, indicator 292, camera 293, display Screen 294 etc.
  • memory including an external memory interface 220 and an internal memory 221
  • USB universal serial bus
  • the structure illustrated in Figure 2 does not constitute a specific limitation on the electronic device.
  • the electronic device may include more or less components than shown in the figures, or some components may be combined, some components may be separated, or some components may be arranged differently.
  • the components illustrated may be implemented in hardware, software, or a combination of software and hardware.
  • Processor 210 may include one or more processing units.
  • the processor 210 may include an application processor (application processor, AP), modem processor, graphics processing unit (GPU), image signal processor (image signal processor, ISP), flight controller, Video codec, digital signal processor (DSP), baseband processor, and/or neural network processing unit (NPU), etc.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • flight controller flight controller
  • Video codec digital signal processor
  • DSP digital signal processor
  • NPU neural network processing unit
  • different processing units can be independent devices or integrated in one or more processors.
  • the processor 210 may also be provided with a memory for storing instructions and data.
  • the memory in processor 210 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 210 . If the processor 210 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 210 is reduced, thus improving the efficiency of the system.
  • the processor 210 may include one or more microcontrollers (micro control units, MCUs), which are responsible for unified scheduling of all other modules/timing/transactions related to input device migration, etc.
  • microcontrollers micro control units, MCUs
  • processor 210 may include one or more interfaces. Interfaces may include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, universal asynchronous receiver and transmitter (universal asynchronous receiver/transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and /or universal serial bus (USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • UART universal asynchronous receiver and transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the charge management module 240 is used to receive charging input from the charger.
  • the power management module 241 is used to connect the battery 242, the charging management module 240 and the processor 210.
  • the power management module 241 receives input from the battery 242 and/or the charge management module 240 and supplies power to the processor 210, internal memory 221, display screen 294, camera 293, communication module 250, etc.
  • the wireless communication function of the electronic device can be through the antenna 1, the antenna 2, the communication module 250, the modem processor and Baseband processor and other implementations.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • Antenna 1 can be reused as a diversity antenna for a wireless LAN.
  • antennas may be used in conjunction with tuning switches.
  • the communication module 250 can provide wireless communication solutions including 2G/3G/4G/5G/6G applied to electronic devices.
  • the communication module 250 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
  • the communication module 250 can receive electromagnetic waves from the antenna 1, perform filtering, amplification and other processing on the received electromagnetic waves, and transmit them to the modem processor for demodulation.
  • the communication module 250 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the communication module 250 may be disposed in the processor 210 .
  • at least part of the functional modules of the communication module 250 and at least part of the modules of the processor 210 may be provided in the same device.
  • the communication module 250 can also provide applications on electronic devices including WLAN (such as Wi-Fi network), Bluetooth (Bluetooth, BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation ( Frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the communication module 250 may be one or more devices integrating at least one communication processing module.
  • the communication module 250 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 210 .
  • the communication module 250 can also receive the signal to be sent from the processor 210, frequency modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • communication module 250 may include a Bluetooth module.
  • the Bluetooth module can be used to send Bluetooth messages and realize interaction with multiple input devices based on Bluetooth connections.
  • a 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.
  • the application processor outputs sound signals through audio devices (not limited to speaker 270A, receiver 270B, etc.), or displays images or videos through display screen 294.
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 210 and may be provided in the same device as the communication module 250 or other functional modules.
  • the electronic device can communicate with other terminal devices based on the communication module 250, antenna 1 and/or antenna 2, for example, send control instructions to other electronic devices.
  • the antenna 1 of the electronic device is coupled to the communication module 250, and the antenna 2 is coupled to the communication module 250, so that the electronic device can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (long term evolution, LTE), new radio (new radio, NR ), BT, GNSS, WLAN, NFC, FM, and/or IR technology, etc.
  • the GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (satellite based augmentation systems, SBAS), etc.
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the electronic device implements display functions through the GPU, display screen 294, and application processor.
  • the GPU is an image processing microprocessor and is connected to the display screen 294 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 210 may include one or more GPUs that execute program instructions to generate or alter display information.
  • the display screen 294 is used to display images, videos, etc.
  • Display 294 includes a display panel.
  • the display panel can use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • AMOLED organic light-emitting diode
  • FLED flexible light-emitting diode
  • Miniled MicroLed, Micro-oLed, quantum dot light emitting diode (QLED), etc.
  • the electronic device can perform interface rendering through the GPU, interface display through the display screen 294, etc.
  • the interface displayed on the display screen 294 may include a cursor and characters input by an input device.
  • the electronic device can realize the shooting function through ISP, camera 293, video codec, GPU, display screen 294 and application processor.
  • the external memory interface 220 can be used to connect an external memory card, such as a micro (micro) storage card (SD) card, to expand the storage capacity of the electronic device.
  • the external memory card communicates with the processor 210 through the external memory interface 220 to implement the data storage function. Such as saving music, videos, etc. files in external memory card.
  • Internal memory 221 may be used to store executable program code for computer programs.
  • computer programs may include operating system programs and application programs.
  • the operating system may include but is not limited to Symbian system, Android system, Microsoft (Windows) system, Apple iOS system, Blackberry system and other operating systems.
  • the executable program code includes instructions.
  • the internal memory 221 may include a program storage area and a data storage area.
  • the stored program area can store the operating system, at least one application program required for the function, etc.
  • the storage data area can store data created during the use of the electronic device (such as application data, user data, etc.).
  • the internal memory 221 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.
  • the processor 210 executes various functional applications and data processing of the electronic device by executing instructions stored in the internal memory 221 and/or instructions stored in a memory provided in the processor.
  • the sensor module 280 can sense user operations, such as touch operations, click operations, sliding operations, user proximity to the screen, etc.
  • the electronic device can implement audio functions through the audio module 260, the speaker 270A, the receiver 270B, the microphone 270C, and the application processor. Such as music playback, recording, etc.
  • audio module 260, the speaker 270A, the receiver 270B and the microphone 270C please refer to the introduction in the conventional technology.
  • the buttons 290 include a power button, a volume button, etc.
  • Key 290 may be a mechanical key. It can also be a touch button.
  • the electronic device can receive key input and generate key signal input related to user settings and function control of the electronic device.
  • input devices may include, but are not limited to, wireless mice, wireless keyboards, wireless trackballs, wireless touch pads, wireless stylus, wireless pens, smart wearable devices (such as smart watches, smart bracelets, smart glasses, (phones, watches, etc.), wireless headsets, game peripherals, etc., or any other device that can provide input to electronic devices, this application is not limited.
  • Figure 3 is a structural block diagram of an input device provided by an embodiment of the present application.
  • input device 300 may include: Bus 305, input module 310, control circuit 320, power supply 330, memory component 340, communication module 350 and power management module 360.
  • the power supply 330 is used to power the input device 300 .
  • Power management module 360 may route power directly from power supply 330 to other components of input device 300 .
  • Power management module 360 may also distribute power from power supply 330 to other system components (eg, control circuitry 320, communication module 350, and input module 310, or any combination thereof).
  • control circuit 320 may communicate with each other via bus 305 .
  • Input module 310 may be independently connected to control circuitry 320 and power management module 360.
  • input module 310 may be connected to other modules via bus 305 .
  • input module 310 may be configured to receive input from multiple key input elements or devices.
  • the input module 310 is operable to receive input in response to a user pressing a component including: a key (e.g., a letter key, a function key (e.g., a volume key, an escape key, a mute key, a shift key)). etc.), numeric keys or numeric keyboard keys, operating system selection keys, right mouse button, left mouse button, etc.), or other appropriate input elements or devices such as media control buttons, voice over internet phone (VOIP) buttons , touch sensors (such as touch pads, touch pins), etc.
  • a key e.g., a letter key, a function key (e.g., a volume key, an escape key, a mute key, a shift key)
  • numeric keys or numeric keyboard keys e.g., a volume key, an escape key, a mute key, a shift key
  • operating system selection keys e.g., right mouse button,
  • the input module 310 can generate character data associated with the pressed key input element and send the character data to the control circuit 320 .
  • the input module 310 may include keyboard keys; if the input device is a wireless mouse, the input module 310 may include a mouse sensor and a cursor module, where the cursor module is responsible for mouse cursor movement and input.
  • the key code sent by the input device 300 to the electronic device depends on the operating system running on the electronic device.
  • the behavior of input device 300 depends on the operating system. Different key codes corresponding to multiple key input elements may be operating system specific. For example, selecting the "Home" key on different operating systems results in different functionality (e.g. the home screen in iOS, but the browser's home page in Windows).
  • control circuit 320 may include one or more micro-processors, and control circuit 320 may be configured to control the operation of input device 300 .
  • the control circuit 320 may be used to coordinate and schedule all other modules/sequences/transactions in a unified manner, manage input device configuration information, manage input device migration, etc.
  • control circuitry 320 may include one or more MCUs, digital signal processors (DSPs) supporting hardware/firmware (e.g., memory, programmable input/output (I/O), etc.) , field-programmable gate array (FPGA), programmable logic device (PLD), etc.
  • DSPs digital signal processors
  • FPGA field-programmable gate array
  • PLD programmable logic device
  • Memory component 340 may be configured to store data.
  • the data may include connection data and pairing data including, for example, the address of the selected electronic device.
  • memory component 340 may be non-volatile memory.
  • Communication module 350 may be configured to provide I/O capabilities to input device 300 .
  • the communication module 350 may route data from the input module 310 to the terminal device and route data from the terminal device to the input module 310 via a wireless connection.
  • the wireless connection may be a Bluetooth connection or a communication connection based on any other wireless standard or dedicated wireless network protocol.
  • the communication module 350 may include a Bluetooth module.
  • the Bluetooth module can be used to send Bluetooth messages and realize Bluetooth connection interaction with electronic devices.
  • the structure included in the input device 300 shown in FIG. 3 is only an exemplary description and does not limit the specific structure of the input device 300 .
  • FIG. 4 is an example diagram of the software architecture for collaborative connection of multiple devices.
  • a communication connection is established between a first electronic device (which may also be referred to as collaborative device 1 ) and a second electronic device (which may also be referred to as collaborative device 2 ).
  • First electronic equipment procurement Use the first operating system.
  • the second electronic device uses a second operating system.
  • the first operating system is different from the second operating system.
  • the first electronic device uses the Windows system
  • the second electronic device uses the Android system.
  • the software architecture of the first electronic device is divided from top to bottom: business layer (or application layer), capability layer (or architecture layer) and driver layer.
  • the business layer includes the following modules: application, setting management (mainly used for setting management of the first operating system), device discovery, status management (for example, used for managing the status of the first electronic device), display management ( For example, used to manage the screen display content of the first electronic device).
  • a new conversion module also called an event listening conversion module
  • the conversion module is used to listen for input events from input devices.
  • the conversion module is also used to identify the focus device.
  • the conversion module is also configured to convert the input event of the input device into event information of the second electronic device based on the first mapping relationship, and send the event information to the data receiving module of the second electronic device.
  • modules included in the business layer of the first electronic device shown in FIG. 4 are only exemplary descriptions, and the embodiments of the present application are not limited thereto.
  • the service layer of the first electronic device may include more or fewer modules than those shown in FIG. 4 .
  • the capability layer includes the following modules: socket, TCP/IP, and input modules.
  • the socket module is the basic operating unit that supports channel communication of the TCP/IP protocol.
  • the driver layer can include various types of driver modules.
  • the driver layer in Figure 4 includes Bluetooth driver, WiFi driver, HID driver, etc. It can be understood that the driving layer of the first electronic device in FIG. 4 may include more or less modules than the modules shown in FIG. 4 , which is not specifically limited.
  • the software architecture of the second electronic device is divided from top to bottom: a business layer (or application layer), a capability layer (or architecture layer), and a driver layer.
  • the business layer includes the following modules: application, setting management (for example, used to implement setting management of the second operating system), device discovery (for example, used to implement device discovery management of the second operating system), status Management (for example, used to manage the status of the second electronic device), display management (for example, used to manage the screen display content of the second electronic device).
  • application setting management (for example, used to implement setting management of the second operating system)
  • device discovery for example, used to implement device discovery management of the second operating system
  • status Management for example, used to manage the status of the second electronic device
  • display management for example, used to manage the screen display content of the second electronic device.
  • a new data receiving module is added to the business layer.
  • the data receiving module is configured to receive event information sent by the conversion module of the first electronic device.
  • the data receiving module is also used to parse event information and inject the parsed key codes and event types into the input driver.
  • modules included in the business layer of the second electronic device shown in Figure 4 are only exemplary descriptions, and the embodiments of the present application are not limited thereto.
  • the service layer of the second electronic device may include more or fewer modules than those shown in FIG. 4 .
  • the capability layer includes the following modules: input module, socket module, and TCP/IP.
  • the business layer modifies the input module.
  • the input module is used to call the corresponding shortcut function interface or distribute it to the application for the event information (including key code and event type) injected by the input driver.
  • the driver layer can include various types of driver modules.
  • the driver layer in Figure 4 includes input driver, Bluetooth driver, WiFi driver, HID driver, etc. After obtaining the key code and event type injected by the data receiving module, the input driver reports the key code and event type to the input module.
  • the driving layer of the second electronic device in FIG. 4 may include more or less modules than the modules shown in FIG. 4 , which is not specifically limited.
  • the structure illustrated in FIG. 4 does not constitute a specific limitation on the first electronic device or the second electronic device.
  • the first electronic device or the second electronic device may include more or less components than shown in the figures, or combine some components, or split some components, or arrange different components.
  • the components shown in the figure may be in the form of hardware, software software or a combination of software and hardware.
  • FIG. 5 is a schematic flowchart of an event processing method 500 for an input device according to an embodiment of the present application. It can be understood that the method in Figure 5 can be applied to the scenario shown in Figure 1 .
  • the first electronic device in Figure 5 is the PC in Figure 1
  • the second electronic device is the tablet in Figure 1 .
  • the method 500 includes:
  • Step 501 The first electronic device detects a first event of the first input device or the second input device.
  • the first event is an event under the first operating system.
  • the first electronic device and The first input device is in a connected state, and the first electronic device and the second input device are in a connected state.
  • the first event is used to generally refer to an input event of the input device monitored by the first electronic device under the first operating system.
  • Input events include shortcut key events.
  • Shortcut key events refer to events triggered by pressing the shortcut keys of the input device. For example, pressing the Windows+L shortcut key can trigger a lock screen event.
  • the first event may be an event triggered by the first input device and the second input device together, such as an operation of a keyboard key plus a mouse wheel; it may also be an event triggered by the first input device or the second input device alone, For example, slide the mouse wheel event.
  • the first input device is a wireless mouse
  • the second input device is a keyboard
  • the first electronic device is connected with a wireless mouse and keyboard.
  • the first electronic device and the second electronic device are electronic devices with different operating systems.
  • the first electronic device establishes a communication connection with the second electronic device.
  • the first electronic device is a PC and uses the Windows system
  • the second electronic device is a tablet computer and uses the Android system.
  • the embodiment of the present application does not specifically limit the communication connection method between the first electronic device and the second electronic device.
  • the first electronic device and the second electronic device are connected through Bluetooth.
  • the first electronic device detects an event of the first input device or the second input device, such as the first event, when listening for input events of various external devices (such as a keyboard or a mouse, etc.).
  • the first event can be understood as an event under the first operating system.
  • embodiments of the present application need to convert the first event into an event under the second operating system.
  • Step 502 The first electronic device determines the current focus device of the first input device.
  • step 503-2 is executed; if it is determined that the focus device is the second electronic device, step 503-1 is executed.
  • the embodiment of the present application does not specifically limit the method of determining the focus device.
  • determining the current focus device of the first input device includes:
  • the focus device is the second electronic device
  • the focus device is the first electronic device.
  • the focus device is determined to be the second electronic device.
  • Two electrons device when it is detected that the cursor of the wireless mouse does not exceed the right edge of the display screen of the first electronic device, the focus device is determined to be the first electronic device.
  • the first device detects that the wireless mouse slides out of the edge of the display screen of the first electronic device, and the movement coordinates of the wireless mouse sliding toward the second electronic device exceeds a preset threshold, it determines that the focus device is the second electronic device.
  • the above method of determining the focus device is only an exemplary description, and is not intended to limit the embodiments of the present application to the above examples. In fact, those skilled in the art can use other methods to determine the focus device. For example, the screen cursor edge detection algorithm is used for detection.
  • Step 503-1 When the focus device is the second electronic device, the first electronic device generates event information based on the event type of the first event and the first mapping relationship, where the event information includes the key scan code and the first event type, so The first mapping relationship includes the corresponding relationship between the first key scan code and the first key code.
  • the key scan code is the key code corresponding to the first event under the second operating system.
  • the first The key code is the key code of the first event under the first operating system.
  • the first event type identifier is used to identify the event type of the first event.
  • the first mapping relationship may include the corresponding relationship between the key codes of the first event under different operating systems.
  • Table 1 below is the mapping relationship between the key codes of the lock screen event in the Windows system and the key scan codes of the lock screen event in the Android system.
  • the key codes under the Windows system are 0x5B and 0x4C, and the corresponding key scan codes under the Android system are 125 and 38.
  • the keys corresponding to the 26 English letters have corresponding key scan codes under the Android system.
  • the key scan code for the letter A under the Android system is 30; the key scan code for the letter B under the Android system is 48; the key scan code for the letter C under the Android system is 46; ...; the key scan code for the letter X under the Android system is The key scan code is 45; the key scan code for the letter Y under the Android system is 21; the key scan code for the letter Z under the Android system is 44.
  • the key scan codes of some letters under the Android system are given here as examples.
  • the above-mentioned keys with 26 English letters also have corresponding key codes under the Windows system.
  • the keys of 26 English letters can be converted into hexadecimal representation, that is, the key codes of the 26 English letters under Windows system can be obtained.
  • the key code mapping relationship of the 26 English letters includes: the key code of the letter under the Windows system and the key scan code corresponding to the letter under the Android system.
  • Table 2 shows the key codes corresponding to some keys in the keyboard under the Windows system and the mapping table of the corresponding key scan codes under the Android system.
  • Table 2 is only an example of describing some keys in the keyboard, and the embodiments of the present application are not limited thereto. In fact, for other keys, there is also a mapping relationship between the key codes under the Windows system and the key scan codes under the Android system, so I will not list them one by one here.
  • mapping relationship between key codes and key scan codes is only an exemplary description, and those skilled in the art can add a new key code mapping relationship according to needs or in accordance with the specifications of different operating systems.
  • the first electronic device may maintain mapping relationships of input devices (such as keyboards, mice and other peripherals) under different operations.
  • input devices such as keyboards, mice and other peripherals
  • the first electronic device monitors the event triggered by the input device, it can query the mapping relationship to obtain the key scan code of the event under the Android system.
  • the first electronic device can encapsulate the key scan code and the event type into data (such as event information) and transmit it to the second electronic device.
  • the event type can be identified by an event ID.
  • the event ID and key scan code can be encapsulated and sent to the second electronic device.
  • Table 3 shows some event types and corresponding event IDs.
  • keyboard Down is an event in which the user presses the keyboard and does not let go.
  • the keyboard Down event can be identified by GENERIC_INPUT_TYPE_KEY_DOWN.
  • Keyboard Up is an event in which the user presses the keyboard and then releases it.
  • the keyboard Up event can be identified by GENERIC_INPUT_TYPE_KEY_UP.
  • the wheel vertical movement event is an event in which the user slides the mouse wheel to move vertically.
  • the wheel vertical movement event can be identified by GENERIC_INPUT_TYPE_VERTICAL_WHEEL.
  • the wheel horizontal movement event is an event in which the user slides the mouse wheel to move horizontally.
  • the wheel horizontal movement event can be identified by GENERIC_INPUT_TYPE_HORIZONTAL_WHEEL.
  • the lock screen event is implemented through two lock screen shortcut keys, such as the Windows key and the L key combination.
  • the first electronic device queries the key scan code (125) corresponding to the Windows key under the Android system through the first mapping relationship, and then sends the keyboard Down event and the key key corresponding to the Windows key under the Android system.
  • the scan code (125) is sent to the second electronic device; then, when the user presses the L key, "the key scan code (38) corresponding to the L key under the Android system" and the "key key of the L key” are sent to the second electronic device.
  • step 503-2 when the focus device is the first electronic device, execute the first event in the first electronic device.
  • the first event may be processed in the first electronic device.
  • processing the first event in the first electronic device includes: using an original event process in the first electronic device to respond to the first event.
  • the first event is distributed to other windows (or windows) of the first electronic device for processing.
  • Step 504 The first electronic device sends event information to the second electronic device, where the event information is used by the second electronic device to generate events under the second operating system.
  • the second electronic device receives the event information from the first electronic device.
  • the embodiment of the present application does not specifically limit the transmission format used when the first electronic device sends event information to the second electronic device.
  • the first electronic device sends the event information to the second electronic device based on a first transmission format (such as the format shown in Table 3), and the first transmission format is the first transmission format of the first electronic device.
  • a first transmission format such as the format shown in Table 3
  • a key event transmission format predefined with the second electronic device.
  • the first transmission format is a transmission format agreed in advance between the first electronic device and the second electronic device. After receiving the event information sent in the first transmission format, the second electronic device can analyze it according to the first transmission format. Therefore, sending event information through a predetermined transmission format can ensure that the opposite end (ie, the second electronic device) can parse the event information.
  • first transmission format is used to generally refer to the transmission format in which the first electronic device sends event information to the second electronic device, and the embodiment of the present application does not specifically limit its naming.
  • first transmission format may also be called “key event transmission format” and so on.
  • key event transmission format For example, an example of key event transmission format is shown in Table 4:
  • the number of bytes corresponding to each field is shown in Table 4 above. Based on the transmission format shown in Table 4 above, the key code and time type can be encapsulated to obtain event information.
  • Step 505 The second electronic device obtains the key scan code and the first event type (which can be identified by an event ID) according to the event information.
  • the second electronic device parses the event information based on the first transmission format to obtain the button Scan code and the first event type (e.g., get event ID).
  • the second electronic device may directly inject the parsed key scan code and the first event type into the input driver, or may perform mapping based on the parsed key scan code and the first event type, and map the mapped event Type injection into the input driver.
  • the second electronic device after the second electronic device (or the data receiving module of the second electronic device) obtains the event type through parsing, it can further map the parsed event type, for example, the first event The type is mapped to the second event type so that the event type is more in line with the usage specifications or standards under the second operating system and avoids being unable to respond to the first event type when the second operating system cannot support the first event type. This is helpful.
  • the second electronic device injects the mapped second event type into the input driver.
  • the second electronic device parses the shortcut key events including: pressing "Windows + left arrow key (ie, left arrow key)".
  • Windows + left arrow key under the Windows system means “maximize the window to the left side of the screen.” Event”, but there is no corresponding event type under the Android system, then the second electronic device maps this event to "Windows + left arrow key” to a “return” event, and injects the "return” event into the input driver.
  • Step 506 The second electronic device responds by calling an interface based on the key scan code and the first event type (identified by the first event type ID).
  • step 506 includes: 506-1, the data receiving module of the second electronic device injects the key scan code and the first event type into the input driver; 506-2, the input driver injects the key scan code and the first event type into the input driver.
  • the type is reported to the input module; in step 506-3, the input module calls the interface to respond according to the key scan code and the first event type.
  • the input module can convert the key scan code into a key code under the Android system.
  • the input module in the second electronic device calls the corresponding functional interface according to the key scan code and the first event type, or distributes the shortcut event to the application. This will be described later with examples.
  • the first electronic device determines that the focus device is the second electronic device after listening to the shortcut key event of the input device (such as the first event)
  • the first electronic device changes the shortcut key event of the input device to
  • the key event is converted from the first operating system into event information that can be recognized by the second operating system, and the event information is sent to the second electronic device, so that the second electronic device responds to the event information, and the shortcut key event of the input device can be realized.
  • Automatic conversion between different operating systems, so that shortcut keys can take effect between different operating systems, improving operating efficiency efficiency, greatly improving the user's operating experience.
  • calling an interface to respond based on the key scan code and the first event type includes: calling a system interface to perform response processing on the key scan code and the first event type.
  • the key scan code is a key code corresponding to the lock screen event shortcut key
  • the first event type is a key press type
  • the calling system interface compares the key scan code and the first event type.
  • Response processing includes:
  • the screen lock interface is called to lock the screen of the electronic device.
  • the system interface can be called here to map the mapped key code (such as the third key code) and the mapped event type. (such as the second event type) for response processing.
  • the first electronic device is a PC
  • the second electronic device is a tablet
  • the PC and the tablet share a mouse.
  • the PC and the tablet are in a connected state.
  • the mouse cursor is in the tablet, that is, the current focus device is the tablet.
  • Users can trigger the lock screen event by pressing the lock screen shortcut keys (including the Windows key and L key).
  • the lock screen shortcut keys including the Windows key and L key
  • the PC detects the lock screen event, it converts the lock screen event into the key code and event type of the tablet.
  • the tablet calls the system interface to lock the screen, that is, the tablet turns off the screen.
  • the tablet responded to the lock screen shortcut key event.
  • responding to the interface based on the key scan code and the first event type includes: using an event distribution mechanism to send the key scan code and the first event type to the application for response processing. .
  • the key scan code includes the key code of the shortcut key related to the copy text event (such as the ctrl key in the copy shortcut key), and the first event type is a pressed key type (such as pressing the ctrl key);
  • Utilizing an event distribution mechanism to send the key scan code and the first event type to an application program for response processing includes: sending the key scan code and the first event type to the first application program for response processing, so The first application program supports the copy text event, and the first application program is an application program running on the electronic device.
  • the event distribution mechanism can be used to perform response processing on the mapped key scan code and the mapped event type.
  • the first electronic device is a PC
  • the second electronic device is a tablet
  • the PC and the tablet share a mouse.
  • the PC and the tablet are in a connected state.
  • the mouse cursor is in the tablet, that is, the current focus device is the tablet.
  • Users can trigger the select all text event by pressing the select all text shortcut keys (including the ctrl key and the A key).
  • the PC detects the selected text event, it converts the selected text event into the key code and event type under the tablet.
  • the tablet distributes the select-all text event to the application.
  • FIG. 6 and FIG. 7 are about keyboard shortcut key operations, and the embodiments of the present application are not limited thereto. In fact, users can also implement certain shortcut key events through the keyboard and mouse.
  • FIG. 8 shows an example of amplifying text by using the keyboard and mouse together.
  • the first electronic device is a PC
  • the second electronic device is a tablet
  • the PC and the tablet share a mouse, as shown in Figure 8.
  • the PC and the tablet are in a connected state.
  • the mouse cursor is in the tablet, that is, the current focus device is the tablet.
  • the user can trigger the enlarge text event by pressing the amplify text shortcut keys (including the ctrl key and sliding the mouse wheel up).
  • the PC detects the amplified text event, it converts the amplified text event into the key code and event type under the tablet.
  • the tablet distributes the enlarged text event to the application.
  • the tablet is currently running a text-based application, then call the interface of the text-based application to implement a text amplification event, such as amplifying the text "Honor New Product Release" being displayed on the tablet.
  • a text amplification event such as amplifying the text "Honor New Product Release" being displayed on the tablet.
  • the tablet responded to the amplify text event shortcut key event.
  • FIGS. 6 to 8 only the PC is the first electronic device and the tablet is the second electronic device for description.
  • the embodiments of the present application are not limited thereto.
  • the event processing method of the input device provided by the embodiment of the present application is described in detail above with reference to FIGS. 1 to 8 .
  • the device embodiment of the present application will be described in detail below with reference to Figures 9 and 10. It should be understood that the event processing device of the input device in the embodiment of the present application can perform the event processing methods of various input devices in the embodiments of the present application, that is, the specific working processes of the following various products can be referred to in the foregoing method embodiments. corresponding process.
  • FIG. 9 is a schematic block diagram of an event processing device 900 of an input device according to an embodiment of the present application. It should be understood that the apparatus 900 can perform the method performed by the first electronic device in the event processing of the input device shown in FIGS. 5 to 8 .
  • the event processing device 900 of the input device includes: a listening unit 910 , a determining unit 920 , a conversion unit 930 and a communication unit 940 .
  • the device 900 may be a first electronic device, such as a PC device.
  • the first electronic device runs a first operating system
  • the first electronic device and the second electronic device are in a connected state
  • the second electronic device runs a second operating system
  • the second operating system is connected to the second electronic device.
  • the first operating system is different.
  • the listening unit 910 is configured to detect a first event of the first input device or the second input device, the first electronic device and the first input device are in a connected state, and the first electronic device and the second input device are in a connected state.
  • the second input device is connected;
  • the determining unit 920 is used to determine the current focus device of the first input device
  • the conversion unit 930 is configured to generate event information based on the event type of the first event and the first mapping relationship when the focus device is the second electronic device, where the event information includes a key scan code and the first event type.
  • the first mapping relationship includes the corresponding relationship between the key scan code and the first key code
  • the key scan code is the key scan code corresponding to the first event under the second operating system
  • the third A key code is the key code of the first event under the first operating system
  • the communication unit 940 is used to send the event information to the second electronic device, and the event information is used to convert the first event into an event under the second operating system.
  • the communication unit 940 is configured to send the event information to the second electronic device, specifically including:
  • the event information is sent to the second electronic device based on a first transmission format, where the first transmission format is a key event transmission format predefined by the first electronic device and the second electronic device.
  • the first input device is a mouse
  • the first event is an event generated by the user by sliding the scroll wheel of the mouse or clicking a mouse button.
  • the second input device is a keyboard
  • the first event is an event generated by a user pressing a key in the keyboard.
  • the device 900 further includes:
  • a processing unit (not shown in FIG. 9 ), the processing unit is configured to execute the first event in the first electronic device when the focus device is the first electronic device.
  • the first input device is a mouse; the determining unit 920 is used to determine the focus device, specifically including:
  • the focus device is the second electronic device
  • the focus device is the first electronic device.
  • the first operating system is a Windows system
  • the second operating system is an Android system.
  • the listening unit 910, the determining unit 920, the converting unit 930 and the communication unit 940 may be implemented by a processor or a processing unit. It should be understood that the above device 900 is embodied in the form of a functional unit.
  • the term "unit" here can be implemented in the form of software and/or hardware, which is not specifically limited in the embodiments of this application.
  • a "unit” may be a software program, a hardware circuit, or a combination of both that implements the above functions.
  • the hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor that executes one or more software or firmware programs (such as a shared processor, a dedicated processor or a group processor, etc.) and memory, integrated logic circuits, and/or other suitable devices that can provide the above functions.
  • ASIC application specific integrated circuit
  • the device 900 can take the form shown in FIG. 2 .
  • Figure 10 is a schematic block diagram of an event processing device 1000 of an input device according to an embodiment of the present application. It should be understood that the apparatus 1000 can perform the method performed by the second electronic device in the event processing of the input device shown in FIGS. 5 to 8 .
  • the event processing device 1000 of the input device includes: a receiving unit 1010 and a processing unit 1020 .
  • the device 1000 may be a second electronic device, such as a tablet.
  • the second electronic device runs a second operating system, the second electronic device is connected to the first electronic device, the first electronic device runs the first operating system, and the second operating system is connected to the first electronic device.
  • the first operating system is different.
  • the receiving unit 1010 is configured to receive event information from the first electronic device.
  • the event information includes a key scan code and a first event type identifier.
  • the key scan code is the first event in the first event.
  • Corresponding key scan codes under two operating systems the first electronic device runs a first operating system, the first event is an event under the first operating system, and the first event is an event under the first electronic device. An event input by the first input device or the second input device detected by the device;
  • the processing unit 1020 is configured to obtain the key scan code and the first event type identifier according to the event information
  • the processing unit 1020 is further configured to respond based on the key scan code and the first event type identification calling interface.
  • the processing unit 1020 is configured to scan the key based on the key scan code and the first The event type calls the interface to respond, including:
  • the key scan code is the key code corresponding to the lock screen event shortcut key
  • the first event type is a key press type
  • the calling system interface compares the key scan code and the key code.
  • Response processing for the above first event type includes:
  • the screen lock interface is called to lock the screen of the electronic device.
  • the processing unit 1020 is configured to respond based on the key scan code and the first event type calling interface, including:
  • the event distribution mechanism is used to send the key scan code and the first event type to the application program for response processing.
  • the key scan code includes a shortcut key related to a copy text event, and the first event type is a key press type;
  • an event distribution mechanism to send the key scan code and the first event type to the application program for response processing includes:
  • the processing unit 1020 is configured to obtain the key scan code and the first event type according to the event information, including:
  • the event information is parsed based on a first transmission format to obtain the key scan code and the first event type.
  • the first transmission format is predefined by the first electronic device and the second electronic device. Key event transmission format.
  • the first operating system is a Windows system
  • the second operating system is an Android system.
  • the receiving unit 1010 may be implemented through a wireless communication module.
  • the processing unit 1020 may be implemented by a processor or processing unit. It should be understood that the above-mentioned device 1000 is embodied in the form of a functional unit.
  • the term "unit" here can be implemented in the form of software and/or hardware, which is not specifically limited in the embodiments of this application.
  • a "unit” may be a software program, a hardware circuit, or a combination of both that implements the above functions.
  • the hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor that executes one or more software or firmware programs (such as a shared processor, a dedicated processor or a group processor, etc.) and memory, integrated logic circuits, and/or other suitable devices that can provide the above functions.
  • ASIC application specific integrated circuit
  • the device 1000 can take the form shown in FIG. 2 .
  • the application also provides a communication system, including a first electronic device, a second electronic device, and a plurality of input devices.
  • This application also provides a computer program product, which, when executed by a processor, implements the method described in any method embodiment in this application.
  • the computer program product can be stored in the memory and finally converted into an executable object file that can be executed by the processor after preprocessing, compilation, assembly and linking.
  • This application also provides a computer-readable storage medium on which a computer program is stored.
  • a computer program When the computer program is executed by a computer, the method described in any method embodiment of this application is implemented.
  • the computer program may be a high-level language program or an executable object program.
  • the computer-readable storage medium may be volatile memory or non-volatile memory, or may include both volatile memory and non-volatile memory.
  • non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically removable memory. Erase electrically programmable read-only memory (EPROM, EEPROM) or flash memory.
  • Volatile memory can be random access memory (RAM), which is used as an external cache.
  • RAM static random access memory
  • DRAM dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • double data rate SDRAM double data rate SDRAM
  • DDR SDRAM double data rate SDRAM
  • ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous link dynamic random access memory
  • direct rambus RAM direct rambus RAM
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit.
  • the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory ROM, random access memory RAM, magnetic disk or optical disk, etc.
  • the size of the sequence numbers of each process does not mean the order of execution.
  • the execution order of each process should be determined by its functions and internal logic, and should not be used in the embodiments of the present application.
  • the implementation process constitutes any limitation.
  • system and “network” are often used interchangeably herein.
  • the term “and/or” in this article is just an association relationship describing related objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A alone exists, A and B exist simultaneously, alone There are three situations B.
  • the character "/" in this article generally indicates that the related objects are an "or” relationship.
  • A/B can mean A or B.
  • the above is an example of three elements A, B and C to illustrate the optional items of the project.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

一种输入设备的事件处理方法和装置,应用于电子技术领域。该方法包括:第一电子设备检测到输入设备的第一事件;确定焦点设备;在焦点设备是第二电子设备时,基于第一事件的事件类型以及第一映射关系生成事件信息,事件信息包括按键扫描码和第一事件类型,所述第一映射关系包括所述按键扫描码和第一按键码的对应关系;向第二电子设备发送事件信息,事件信息用于将第一事件转换为第二操作系统下的事件,以便第二电子设备对事件信息作出响应,能够实现输入设备的快捷键事件在不同操作系统间的自动转换,从而实现快捷键在不同操作系统间生效,提升了操作效率,极大提高用户的操作体验。

Description

一种输入设备的事件处理方法和装置
本申请要求于2022年09月02日提交国家知识产权局、申请号为202211071830.4、申请名称为“一种输入设备的事件处理方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,并且具体地,涉及一种输入设备的处理方法和装置。
背景技术
随着电子设备的高速发展,跨操作系统的多设备协同场景越来越多的出现在人们的生活中。在跨操作系统的多设备协同场景中,存在不同的设备共用外设(比如鼠标、键盘等)的场景。由于不同的操作系统存在差异,当在一个设备的外设上使用快捷键操作时,在不同的操作系统的设备上存在无法识别和无法响应的问题,严重影响用户的操作效率。
发明内容
有鉴于此,本申请提供了一种输入设备的事件处理方法、装置、计算机可读存储介质和计算机程序产品,能够实现输入设备的快捷键事件在不同操作系统间的自动转换,从而实现快捷键在不同操作系统间生效,提升了操作效率,极大提高用户的操作体验。
第一方面,提供了一种输入设备的事件处理方法,所述方法应用于第一电子设备,所述第一电子设备中运行第一操作系统,所述第一电子设备与第二电子设备处于连接状态,所述第二电子设备中运行第二操作系统,所述第二操作系统与所述第一操作系统不同,所述方法包括:
检测到所述第一输入设备或所述第二输入设备的第一事件,所述第一电子设备与第一输入设备处于连接状态,所述第一电子设备与第二输入设备处于连接状态;
确定所述第一输入设备当前的焦点设备;
在焦点设备是所述第二电子设备时,基于所述第一事件的事件类型以及第一映射关系生成事件信息,所述事件信息包括按键扫描码和第一事件类型,所述第一映射关系包括所述按键扫描码和第一按键码的对应关系,所述按键扫描码是所述第一事件在所述第二操作系统下对应的按键扫描码,所述第一按键码是所述第一事件在第一操作系统下的按键码;
向所述第二电子设备发送所述事件信息,所述事件信息用于将所述第一事件转换为第二操作系统下的事件。
上述技术方案可以由第一电子设备(比如PC)或第一电子设备中的芯片(比如PC中的芯片)执行。基于上述方案,第一电子设备在监听到输入设备的快捷键事件(比如第一事件)后,如果判断出焦点设备为第二电子设备,那么第一电子设备通过将输入设备的快捷键事件从第一操作系统转换为第二操作系统可以识别的事件信息,并将事件信息发送给第二电子设备,以便第二电子设备对事件信息作出响应,能够实现输入设备的 快捷键事件在不同操作系统间的自动转换,从而实现快捷键在不同操作系统间生效,提升了操作效率,极大提高用户的操作体验。
在一些可能的实现方式中,向所述第二电子设备发送所述事件信息,包括:
基于第一传输格式将所述事件信息发送给所述第二电子设备,所述第一传输格式是所述第一电子设备与所述第二电子设备预先定义的按键事件传输格式。
因此,通过预定的传输格式进行事件信息的发送,能够保证对端(即第二电子设备)可以解析出该事件信息。
在一些可能的实现方式中,所述第一输入设备是鼠标;所述第一事件是用户通过滑动所述鼠标的滚轮或点击鼠标按键生成的事件。因此,对于与鼠标相关的快捷键事件,第一电子设备可以将与鼠标相关的快捷键事件进行转换,发送到第二电子设备,以便第二电子设备作出响应。
在一些可能的实现方式中,所述第二输入设备是键盘;所述第一事件是用户通过操作(比如按下和松开键盘)所述键盘中的按键生成的事件。因此,对于与键盘相关的快捷键事件,第一电子设备可以将与键盘相关的快捷键事件进行转换,发送到第二电子设备,以便第二电子设备作出响应。
可以理解,对于通过键盘和鼠标组合实现的快捷键事件,第一电子设备也可以将其进行转换,发送到第二电子设备,以便第二电子设备作出响应。
在一些可能的实现方式中,所述方法还包括:
在焦点设备是所述第一电子设备时,在所述第一电子设备中执行所述第一事件。
在一些可能的实现方式中,所述第一输入设备是鼠标;确定焦点设备,包括:
确定所述无线鼠标的光标在所述第一电子设备的显示屏上的位置;
在所述无线鼠标的光标从所述第一电子设备的显示屏移动到所述第二电子设备的显示屏时,焦点设备是所述第二电子设备;
在所述无线鼠标的光标位于所述第一电子设备的显示屏,且没有滑出第一电子设备的显示屏的趋势时,焦点设备是所述第一电子设备。
在一些可能的实现方式中,所述第一操作系统是Windows系统,所述第二操作系统是安卓系统。因此,本申请实施例可以将Windows系统下的快捷键事件转换为安卓系统下的快捷键事件,以便实现输入设备的快捷键事件在Windows操作系统和安装操作系统间的自动转换。
第二方面,一种输入设备的连接方法,所述方法应用于第二电子设备,所述第二电子设备中运行第二操作系统,所述第二电子设备与所述第一电子设备处于连接状态,所述第一电子设备中运行第一操作系统,所述第二操作系统与所述第一操作系统不同,所述方法包括:
接收来自第一电子设备的事件信息,所述事件信息包括按键扫描码和第一事件类型标识,所述按键扫描码是第一事件在所述第二操作系统下对应的按键扫描码,所述第一电子设备中运行第一操作系统,所述第一事件是所述第一操作系统下的事件,所述第一事件是所述第一电子设备检测到的第一输入设备或第二输入设备输入的事件;
根据所述事件信息获取所述按键扫描码和所述第一事件类型标识;
基于所述按键扫描码和所述第一事件类型标识调用接口进行响应。
在一些可能的实现方式中,基于所述按键扫描码和所述第一事件类型调用接口进行 响应,包括:
调用系统接口对所述按键扫描码和所述第一事件类型进行响应处理。
因此,在系统具备相关的接口(比如锁屏事件的接口)时,无需下发到应用,通过调用系统接口即可对快捷键事件作出响应。
示例性地,所述按键扫描码为锁屏事件快捷键对应的键码,所述第一事件类型为按下按键类型;所述调用系统接口对所述按键扫描码和所述第一事件类型进行响应处理包括:
调用锁屏接口对所述电子设备的显示屏进行锁屏。
在一些可能的实现方式中,基于所述按键扫描码和所述第一事件类型调用接口进行响应,包括:
利用事件分发机制将所述按键扫描码和所述第一事件类型发送到应用程序进行响应处理。
因此,通过将按键扫描码和所述第一事件类型发送到第一应用程序,使得第二电子设备的应用程序对快捷键事件作出响应。
示例性地,所述按键扫描码包括复制文本事件的相关快捷键,所述第一事件类型为按下按键类型;
所述利用事件分发机制将所述按键扫描码和所述第一事件类型发送到应用程序进行响应处理包括:
将所述按键扫描码和所述第一事件类型发送到第一应用程序进行响应处理,所述第一应用程序支持所述复制文本事件,所述第一应用程序是所述电子设备正在运行的应用程序。
在一些可能的实现方式中,根据所述事件信息获取所述按键扫描码和所述第一事件类型,包括:
基于第一传输格式对所述事件信息进行解析,获得所述按键扫描码和所述第一事件类型,所述第一传输格式是所述第一电子设备与所述第二电子设备预先定义的按键事件传输格式。
在一些可能的实现方式中,所述第一操作系统是Windows系统,所述第二操作系统是安卓系统。因此,本申请实施例可以将Windows系统下的快捷键事件转换为安卓系统下的快捷键事件,以便实现输入设备的快捷键事件在Windows操作系统和安装操作系统间的自动转换。
第三方面,提供了一种通信系统,所述通信系统包括第一电子设备、第二电子设备。可选地,所述通信系统还包括第一输入设备以及第二输入设备。所述第一电子设备用于执行第一方面中的任一种方法。所述第二电子设备用于执行第二方面中的任一种方法。
可选地,所述第一电子设备中运行第一操作系统,所述第二电子设备中运行第二操作系统,所述第二电子设备与所述第一电子设备处于连接状态,所述第二操作系统与所述第一操作系统不同。
可选地,所述第一操作系统是Windows系统,所述第二操作系统是安卓系统。
第四方面,提供了一种输入设备的事件处理装置,包括用于执行第一方面中任一种方法的单元。该装置可以是第一电子设备(比如PC设备),也可以是第一电子设备内的芯片(比如PC设备内的芯片)。该装置包括输入单元、显示单元和处理单元。
可选地,该装置中运行有第一操作系统。示例性地,第一操作系统是Windows系统。
当该装置是第一电子设备时,该处理单元可以是处理器,该输入单元可以是通信接口,该显示单元可以是图形处理模块和屏幕;该第一电子设备还可以包括存储器,该存储器用于存储计算机程序代码,当该处理器执行该存储器所存储的计算机程序代码时,使得该第一电子设备执行第一方面中任一种实现方式的方法。
当该装置是第一电子设备内的芯片时,该处理单元可以是芯片内部的逻辑处理单元,该输入单元可以是输入接口、管脚或电路等,该显示单元可以是芯片内部的图形处理单元;该芯片还可以包括存储器,该存储器可以是该芯片内的存储器(例如,寄存器、缓存等),也可以是位于该芯片外部的存储器(例如,只读存储器、随机存取存储器等);该存储器用于存储计算机程序代码,当该处理器执行该存储器所存储的计算机程序代码时,使得该芯片执行第一方面中任一种实现方式的方法。
第五方面,提供了一种输入设备的事件处理装置,包括用于执行第二方面中任一种方法的单元。该装置可以是第二电子设备(比如平板),也可以是第二电子设备内的芯片(比如平板内的芯片)。该装置包括输入单元、显示单元和处理单元。
可选地,该装置中运行有第二操作系统。示例性地,第二操作系统是Android系统。
当该装置是第二电子设备时,该处理单元可以是处理器,该输入单元可以是通信接口,该显示单元可以是图形处理模块和屏幕;该第二电子设备还可以包括存储器,该存储器用于存储计算机程序代码,当该处理器执行该存储器所存储的计算机程序代码时,使得该第二电子设备执行第二方面中任一种实现方式的方法。
当该装置是第二电子设备内的芯片时,该处理单元可以是芯片内部的逻辑处理单元,该输入单元可以是输入接口、管脚或电路等,该显示单元可以是芯片内部的图形处理单元;该芯片还可以包括存储器,该存储器可以是该芯片内的存储器(例如,寄存器、缓存等),也可以是位于该芯片外部的存储器(例如,只读存储器、随机存取存储器等);该存储器用于存储计算机程序代码,当该处理器执行该存储器所存储的计算机程序代码时,使得该芯片执行第二方面中任一种实现方式的方法。
第六方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序代码,当所述计算机程序代码被输入设备的事件处理的装置运行时,使得该装置执行第一方面中任一种实现方式的方法,或者,使得该装置执行第二方面中任一种实现方式的方法。
第七方面,提供了一种计算机程序产品,所述计算机程序产品包括:计算机程序代码,当所述计算机程序代码被输入设备的事件处理的装置运行时,使得该装置执行第一方面中任一种实现方式的方法,或者,使得该装置执行第二方面中任一种实现方式的方法。
附图说明
图1是本申请实施例的应用场景的一个示例图;
图2是一种适用于本申请的电子设备的硬件系统的示意图;
图3是一种适用于本申请的输入设备的硬件结构示意框图;
图4是一种适用于本申请的电子设备的软件系统的示意图;
图5是根据本申请实施例的输入设备的事件处理方法的示意性流程图;
图6是本申请实施例的一个快捷键事件示例图;
图7是本申请实施例的另一个快捷键事件示例图;
图8是本申请实施例的又一个快捷键事件示例图;
图9是本申请实施例的输入设备的事件处理装置的一个示意性框图;
图10是本申请实施例的输入设备的事件处理装置的另一个示意性框图。
具体实施方式
下面将结合附图,对本申请实施例中的技术方案进行描述。
本申请实施例提供的输入设备的事件处理方法可应用于电子设备中。例如,该电子设备可以为平板电脑、笔记本电脑、可穿戴设备、多媒体播放设备、电子书阅读器、个人计算机(personal computer,PC)、个人数字助理(personal digital assistant,PDA)、上网本、增强显示(augmented reality,AR)设备、虚拟现实(virtual reality,VR)设备、智能手机、智能电视、智慧屏设备、智能相机、便携式多媒体播放器(portable multimedia player,PMP)、投影设备、混合现实(mixed reality,MR)设备、电视机或人机交互场景中的体感游戏机等电子设备。本申请对电子设备的具体形式不作限制。
电子设备通常可以与一个或多个输入设备(如输入外设)连接,以实现相应功能。可以理解,输入设备可以是无线外设,也可以是有线外设,对此不作具体限定。
示例性地,无线外设是指基于无线传输协议(如蓝牙协议或者2.4G通信协议等)实现向终端设备输入的输入设备。在本申请实施例中,输入设备所支持的输入方式可以包括但不限于按键方式(如鼠标、键盘等)、滚动滚轮方式(如鼠标等)、手势输入方式、肢体语言输入方式、语音输入方式、表情输入方式、眼部活动输入方式等。
进一步的,本申请实施例也不限定输入设备与电子设备之间的具体通信方式。以输入设备是蓝牙外设为例,蓝牙外设可以基于支持设备间多连接协议栈的蓝牙协议与电子设备通信,以实现多电子设备共享输入设备。
例如,个人计算机PC可以与鼠标连接,通过鼠标实现PC显示屏上光标的移动,以及进一步的文件的打开/删除等功能。PC也可以与键盘连接,通过键盘实现移动PC显示屏上的光标、输入字符、打开/删除文件等功能。又如,平板电脑可以与键盘连接,通过键盘实现向平板电脑输入字符、打开平板电脑中的应用/视频/音频等功能。
本申请实施例提供的输入设备的事件处理方法可应用于跨操作系统的多设备协同场景中。示例性地,跨操作系统的多设备协同场景包括:PC(运行有Windows操作系统),平板(运行有安卓系统),其中,PC与平板之间建立有通信连接。假设当前焦点设备为平板,由于操作系统不同,当PC的输入外设使用快捷键进行操作时,平板无法识别快捷键事件,也就无法对快捷键事件进行响应,极大影响了操作效率,用户体验不好。
示例性地,焦点设备是指与输入设备建立通信连接,且输入设备当前所能直接操控的电子设备;非焦点设备是指与输入设备建立通信连接,但是输入设备当前不能直接操控的电子设备。以输入设备是无线鼠标且该无线鼠标由PC和平板共享为例,在无线鼠标移动到PC后,焦点设备是PC;在无线鼠标移动到平板后,焦点设备是平板。
为便于理解,以下结合1描述本申请实施例的应用场景。
参考图1,图1示出了本申请实施例的应用场景的示例图。如图1所示,PC和平板建立无线通信连接。当PC和平板建立通信连接后,鼠标可以在PC和平板两端自由移动。当焦点在平板时,平板可以通过鼠标和键盘进行输入。但是由于PC和平板采用不同的操作系统,因此,当用户对PC的鼠标和/或键盘执行快捷键操作时,平板无法对快捷键操作响应。即快 捷键在此场景下无法发挥功能,从而影响用户的操作效率。
应理解,本申请实施例对PC和平板的连接方式不作具体限定。PC和平板可以通过蓝牙连接、无线局域网连接、红外连接等。
为了提高用户在跨操作系统下的设备操作体验,本申请实施例拟提出一种输入设备的事件处理方法,通过将输入设备的快捷键事件从第一操作系统转换为第二操作系统可以识别的事件信息,能够实现输入设备的快捷键事件在不同操作系统间的自动转换,从而实现快捷键在不同操作系统间生效。
图2是本申请实施例提供的电子设备的硬件结构示意图。示例性地,第一电子设备可以采用图2示出的结构。示例性地,第二电子设备可以采用图2示出的结构。
如图2所示,电子设备200可以包括处理器210,存储器(包括外部存储器接口220和内部存储器221),通用串行总线(universal serial bus,USB)接口230,充电管理模块240,电源管理模块241,电池242,天线1,天线2,通信模块250,音频模块260,扬声器270A,受话器270B,麦克风270C,耳机接口270D,传感器模块280,按键290,马达291,指示器292,摄像头293,显示屏294等。
可以理解的是,图2中示意的结构并不构成对电子设备的具体限定。在本申请另一些实施例中,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器210可以包括一个或多个处理单元。例如:处理器210可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),飞行控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
处理器210中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器210中的存储器为高速缓冲存储器。该存储器可以保存处理器210刚用过或循环使用的指令或数据。如果处理器210需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器210的等待时间,因而提高了系统的效率。
在本申请实施例中,处理器210可以包括一个或多个微控制器(micro control unit,MCU),用于负责统一调度与输入设备迁移相关的其它所有模块/时序/事务的协调调度等。
在一些实施例中,处理器210可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
充电管理模块240用于从充电器接收充电输入。电源管理模块241用于连接电池242,充电管理模块240与处理器210。电源管理模块241接收电池242和/或充电管理模块240的输入,为处理器210,内部存储器221,显示屏294,摄像头293和通信模块250等供电。
电子设备的无线通信功能可以通过天线1,天线2,通信模块250,调制解调处理器以及 基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备中的每个天线可用于覆盖单个或多个通信频段。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
通信模块250可以提供应用在电子设备上的包括2G/3G/4G/5G/6G等无线通信的解决方案。通信模块250可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。通信模块250可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。通信模块250还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,通信模块250的至少部分功能模块可以被设置于处理器210中。在一些实施例中,通信模块250的至少部分功能模块可以与处理器210的至少部分模块被设置在同一个器件中。
在一些实施例中,通信模块250还可以提供应用在电子设备上的包括WLAN(如Wi-Fi网络),蓝牙(Bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。通信模块250可以是集成至少一个通信处理模块的一个或多个器件。通信模块250经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器210。通信模块250还可以从处理器210接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,通信模块250可以包括蓝牙模块。蓝牙模块可以用于负责发送蓝牙报文,实现与多个输入设备的基于蓝牙连接的交互。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频装置(不限于扬声器270A、受话器270B等)输出声音信号,或通过显示屏294显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器210,与通信模块250或其它功能模块设置在同一个器件中。
在本申请实施例中,电子设备可以基于通信模块250、天线1和/或天线2与其它终端设备通信,例如向其它电子设备发送控制指令。
在一些实施例中,电子设备的天线1和通信模块250耦合,天线2和通信模块250耦合,使得电子设备可以通过无线通信技术与网络以及其它设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),新无线(new radio,NR),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)等。
电子设备通过GPU,显示屏294,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏294和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器210可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏294用于显示图像,视频等。显示屏294包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。
在一些实施例中,电子设备可以通过GPU进行界面渲染,通过显示屏294进行界面显示等。
示例性的,在本申请实施例中,显示屏294所显示的界面上可以包括光标以及输入设备所输入的字符等。
电子设备可以通过ISP,摄像头293,视频编解码器,GPU,显示屏294以及应用处理器等实现拍摄功能。
外部存储器接口220可以用于连接外部存储卡,例如微型(micro)存储(storage card,SD)卡,实现扩展电子设备的存储能力。外部存储卡通过外部存储器接口220与处理器210通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器221可以用于存储计算机程序的可执行程序代码。示例性的,计算机程序可以包括操作系统程序和应用程序。操作系统可包括但不限于塞班(Symbian)系统、安卓(Android)系统、微软(Windows)系统、苹果iOS系统、黑莓系统等操作系统。其中,可执行程序代码包括指令。内部存储器221可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序等。存储数据区可存储电子设备使用过程中所创建的数据(比如应用数据,用户数据等)等。此外,内部存储器221可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器210通过运行存储在内部存储器221的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备的各种功能应用以及数据处理。
传感器模块280可以感知用户的操作,如触摸操作、点击操作、滑动操作、用户靠近屏幕等。
电子设备可以通过音频模块260,扬声器270A,受话器270B,麦克风270C以及应用处理器等实现音频功能。例如音乐播放,录音等。关于音频模块260,扬声器270A,受话器270B和麦克风270C的具体工作原理和作用,可以参考常规技术中的介绍。
按键290包括开机键,音量键等。按键290可以是机械按键。也可以是触摸式按键。电子设备可以接收按键输入,产生与电子设备的用户设置以及功能控制有关的键信号输入。
需要说明的是,图2所示电子设备包括的硬件模块只是示例性地描述,并不对电子设备的具体结构做出限定。
在本申请实施例中,输入设备可以包括但不限于无线鼠标、无线键盘、无线轨迹球、无线触摸板、无线触针、无线笔、智能穿戴设备(如智能手表、智能手环、智能眼镜、电话手表等)、无线耳机、游戏外设等,或者可以向电子设备提供输入的任何其它设备,本申请不限定。
图3是本申请实施例提供的输入设备的结构框图。如图3所示,输入设备300可以包括: 总线305、输入模块310、控制电路320、电源330、存储器部件340、通信模块350和电源管理模块360。
其中,电源330用于为输入设备300供电。电源管理模块360可以将电力直接从电源330路由至输入设备300的其它部件。电源管理模块360还可以将来自电源330的电力分配至其它系统部件(例如控制电路320、通信模块350以及输入模块310或其任意组合)。
在一些实施例中,控制电路320、电源330、存储器部件340、通信模块350、电源管理模块360可以经由总线305彼此进行通信。输入模块310可以独立地连接至控制电路320和电源管理模块360。
在一些实施例中,输入模块310可以经由总线305连接至其它模块。
在一些实施例中,输入模块310可以被配置成从多个按键输入元件或设备接收输入。在一些实施例中,输入模块310可操作为响应于用户按压下述部件来接收输入,所述部件包括:按键(例如字母键、功能键(如音量键、退出键、静音键、换档键等)、数字键或数字键盘键、操作系统选择键、鼠标右键、鼠标左键等)、或其它适当的输入元件或设备例如媒体控制按钮、网络语音电话业务(voice over internet phone,VOIP)按钮、触摸传感器(例如触摸板、触摸针)等。输入模块310能够生成与按压的按键输入元件关联的字符数据并且将该字符数据发送至控制电路320。示例性的,若输入设备是无线键盘,输入模块310可以包括键盘按键;若输入设备是无线鼠标,输入模块310可以包括鼠标传感器和光标模块,其中光标模块用于负责鼠标光标移动和输入。
在本申请实施方式中,由输入设备300发送至电子设备的键码取决于电子设备上运行的操作系统。输入设备300的行为取决于操作系统。与多个按键输入元件对应的不同键码可以是操作系统特定的。例如,在不同的操作系统上选择“Home”键导致不同的功能(例如在ios中是主屏幕,但是在Windows中是浏览器的主页)。
在一些实施例中,控制电路320可以包括一个或更多个微处理器(micro-processor),以及控制电路320可以被配置成控制输入设备300的操作。控制电路320可以用于负责统一调度其它所有模块/时序/事务的协调调度,管理输入设备配置信息,管理输入设备迁移等。在一些实施例中,控制电路320可以包括支持硬件/固件(例如,存储器、可编程输入/输出(input/output,I/O)等)的一个或多个MCU、数字信号处理器(DSP)、现场可编程门阵列(field-programmable gate array,FPGA)、可编程逻辑器件(programable logic device,PLD)等。
存储器部件340可以被配置成存储数据。在一些实施例中,数据可以包括连接数据和配对数据,连接数据和配对数据包括例如所选择的电子设备的地址。在一些实施例中,存储器部件340可以是非易失性存储器。
通信模块350可以被配置成向输入设备300提供I/O能力。例如,通信模块350可以经由无线连接将数据从输入模块310路由至终端设备,以及将数据从终端设备路由至输入模块310。其中,无线连接可以是蓝牙连接或基于任何其它无线标准或专用的无线网络协议的通信连接。示例性的,通信模块350可以包括蓝牙模块。蓝牙模块可以用于负责发送蓝牙报文,实现与电子设备的蓝牙连接交互。
需要说明的是,图3所示输入设备300包括的结构只是示例性地描述,并不对输入设备300的具体结构做出限定。
图4是多设备协同连接的软件架构示例图。如图4所示,第一电子设备(也可以称作协同设备1)与第二电子设备(也可以称作协同设备2)之间建立有通信连接。第一电子设备采 用第一操作系统。第二电子设备采用第二操作系统。第一操作系统与第二操作系统不同。比如,第一电子设备采用Windows系统,第二电子设备采用安卓系统。
如图4所示,第一电子设备的软件架构从上至下依次分为:业务层(或者说应用层)、能力层(或者说架构层)和驱动层。其中,业务层包括以下模块:应用、设置管理(主要用于对第一操作系统进行设置管理)、设备发现、状态管理(比如,用于对第一电子设备的状态进行管理)、显示管理(比如,用于对第一电子设备的屏幕显示内容进行管理)。在本申请实施例中,业务层新增了转换模块(也可称作事件监听转换模块)。转换模块用于监听输入设备的输入事件。转换模块还用于识别焦点设备。转换模块还用于基于第一映射关系将输入设备的输入事件转换为第二电子设备的事件信息,并将事件信息发送给第二电子设备的数据接收模块。
应理解,图4中示出的第一电子设备的业务层包括的模块仅是示例性描述,本申请实施例并不限于此。事实上,第一电子设备的业务层可以包括比图4中所示的模块更多或更少的模块。
能力层包括以下模块:套接字(socket)、TCP/IP、input模块。socket模块是支持TCP/IP协议的路通信的基本操作单元。
驱动层可以包括各类驱动模块。示例性地,对于第一电子设备而言,图4中的驱动层包括蓝牙驱动、WiFi驱动、HID驱动等。可以理解,图4中的第一电子设备的驱动层可以包括比如图4中示出的模块更多或更少的模块,对此不作具体限定。
如图4所示,第二电子设备的软件架构从上至下依次分为:业务层(或者说应用层)、能力层(或者说架构层)和驱动层。
其中,业务层包括以下模块:应用、设置管理(比如,用于实现对第二操作系统进行设置管理)、设备发现(比如,用于实现用于对第二操作系统的设备发现管理)、状态管理(比如,用于对第二电子设备的状态进行管理)、显示管理(比如,用于对第二电子设备的屏幕显示内容进行管理)。在本申请实施例中,业务层新增了数据接收模块。数据接收模块用于接收第一电子设备的转换模块发送的事件信息。数据接收模块还用于对事件信息进行解析,并将解析后得到的按键码和事件类型注入到input驱动中。
应理解,图4中示出的第二电子设备的业务层包括的模块仅是示例性描述,本申请实施例并不限于此。事实上,第二电子设备的业务层可以包括比图4中所示的模块更多或更少的模块。
能力层包括以下模块:input模块、socket模块、TCP/IP。在本申请实施例中,业务层修改了input模块。input模块用于针对input驱动注入的事件信息(包括按键码和事件类型)调用相应的快捷功能接口或分发给应用。
驱动层可以包括各类驱动模块。示例性地,对于第二电子设备而言,图4中的驱动层包括input驱动、蓝牙驱动、WiFi驱动、HID驱动等。input驱动在获得数据接收模块注入的按键码和事件类型后,将按键码和事件类型上报到input模块。可以理解,图4中的第二电子设备的驱动层可以包括比如图4中示出的模块更多或更少的模块,对此不作具体限定。
应理解,图4中示出的软件架构仅是示例性描述,本申请实施例并不限于此。
可以理解的是,图4中示意的结构并不构成对第一电子设备或第二电子设备的具体限定。在本申请另一些实施例中,第一电子设备或第二电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软 件或软件和硬件的组合实现。
以下结合图5至图8描述本申请实施例的输入设备的事件处理方法。
图5是本申请实施例的输入设备的事件处理方法500的示意性流程图。可以理解,图5的方法可应用到图1所示的场景中。比如,图5中的第一电子设备是图1中的PC,第二电子设备是图1中的平板。如图5所示,所述方法500包括:
步骤501,第一电子设备检测到所述第一输入设备或所述第二输入设备的第一事件,所述第一事件是所述第一操作系统下的事件,所述第一电子设备与第一输入设备处于连接状态,所述第一电子设备与第二输入设备处于连接状态。
第一事件用于泛指在第一操作系统下第一电子设备监听到的输入设备的输入事件。输入事件包括快捷键事件。快捷键事件是指通过按下输入设备的快捷键触发的事件,比如,按下Windows+L快捷键可触发锁屏事件。
可选地,第一事件可以是第一输入设备和第二输入设备共同触发的事件,比如,键盘按键加鼠标滚轮的操作;也可以是第一输入设备或第二输入设备单独触发的事件,比如,滑动鼠标滚轮事件。
示例性地,第一输入设备为无线鼠标,第二输入设备是键盘。第一电子设备连接有无线鼠标和键盘。
此处作统一说明,第一电子设备与第二电子设备为不同操作系统的电子设备。第一电子设备与第二电子设备建立有通信连接。比如,第一电子设备为PC,采用Windows系统;第二电子设备为平板电脑,采用安卓系统。
本申请实施例对第一电子设备与第二电子设备的通信连接方式不作具体限定。比如,第一电子设备与第二电子设备通过蓝牙连接。
示例性地,第一电子设备在监听各种外接设备(比如,键盘或鼠标等外设)的输入事件时,检测到第一输入设备或第二输入设备的事件,比如第一事件。第一事件可以理解为第一操作系统下的事件。为了实现第一事件能够在第二电子设备中执行,本申请实施例需要将第一事件转换为第二操作系统下的事件。
步骤502,第一电子设备确定所述第一输入设备当前的焦点设备。
在监听到第一事件后,可以先判断当前的焦点设备是第一电子设备还是第二电子设备。如果判断出焦点设备是第一电子设备,则执行步骤503-2;如果判断出焦点设备是第二电子设备,则执行步骤503-1。
焦点设备的描述可以参考前文,为了简洁,此处不再赘述。
本申请实施例对如何判断焦点设备的方式不作具体限定。
可选地,作为一种实施方式,当第一输入设备是无线鼠标时,确定第一输入设备当前的焦点设备包括:
确定所述无线鼠标的光标在所述第一电子设备的显示屏上的位置;
在所述无线鼠标的光标从所述第一电子设备的显示屏移动到所述第二电子设备的显示屏时,焦点设备是所述第二电子设备;
在所述无线鼠标的光标位于所述第一电子设备的显示屏,且没有滑出第一电子设备的显示屏的趋势时,焦点设备是所述第一电子设备。
示例性地,假设第一电子设备位于第二电子设备的右侧,当检测到无线鼠标的光标从第一电子设备的显示屏的右边缘移动到第二电子设备时,则确定焦点设备为第二电子 设备;当检测到无线鼠标的光标未超出第一电子设备的显示屏的右边缘时,则确定焦点设备为第一电子设备。
示例性地,第一设备检测到无线鼠标滑出第一电子设备显示屏的边缘,且无线鼠标滑向第二电子设备的移动坐标超过预设阈值,则确定焦点设备为第二电子设备。
应理解,上述确定焦点设备的方式只是示例性描述,并非要将本申请实施例限定到上述示例中。事实上,本领域技术人员可以采用其他方式判断焦点设备。比如,采用屏幕光标边缘检测算法进行检测。
步骤503-1,在焦点设备是第二电子设备时,第一电子设备基于第一事件的事件类型以及第一映射关系生成事件信息,所述事件信息包括按键扫描码和第一事件类型,所述第一映射关系包括所述第一按键扫描码和第一按键码的对应关系,所述按键扫描码是所述第一事件在所述第二操作系统下对应的按键码,所述第一按键码是所述第一事件在第一操作系统下的按键码。所述第一事件类型标识用于标识第一事件的事件类型。
第一映射关系中可以包括第一事件的按键码在不同操作系统下的对应关系。
举例来说,以下表1是锁屏事件在Windows系统下的按键码以及锁屏事件在Android系统下的按键扫描码的映射关系。
表1
在上述表1中,对于锁屏事件而言,Windows系统下的按键码为0x5B,0x4C,对应的Android系统下的按键扫描码为125,38。
应理解,上述表1只是以锁屏事件为例进行描述,本申请实施例并不限于此。事实上,对于其他的快捷键事件,也存在按键码映射关系,此处不再一一列举。
示例性地,对应按键26个英文字母的按键,在Android系统下具有相应的按键扫描码。比如,字母A在Android系统下的按键扫描码为30;字母B在Android系统下的按键扫描码为48;字母C在Android系统下的按键扫描码为46;…;字母X在Android系统下的按键扫描码为45;字母Y在Android系统下的按键扫描码为21;字母Z在Android系统下的按键扫描码为44。应理解,为了简洁,此处只是示例性给出部分字母在Android系统下的按键扫描码。
应理解,上述关于26个英文字母的按键在Windows系统下也具有相应的按键码。比如,26个英文字母的按键可转换为十六进制数表征,即得到26个英文字母在Windows系统下的按键码。这样,26个英文字母的按键码映射关系包括:字母在Windows系统下的按键码以及该字母在Android系统下对应的按键扫描码。
以下结合表2描述另一按键码映射关系。例如,表2中示出了键盘中的部分按键在Windows系统下对应的按键码,以及在Android系统下对应的按键扫描码的映射表。
表2

在表2中,以Windows键为例,在Windows系统下对应的按键码为0x5B,在Android系统下对应的按键扫描码为125。
应理解,上述表2只是键盘中的部分按键为例进行描述,本申请实施例并不限于此。事实上,对于其他的按键,也存在在Windows系统的按键码和Android系统下的按键扫描码映射关系,此处不再一一列举。
还应理解,上述关于按键码和按键扫描码的映射关系只是示例性描述,本领域技术人员可以根据需求或者按照不同操作系统的规范,新增按键码映射关系。
示例性地,第一电子设备中可维护不同操作下输入设备(比如键盘鼠标等外设)的映射关系。当第一电子设备监听到输入设备触发的事件后,可在映射关系中进行查询,获得事件在Android系统下的按键扫描码。在获得按键码后,第一电子设备可以将按键扫描码以及事件类型封装成数据(比如事件信息)传输给第二电子设备。
可选地,事件类型可通过事件ID进行标识。例如,在封装过程中,可将事件ID以及按键扫描码进行封装,发送给第二电子设备。
以下结合表3描述事件类型与事件ID的定义表。例如,表3中示出了部分事件类型以及对应的事件ID。
表3
在表3中,键盘Down即用户按下键盘且未松手的事件,比如,键盘Down事件可以通过GENERIC_INPUT_TYPE_KEY_DOWN标识。键盘Up即用户按下键盘后松手的事件,比如,键盘Up事件可以通过GENERIC_INPUT_TYPE_KEY_UP标识。滚轮垂直移动事件即用户滑动鼠标滚轮进行垂直移动的事件,比如,滚轮垂直移动事件可以通过GENERIC_INPUT_TYPE_VERTICAL_WHEEL标识。滚轮水平移动事件即用户滑动鼠标滚轮进行水平移动的事件,比如,滚轮水平移动事件可以通过GENERIC_INPUT_TYPE_HORIZONTAL_WHEEL标识。
应理解,上述表3中示出的事件类型以及相应的事件ID仅是示例性描述,本申请实施例并不限于此。
还应理解,上述关于事件类型与对应的事件ID只是示例性描述,本领域技术人员可以根据需求,新增事件类型与对应的事件ID。
示例性地,锁屏事件是通过两个锁屏快捷键实现的,比如Windows键和L键组合键。当用户按下Windows键后,第一电子设备通过第一映射关系查询到Windows键在Android系统下对应的按键扫描码(125),然后会将键盘Down事件以及Windows键在Android系统下对应的按键扫描码(125)发送给第二电子设备;接着,当用户按下L键后,再向第二电子设备发送“L键在Android系统下对应的按键扫描码(38)”以及L键的“键盘Down”事件;当用户松开L键后,第一电子设备会向第二电子设备发送“L键在Android系统下对应的按键扫描码(38)”以及L键的“键盘UP”事件;当用户松开Windows键后,再向第二电子设备发送键盘UP事件以及Windows键在Android系统下对应的按键扫描码(125)。
可选地,步骤503-2,在焦点设备是所述第一电子设备时,在所述第一电子设备中执行所述第一事件。
示例性地,在检测到鼠标未移动到第一电子设备的边缘时(比如右边缘),可以将第一事件在第一电子设备中进行处理。可选地,将第一事件在第一电子设备中进行处理,包括:采用第一电子设备中的原有事件流程对第一事件进行响应处理。比如,将第一事件分发到第一电子设备的其他窗体(或者说窗口)进行处理。
步骤504,第一电子设备向第二电子设备发送事件信息,所述事件信息用于所述第二电子设备生成所述第二操作系统下的事件。相应的,第二电子设备接收来自第一电子设备的所述事件信息。
本申请实施例对第一电子设备向第二电子设备发送事件信息时采用的传输格式不作具体限定。
示例性地,第一电子设备基于第一传输格式(比如表3中示出的格式)将所述事件信息发送给所述第二电子设备,所述第一传输格式是所述第一电子设备与所述第二电子设备预先定义的按键事件传输格式。
需要说明的是,第一传输格式是第一电子设备与第二电子设备提前约定好的传输格式。第二电子设备在接收到以上述第一传输格式发送的事件信息后,可按照第一传输格式进行解析。因此,通过预定的传输格式进行事件信息的发送,能够保证对端(即第二电子设备)可以解析出该事件信息。
应理解,“第一传输格式”用于泛指第一电子设备向第二电子设备发送事件信息的传输格式,本申请实施例对其命名不作具体限定。比如,“第一传输格式”也可以称作“按键事件传输格式”等。
示例性以下结合描述按键事件传输格式。例如,表4中示出了按键事件传输格式的示例:
表4

上述表4中示出了各个字段对应的字节数。基于上述表4示出的传输格式,可以对按键码以及时间类型进行封装,获得事件信息。
应理解,表4中的传输格式仅是示例性描述,本申请实施例并不限于此。事实上,本领域技术人员也可以采用其他传输协议或传输格式传输上述事件信息。
步骤505,第二电子设备根据所述事件信息获取所述按键扫描码和所述第一事件类型(可以通过事件ID进行标识)。
示例性地,如果第一电子设备基于第一传输格式发送上述事件信息,相应的,第二电子设备在收到所述事件信息后,基于第一传输格式对事件信息进行解析,获得所述按键扫描码和所述第一事件类型(比如,获得事件ID)。
第二电子设备可以将解析得到的按键扫描码和所述第一事件类型直接注入到input驱动中,也可以基于解析得到的按键扫描码和所述第一事件类型进行映射,将映射后的事件类型注入到input驱动中。
可选地,作为一个实施例,第二电子设备(或者说第二电子设备的数据接收模块)在通过解析得到事件类型后,可以将解析得到的事件类型作进一步映射,比如,将第一事件类型映射为第二事件类型,以便使得事件类型更符合第二操作系统下的使用规范或标准,避免当第二操作系统下无法支持第一事件类型时无法对第一事件类型作出响应,有助于提升用户的操作体验。可选地,第二电子设备将映射后的第二事件类型注入到input驱动中。比如,第二电子设备解析出快捷键事件包括:按下“Windows+左方向键(即向左箭头键)”,“Windows+左方向键”在Windows系统下为“将窗口最大化到屏幕左侧的事件”,但是安卓系统下没有相应的事件类型,那么第二电子设备将此事件映射为“Windows+左方向键”映射为“返回”事件,并将“返回”事件注入到input驱动中。
应理解,本申请实施例对第二电子设备将解析后的事件如何做映射不作具体限定。本领域技术人员可以基于实际需求进行相应的映射。
步骤506,第二电子设备基于按键扫描码和第一事件类型(通过第一事件类型ID进行标识)调用接口进行响应。
示例性地,步骤506,包括:506-1,第二电子设备的数据接收模块将按键扫描码和第一事件类型注入到input驱动中;506-2,input驱动将按键扫描码和第一事件类型上报到input模块;步骤506-3,input模块根据按键扫描码和第一事件类型调用接口进行响应。示例性地,input模块可以将按键扫描码转换为安卓系统下的按键码。
示例性地,第二电子设备中的input模块根据按键扫描码和第一事件类型,调用相应的功能接口,或者,将快捷事件分发给应用。后续将结合示例进行描述。
在本申请实施例中,第一电子设备在监听到输入设备的快捷键事件(比如第一事件)后,如果判断出焦点设备为第二电子设备,那么第一电子设备通过将输入设备的快捷键事件从第一操作系统转换为第二操作系统可以识别的事件信息,并将事件信息发送给第二电子设备,以便第二电子设备对事件信息作出响应,能够实现输入设备的快捷键事件在不同操作系统间的自动转换,从而实现快捷键在不同操作系统间生效,提升了操作效 率,极大提高用户的操作体验。
可选地,作为一个实施例,基于按键扫描码和第一事件类型调用接口进行响应包括:调用系统接口对所述按键扫描码和所述第一事件类型进行响应处理。
示例性地,所述按键扫描码为锁屏事件快捷键对应的键码,所述第一事件类型为按下按键类型;所述调用系统接口对所述按键扫描码和所述第一事件类型进行响应处理包括:
调用锁屏接口对所述电子设备的显示屏进行锁屏。
比如,安卓系统下有对应的锁屏接口,此时无需将事件信息分发到应用。
可选地,如果第二电子设备对按键扫描码和/或第一事件类型进行了映射,那么此处可以调用系统接口对映射后的按键码(比如第三按键码)和映射后的事件类型(比如第二事件类型)进行响应处理。
为便于理解,以下结合图6中的示例进行说明。在一种可能的实现方式中,以第一电子设备是PC,第二电子设备是平板为例,PC和平板共享鼠标为例,如图6所示,PC和平板处于连接态。在图6中,鼠标光标在平板中,即当前焦点设备为平板。用户可通过按下锁屏快捷键(包括Windows键和L键)触发锁屏事件。PC在检测到锁屏事件后,将该锁屏事件转换为平板下的按键码和事件类型。如图6所示,当用户按下Windows键和L键后,平板调用系统接口实现锁屏,即平板熄屏。从图6中可知,平板对锁屏快捷键事件作出了响应。
可选地,作为一个实施例,基于按键扫描码和第一事件类型调用接口进行响应包括:包括:利用事件分发机制将所述按键扫描码和所述第一事件类型发送到应用程序进行响应处理。
示例性地,所述按键扫描码包括复制文本事件的相关快捷键(比如复制快捷键中的ctrl键)的按键码,所述第一事件类型为按下按键类型(比如按下ctrl键);利用事件分发机制将所述按键扫描码和所述第一事件类型发送到应用程序进行响应处理包括:将所述按键扫描码和所述第一事件类型发送到第一应用程序进行响应处理,所述第一应用程序支持所述复制文本事件,所述第一应用程序是所述电子设备正在运行的应用程序。
可选地,如果第二电子设备对按键扫描码和/或第一事件类型进行了映射,那么可以利用事件分发机制对映射后的按键扫描码和映射后的事件类型进行响应处理。
为便于理解,以下结合图7中的示例进行说明。在一种可能的实现方式中,以第一电子设备是PC,第二电子设备是平板,PC和平板共享鼠标为例,如图7所示,PC和平板处于连接态。在图7中,鼠标光标在平板中,即当前焦点设备为平板。用户可通过按下全选文本快捷键(包括ctrl键和A键)触发全选文本事件。PC在检测到全选文本事件后,将该全选文本事件转换为平板下的按键码和事件类型。如图7所示,当用户按下ctrl键和A键后,平板将全选文本事件分发到应用。假设平板当前正在运行某个文本类应用,那么调用该文本类应用的接口实现全选文本事件,比如选中平板正在显示的文本“荣耀新品发布…”。从图7中可知,平板对全选文本事件快捷键事件作出了响应。
应理解,图7中的示例仅是以“全选文本快捷键事件”为例进行举例,本申请实施例并不限于此。
应理解,图6和图7中示出的例子是关于键盘的快捷键操作,本申请实施例并不限于此。事实上,用户也可以通过键盘和鼠标的共同实现某些快捷键事件。
图8示出了通过键盘和鼠标共同实现放大文本的示例图。以第一电子设备是PC,第二电子设备是平板,PC和平板共享鼠标为例,如图8所示,如图8所示,PC和平板处于连接态。在图8中,鼠标光标在平板中,即当前焦点设备为平板。用户可通过按下放大文本快捷键(包括ctrl键和上滑鼠标滚轮)触发放大文本事件。PC在检测到放大文本事件后,将该放大文本事件转换为平板下的按键码和事件类型。如图8所示,当用户按下ctrl键并同时上滑鼠标滚轮后,平板将放大文本事件分发到应用。假设平板当前正在运行某个文本类应用,那么调用该文本类应用的接口实现放大文本事件,比如对平板正在显示的文本“荣耀新品发布…”进行放大。从图8中可知,平板对放大文本事件快捷键事件作出了响应。
应理解,图6至图8中的示例仅是部分快捷键事件的示例性描述,本申请实施例并不限于此。事实上,其他的快捷键事件采用本申请实施例的方法也能够实现跨系统响应。
还应理解,图6至图8中仅是PC是第一电子设备,平板是第二电子设备为例进行描述,本申请实施例并不限于此。比如,将平板作为第一电子设备,PC作为第二电子设备也是可以实现的。
上文结合图1至图8,详细描述了本申请实施例提供的输入设备的事件处理方法。下面将结合图9和图10详细描述本申请的装置实施例。应理解,本申请实施例的输入设备的事件处理装置可以执行前述本申请实施例的各种输入设备的事件处理的方法,即以下各种产品的具体工作过程,可以参考前述方法实施例中的对应过程。
图9是本申请实施例的输入设备的事件处理装置900的示意性框图。应理解,装置900可以执行图5至图8所示的输入设备的事件处理中由第一电子设备执行的方法。
如图9所示,该输入设备的事件处理装置900包括:监听单元910,确定单元920,转换单元930以及通信单元940。在一种可能的示例中,装置900可以是第一电子设备,比如PC设备。所述第一电子设备中运行第一操作系统,所述第一电子设备与第二电子设备处于连接状态,所述第二电子设备中运行第二操作系统,所述第二操作系统与所述第一操作系统不同。
所述监听单元910用于检测到所述第一输入设备或所述第二输入设备的第一事件,所述第一电子设备与第一输入设备处于连接状态,所述第一电子设备与第二输入设备处于连接状态;
所述确定单元920用于确定所述第一输入设备当前的焦点设备;
所述转换单元930用于在焦点设备是所述第二电子设备时,基于所述第一事件的事件类型以及第一映射关系生成事件信息,所述事件信息包括按键扫描码和第一事件类型,所述第一映射关系包括所述按键扫描码和第一按键码的对应关系,所述按键扫描码是所述第一事件在所述第二操作系统下对应的按键扫描码,所述第一按键码是所述第一事件在第一操作系统下的按键码;
所述通信单元940用于向所述第二电子设备发送所述事件信息,所述事件信息用于将所述第一事件转换为第二操作系统下的事件。
可选地,作为一个实施例,所述通信单元940用于向所述第二电子设备发送所述事件信息,具体包括:
基于第一传输格式将所述事件信息发送给所述第二电子设备,所述第一传输格式是所述第一电子设备与所述第二电子设备预先定义的按键事件传输格式。
可选地,作为一个实施例,所述第一输入设备是鼠标;所述第一事件是用户通过滑动所述鼠标的滚轮或点击鼠标按键生成的事件。
可选地,作为一个实施例所述第二输入设备是键盘;所述第一事件是用户通过按下所述键盘中的按键生成的事件。
可选地,作为一个实施例,所述装置900还包括:
处理单元(图9中未示出),所述处理单元用于在焦点设备是所述第一电子设备时,在所述第一电子设备中执行所述第一事件。
可选地,作为一个实施例,所述第一输入设备是鼠标;所述确定单元920用于确定焦点设备,具体包括:
确定所述无线鼠标的光标在所述第一电子设备的显示屏上的位置;
在所述无线鼠标的光标从所述第一电子设备的显示屏移动到所述第二电子设备的显示屏时,焦点设备是所述第二电子设备;
在所述无线鼠标的光标位于所述第一电子设备的显示屏,且没有滑出第一电子设备的显示屏的趋势时,焦点设备是所述第一电子设备。
可选地,作为一个实施例所述第一操作系统是Windows系统,所述第二操作系统是安卓系统。
在一种可能的示例中,监听单元910,确定单元920,转换单元930以及通信单元940可以通过处理器或处理单元实现。应理解,上述装置900以功能单元的形式体现。这里的术语“单元”可以通过软件和/或硬件的形式实现,本申请实施例对此不作具体限定。
例如,“单元”可以是实现上述功能的软件程序、硬件电路或者二者结合。所述硬件电路可能包括(application specific integrated circuit,ASIC)应用特定集成电路、电子电路、执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、集成逻辑电路,和/或其他可以提供上述功能的合适器件。在一个简单的实施例中,本领域的技术人员可以想到装置900可以采用图2所示的形式。
图10是本申请实施例的输入设备的事件处理装置1000的示意性框图。应理解,装置1000可以执行图5至图8所示的输入设备的事件处理中由第二电子设备执行的方法。
如图10所示,该输入设备的事件处理装置1000包括:接收单元1010以及处理单元1020。在一种可能的示例中,装置1000可以是第二电子设备,比如平板。所述第二电子设备中运行第二操作系统,所述第二电子设备与所述第一电子设备处于连接状态,所述第一电子设备中运行第一操作系统,所述第二操作系统与所述第一操作系统不同。
在一些示例中,所述接收单元1010用于接收来自第一电子设备的事件信息,所述事件信息包括按键扫描码和第一事件类型标识,所述按键扫描码是第一事件在所述第二操作系统下对应的按键扫描码,所述第一电子设备中运行第一操作系统,所述第一事件是所述第一操作系统下的事件,所述第一事件是所述第一电子设备检测到的第一输入设备或第二输入设备输入的事件;
所述处理单元1020用于根据所述事件信息获取所述按键扫描码和所述第一事件类型标识;
所述处理单元1020还用于基于所述按键扫描码和所述第一事件类型标识调用接口进行响应。
可选地,作为一个实施例,所述处理单元1020用于基于所述按键扫描码和所述第一 事件类型调用接口进行响应,具体包括:
调用系统接口对所述按键扫描码和所述第一事件类型进行响应处理。
可选地,作为一个实施例,所述按键扫描码为锁屏事件快捷键对应的键码,所述第一事件类型为按下按键类型;所述调用系统接口对所述按键扫描码和所述第一事件类型进行响应处理包括:
调用锁屏接口对所述电子设备的显示屏进行锁屏。
可选地,作为一个实施例所述处理单元1020用于基于所述按键扫描码和所述第一事件类型调用接口进行响应,包括:
利用事件分发机制将所述按键扫描码和所述第一事件类型发送到应用程序进行响应处理。
可选地,作为一个实施例所述按键扫描码包括复制文本事件的相关快捷键,所述第一事件类型为按下按键类型;
所述利用事件分发机制将所述按键扫描码和所述第一事件类型发送到应用程序进行响应处理包括:
将所述按键扫描码和所述第一事件类型发送到第一应用程序进行响应处理,所述第一应用程序支持所述复制文本事件,所述第一应用程序是所述电子设备正在运行的应用程序。
可选地,作为一个实施例所述处理单元1020用于根据所述事件信息获取所述按键扫描码和所述第一事件类型,包括:
基于第一传输格式对所述事件信息进行解析,获得所述按键扫描码和所述第一事件类型,所述第一传输格式是所述第一电子设备与所述第二电子设备预先定义的按键事件传输格式。
可选地,作为一个实施例,所述第一操作系统是Windows系统,所述第二操作系统是安卓系统。
在一种可能的示例中,接收单元1010可以通过无线通信模块实现。处理单元1020可以通过处理器或处理单元实现。应理解,上述装置1000以功能单元的形式体现。这里的术语“单元”可以通过软件和/或硬件的形式实现,本申请实施例对此不作具体限定。
例如,“单元”可以是实现上述功能的软件程序、硬件电路或者二者结合。所述硬件电路可能包括(application specific integrated circuit,ASIC)应用特定集成电路、电子电路、执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、集成逻辑电路,和/或其他可以提供上述功能的合适器件。在一个简单的实施例中,本领域的技术人员可以想到装置1000可以采用图2所示的形式。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请还提供了一种通信系统,包括第一电子设备和第二电子设备,以及多个输入设备。
本申请还提供了一种计算机程序产品,该计算机程序产品被处理器执行时实现本申请中任一方法实施例所述的方法。
该计算机程序产品可以存储在存储器中,经过预处理、编译、汇编和链接等处理过程最终被转换为能够被处理器执行的可执行目标文件。
本申请还提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被计算机执行时实现本申请中任一方法实施例所述的方法。该计算机程序可以是高级语言程序,也可以是可执行目标程序。
该计算机可读存储介质可以是易失性存储器或非易失性存储器,或者,可以同时包括易失性存储器和非易失性存储器。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器ROM、随机存取存储器RAM、磁碟或者光盘等各 种可以存储程序代码的介质。
应理解,在本申请的各种实施例中,各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请的实施例的实施过程构成任何限定。
另外,本文中术语“系统”和“网络”在本文中常被可互换使用。本文中的术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。例如,A/B可以表示A或B。
本申请实施例中出现的术语(或者说编号)“第一”、“第二”、…等,仅用于描述目的,即只是为了区分不同的对象,比如,不同的“电子设备”等,并不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”、…等的特征可以明示或者隐含地包括一个或者更多个特征。在本申请实施例的描述中,“至少一个(项)”是指一个或多个。“多个”的含义是两个或两个以上。“以下至少一个(项)”或其类似表达,是指这些项中的任意组合,包括单个(项)或复数个(项)的任意组合。
例如,本申请实施例中出现的类似于“项目包括如下中至少一种:A,B,以及C”表述的含义,如无特别说明,通常是指该项目可以为如下中任一个:A;B;C;A和B;A和C;B和C;A,B和C;A和A;A,A和A;A,A和B;A,A和C,A,B和B;A,C和C;B和B,B,B和B,B,B和C,C和C;C,C和C,以及其他A,B和C的组合。以上是以A,B和C共3个元素进行举例来说明该项目的可选用条目,当表达为“项目包括如下中至少一种:A,B,……,以及X”时,即表达中具有更多元素时,那么该项目可以适用的条目也可以按照前述规则获得。
总之,以上所述仅为本申请技术方案的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (12)

  1. 一种输入设备的事件处理方法,其特征在于,所述方法应用于第一电子设备,所述第一电子设备中运行第一操作系统,所述第一电子设备与第二电子设备处于连接状态,所述第二电子设备中运行第二操作系统,所述第二操作系统与所述第一操作系统不同,所述方法包括:
    检测到第一输入设备或第二输入设备的第一事件,所述第一电子设备与第一输入设备处于连接状态,所述第一电子设备与第二输入设备处于连接状态;
    确定所述第一输入设备当前的焦点设备;
    在焦点设备是所述第二电子设备时,基于所述第一事件的事件类型以及第一映射关系生成事件信息,所述事件信息包括按键扫描码和第一事件类型,所述第一映射关系包括所述按键扫描码和第一按键码的对应关系,所述按键扫描码是所述第一事件在所述第二操作系统下对应的按键扫描码,所述第一按键码是所述第一事件在第一操作系统下的按键码;
    向所述第二电子设备发送所述事件信息,所述事件信息用于将所述第一事件转换为第二操作系统下的事件。
  2. 根据权利要求1所述的方法,其特征在于,所述向所述第二电子设备发送所述事件信息,包括:
    基于第一传输格式将所述事件信息发送给所述第二电子设备,所述第一传输格式是所述第一电子设备与所述第二电子设备预先定义的按键事件传输格式。
  3. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:
    在焦点设备是所述第一电子设备时,在所述第一电子设备中执行所述第一事件。
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述第一操作系统是Windows系统,所述第二操作系统是安卓系统。
  5. 一种输入设备的事件处理方法,其特征在于,所述方法应用于第二电子设备,所述第二电子设备中运行第二操作系统,所述第二电子设备与第一电子设备处于连接状态,所述第一电子设备中运行第一操作系统,所述第二操作系统与所述第一操作系统不同,所述方法包括:
    接收来自第一电子设备的事件信息,所述事件信息包括按键扫描码和第一事件类型,所述按键扫描码是第一事件在所述第二操作系统下对应的按键扫描码,所述第一电子设备中运行第一操作系统,所述第一事件是所述第一操作系统下的事件,所述第一事件是所述第一电子设备检测到的第一输入设备或第二输入设备输入的事件;
    根据所述事件信息获取所述按键扫描码和所述第一事件类型标识;
    基于所述按键扫描码和所述第一事件类型调用接口进行响应。
  6. 根据权利要求5所述的方法,其特征在于,所述基于所述按键扫描码和所述第一事件类型调用接口进行响应,包括:
    调用系统接口对所述按键扫描码和所述第一事件类型进行响应处理。
  7. 根据权利要求5所述的方法,其特征在于,所述基于所述按键扫描码和所述第一事件类型调用接口进行响应,包括:
    利用事件分发机制将所述按键扫描码和所述第一事件类型发送到应用程序进行响应处理。
  8. 根据权利要求5至7中任一项所述的方法,其特征在于,所述根据所述事件信息 获取所述按键扫描码和所述第一事件类型,包括:
    基于第一传输格式对所述事件信息进行解析,获得所述按键扫描码和所述第一事件类型,所述第一传输格式是所述第一电子设备与所述第二电子设备预先定义的按键事件传输格式。
  9. 根据权利要求5至8中任一项所述的方法,其特征在于,所述第一操作系统是Windows系统,所述第二操作系统是安卓系统。
  10. 一种电子设备,其特征在于,包括处理器和存储器,所述处理器和所述存储器耦合,所述存储器用于存储计算机程序,当所述计算机程序被所述处理器执行时,使得所述电子设备执行权利要求1至4中任一项所述的方法,或者,使得所述电子设备执行权利要求5至9中任一项所述的方法。
  11. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,当所述计算机程序被处理器执行时,使得所述处理器执行权利要求1至4中任一项所述的方法,或者,使得所述处理器执行权利要求5至9中任一项所述的方法。
  12. 一种芯片,其特征在于,包括处理器,当所述处理器执行指令时,所述处理器执行如权利要求1至4中任一项所述的方法,或者,执行如权利要求5至9中任一项所述的方法。
PCT/CN2023/115517 2022-09-02 2023-08-29 一种输入设备的事件处理方法和装置 WO2024046315A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211071830.4 2022-09-02
CN202211071830.4A CN117687808A (zh) 2022-09-02 2022-09-02 一种输入设备的事件处理方法和装置

Publications (1)

Publication Number Publication Date
WO2024046315A1 true WO2024046315A1 (zh) 2024-03-07

Family

ID=90100365

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/115517 WO2024046315A1 (zh) 2022-09-02 2023-08-29 一种输入设备的事件处理方法和装置

Country Status (2)

Country Link
CN (1) CN117687808A (zh)
WO (1) WO2024046315A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103907078A (zh) * 2011-11-03 2014-07-02 英特尔公司 用于在多个设备之间进行输入共享的系统和方法
CN113961131A (zh) * 2020-07-03 2022-01-21 瑞昱半导体股份有限公司 基于安卓平台的自定义按键的处理方法及其处理装置
CN114579016A (zh) * 2020-11-30 2022-06-03 华为技术有限公司 一种共享输入设备的方法、电子设备及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103907078A (zh) * 2011-11-03 2014-07-02 英特尔公司 用于在多个设备之间进行输入共享的系统和方法
US20140379946A1 (en) * 2011-11-03 2014-12-25 Danf Zhang System and method for input sharing between multiple devices
CN113961131A (zh) * 2020-07-03 2022-01-21 瑞昱半导体股份有限公司 基于安卓平台的自定义按键的处理方法及其处理装置
CN114579016A (zh) * 2020-11-30 2022-06-03 华为技术有限公司 一种共享输入设备的方法、电子设备及系统

Also Published As

Publication number Publication date
CN117687808A (zh) 2024-03-12

Similar Documents

Publication Publication Date Title
CN114764298B (zh) 一种跨设备的对象拖拽方法及设备
US11861161B2 (en) Display method and apparatus
WO2021013158A1 (zh) 显示方法及相关装置
WO2020238774A1 (zh) 一种通知消息的预览方法及电子设备
WO2021078284A1 (zh) 一种内容接续方法及电子设备
WO2020134872A1 (zh) 一种消息处理的方法、相关装置及系统
US20230229300A1 (en) Cross-Device Object Drag Method and Device
WO2021121052A1 (zh) 一种多屏协同方法、系统及电子设备
WO2022042656A1 (zh) 一种界面显示方法及设备
CN108549519B (zh) 分屏处理方法、装置、存储介质和电子设备
CN109003194B (zh) 评论分享方法、终端以及存储介质
WO2023179425A1 (zh) 一种输入设备的连接方法、设备及系统
WO2022048500A1 (zh) 一种显示方法及设备
WO2021057699A1 (zh) 具有柔性屏幕的电子设备的控制方法及电子设备
CN115657918A (zh) 一种跨设备的对象拖拽方法及设备
WO2022135186A1 (zh) 设备控制方法和终端设备
CN115016697A (zh) 投屏方法、计算机设备、可读存储介质和程序产品
WO2024046315A1 (zh) 一种输入设备的事件处理方法和装置
WO2022206848A1 (zh) 一种应用小部件的显示方法及设备
WO2022247638A1 (zh) 一种手写笔的连接控制方法和电子设备
WO2017035740A1 (zh) 一种选择文本的方法
WO2021143655A1 (zh) 一种数据发送方法及移动设备
WO2023071590A1 (zh) 输入控制方法及电子设备
WO2022228065A1 (zh) 功能跳转方法及电子设备
US10715682B2 (en) Electronic device, control method and non-transitory storage medium for executing a process related to an incoming call according to a response method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23859345

Country of ref document: EP

Kind code of ref document: A1