Key simulation method and device of application program, electronic equipment and storage medium

By obtaining screen touch events on Android devices and mapping them as key events for Windows applications, the problem of inaccurate key simulation when running Windows applications on Android devices is solved, and accurate control of Windows applications and user experience is improved.

CN119902829APending Publication Date: 2025-04-29BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202311406118.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-26
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

When running Windows applications on Android devices, the key press events of Windows applications cannot be effectively simulated, resulting in inaccurate control.

Method used

By obtaining the screen touch events of the Android system and mapping these events into key events of the target application based on the set mapping relationship, and finally passing these key events to the target application of the Windows to achieve control over the Windows to achieve the purpose of the Windows to achieve the control of the Windows to achieve the.

Benefits of technology

It realizes key simulation of Windows applications on Android devices, ensuring timely and accurate control of computer applications, and improving user experience and device utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902829A_ABST
    Figure CN119902829A_ABST
Patent Text Reader

Abstract

The invention provides a key simulation method and device for an application program, electronic equipment and a storage medium, and the method comprises the steps: obtaining a screen touch event of an Android system, mapping the screen touch event into a key event of a Windows target application program according to a set mapping relation, and transmitting the key event to the Windows target application program, according to the method and the device, the screen touch event of the Android system is mapped into the key event of the Windows target application program on the basis of the set mapping relation so as to simulate the key of the Windows application program running on the Android equipment, so that the computer application program can be timely and accurately controlled. The method and the device have the advantages that the screen touch event of the Android system is mapped into the key event of the Windows target application program on the basis of the set mapping relation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for simulating keystrokes of an application program. Background Art

[0002] With the growth of Android system users and the maturity and development of Android software and hardware products, the Android application ecosystem has shown explosive growth. With the large memory and storage combination actively promoted by the entire industry, the Android system has brought unlimited possibilities. However, many applications need to run under the Windows operating system. People usually use virtual machines under the Android operating system and deploy the Windows operating system in the virtual machine to run Windows applications. However, how to simulate the keystrokes of Windows applications on devices running the Android system is a technical problem that needs to be solved urgently. Summary of the invention

[0003] The present application aims to solve one of the technical problems in the related art at least to some extent.

[0004] To this end, the present application proposes a method, device, electronic device and storage medium for simulating application keys. Based on the set mapping relationship, the screen touch events of the Android system are mapped to the key events of the Windows target application to simulate the keys of the Windows application running on the Android device, thereby achieving timely and accurate control of the computer application.

[0005] In one aspect, an embodiment of the present application provides a key simulation method for an application program, comprising:

[0006] Get the screen touch events of the Android system;

[0007] According to the set mapping relationship, the screen touch event is mapped to a key event of the Windows target application;

[0008] The key event is transmitted to the Windows target application to control the Windows target application.

[0009] Another aspect of the present application provides a key simulation device for an application program, including:

[0010] Acquisition module, used to obtain screen touch events of Android system;

[0011] A mapping module, used for mapping the screen touch event to a key event of a Windows target application according to a set mapping relationship;

[0012] The transfer module is used to transfer the key event to the Windows target application to control the Windows target application.

[0013] Another aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in the above aspect is implemented.

[0014] Another aspect of the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method described in the aforementioned aspect is implemented.

[0015] Another aspect of the present application provides a computer program product on which a computer program is stored. When the program is executed by a processor, the method described in the above aspect is implemented.

[0016] The application's proposed method, device, electronic device, and storage medium for simulating application keys obtain screen touch events of an Android system, map the screen touch events to key events of a Windows target application according to a set mapping relationship, and pass the key events to the Windows target application to control the Windows target application. Based on the set mapping relationship, the Android system's screen touch events are mapped to key events of the Windows target application to simulate the keys of the Windows application running on the Android device, thereby achieving timely and accurate control of the computer application.

[0017] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0019] Figure 1 A schematic diagram of a flow chart of a key simulation method for an application program provided in an embodiment of the present application;

[0020] Figure 2 A schematic diagram of a flow chart of another method for simulating keystrokes of an application program provided in an embodiment of the present application;

[0021] Figure 3 A schematic diagram of the architecture of a key simulation method for an application provided in an embodiment of the present application;

[0022] Figure 4 A schematic diagram of the structure of a key simulation device for an application provided in an embodiment of the present application;

[0023] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0025] The following describes the key simulation method, device, electronic device and storage medium of the application program in the embodiments of the present application with reference to the accompanying drawings.

[0026] Figure 1 A flowchart of a key simulation method for an application provided in an embodiment of the present application.

[0027] The executor of the key simulation method of the application in the embodiment of the present application is the engine of the Windows target application. The engine of the application is set in the key simulation device of the application. The device can be set on an electronic device with an Android operating system installed, such as a smart phone, a smart watch, and a pad, etc., which is not limited in this embodiment.

[0028] like Figure 1 As shown, the method may include the following steps:

[0029] Step 101, obtaining a screen touch event of the Android system.

[0030] In the embodiment of the present application, in an electronic device installed with an Android system, a Windows application is also loaded, wherein the Windows target application is one of the Windows applications. When the electronic device starts the Windows target application, an interactive interface corresponding to the Windows target application is displayed on the screen of the electronic device, and the interactive interface includes a simulated button, and the touch operation of the user on the interactive interface of the screen is obtained to determine the screen touch event related to the Windows target application. The screen touch event can be a click event or a slide event, indicating the key information selected by the user, including the key type, the key state (pressed or released), etc. The key information indicates the information of the control instruction executed on the Windows target application. For example, if the user needs to control the set object in the game to move upward, the detected screen touch event corresponds to the information of the "up" button clicked by the user on the interactive interface of the screen, indicating that a control instruction for controlling the set object in the game application to move upward needs to be generated.

[0031] Step 102: Map the screen touch event to a key event of the Windows target application according to the set mapping relationship.

[0032] In the embodiment of the present application, although the Windows target application can be installed in the Android operating system, it cannot identify the screen touch events of the upper layer of the Android system, that is, it cannot identify which button of the Windows target application corresponds to the touch event of the upper layer of Android. Therefore, the application engine cannot obtain the button information to control the Windows target application. Therefore, according to the operation habits of most users in the Windows target application, the set mapping relationship is determined, and the screen touch events are mapped to the button events of the Windows target application according to the set mapping relationship, so as to accurately capture the button events of the upper layer of Android.

[0033] Step 103: pass the key event to the Windows target application to control the Windows target application.

[0034] In the embodiment of the present application, after determining the key event, the engine of the Windows target application passes the key event to the Windows target application, thereby realizing control over the Windows target application, that is, when the Android system is compatible with the Windows target application, it is realized that the key event of the Android upper layer is passed to the Windows target application running in the Windows engine.

[0035] In the key simulation method of the application in the embodiment of the present application, the screen touch event of the Android system is obtained, and the screen touch event is mapped to the key event of the Windows target application according to the set mapping relationship, and the key event is passed to the Windows target application to control the Windows target application. Based on the set mapping relationship, the screen touch event of the Android system is mapped to the key event of the Windows target application to realize the simulation of the keys of the Windows application running on the Android device, thereby realizing timely and accurate control of the computer application.

[0036] Based on the above embodiments, Figure 2 A flowchart of another method for simulating keystrokes of an application program provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the method comprises the following steps:

[0037] Step 201, installing the Windows target application in the Android system.

[0038] In an embodiment of the present application, a file system environment of a Windows system is created. As an implementation method, chroot technology is used on an Android phone to create an isolated file system environment, and an instruction translation tool is installed in the file system environment; wherein the instruction translation tool is used to translate calls of the Windows system into calls recognizable by the Android system, and then, the Windows target application is installed in the file system environment in which the instruction translation tool is installed, so that the engine corresponding to the Windows target application is built.

[0039] Step 202: Send a service acquisition request to the service manager ServiceManager of the Android system.

[0040] Among them, ServiceManager is a system service in the Android system, which is responsible for managing the life cycle and task stack of applications, where each application can provide at least one service. Therefore, if the engine corresponding to the Windows target application needs to obtain information and services of the Android system, it can communicate with ServiceManager, i.e., Activity Manager Service, through the Binder mechanism to obtain the services provided by the corresponding application, and realize the communication between the Windows target application and the application in the Android system.

[0041] Step 203: Receive the process to which the touch event service to be called belongs, which is sent by ServiceManager.

[0042] Step 204: Send a service call request to the process to call a touch event service to obtain a screen touch event.

[0043] Among them, the service acquisition request is used by the ServiceManager to query the service list to determine the process corresponding to the touch event service to be called. Specifically, the ServiceManager maintains information about at least one service that each process in the system can provide. Before calling the service, the engine corresponding to the Windows target application will first query the ServiceManager for the process information of the service to be called, and then, based on the process information, send a service call request to the process corresponding to the touch event service to call the touch event service to obtain the screen touch events of the Android upper layer, thereby realizing the delivery of the Android upper layer screen touch events to the Windows target application, so that the Windows target application can respond to the key events of the Android system upper layer and realize the control of the Windows target application.

[0044] It should be understood that the process corresponding to the touch event service is the touch event program, that is, the simulated key image program displayed in the Android system. The simulated key image program displays multiple keys that the user can touch. When the user touches each key in the simulated key image program, a screen touch event of the upper layer of the Android system corresponding to the key will be generated.

[0045] Step 205: Obtain operation information of the user on the key mapping option in the interactive interface displayed by the Android system.

[0046] Step 206: Establish a set mapping relationship between the screen touch event of the Android system and the key event of the Windows target application according to the operation information.

[0047] In the embodiment of the present application, an interactive interface will be displayed in the Android system, wherein, as an implementation method, the interactive interface includes at least one button to be touched by the user, and different buttons indicate different control information for the Windows target application. The mapping relationship or corresponding relationship between each button in the simulated button image program and each button recognizable by the Windows target application can be preset, and since different users have different usage habits, in order to meet the touch habits of different users, a touch scheme that meets the user's usage habits can be set, that is, in the interactive interface, or in the mapping interface jumped from the interactive interface, a button mapping option for the user to operate is provided, and the user's operation information on the button mapping option is obtained, and the operation information indicates the user's button mapping strategy, that is, the user selects the button to be mapped in the simulated button image program and which button to map it to among the buttons recognizable by the Windows target application, and according to the operation information, a set mapping relationship between the screen touch event of the Android system and the button event of the Windows target application is established, and the corresponding mapping relationship is set based on the user's needs as the set mapping relationship to meet the needs of different users.

[0048] It should be noted that the interactive interface displayed by the Android system, which can also be called a simulated key image program interface, is an application suitable for the mobile phone layout of the Android system. It can collect the key information touched by the user on the screen and pass the key information to the engine corresponding to the Windows target application.

[0049] Step 207: Map the screen touch event to a key event of the Windows target application according to the set mapping relationship.

[0050] Step 208: pass the key event to the Windows target application to control the Windows target application.

[0051] Among them, step 207 and step 208 can refer to the explanation in the above-mentioned embodiment, and the principles are the same, so they will not be repeated here.

[0052] The application key simulation method of the embodiment of the present application realizes the key simulation of the Windows target application on the Android compatible Windows system, which solves the problem of not being able to accurately capture key events and causing a bad experience when running the Windows target application on an Android phone. At the same time, the user can adjust the keys by himself and control the computer target application by touch, which improves the comfort and convenience of the user when using the computer target application on the mobile phone, improves the utilization rate of the mobile phone, and allows the user to have a better user experience. Based on the above embodiments, Figure 3A schematic diagram of the architecture of a key simulation method for an application provided in an embodiment of the present application, such as Figure 3 As shown, the electronic device is installed with an Android system, a Windows target application is installed in the Android system, and an engine environment of the Windows target application is constructed. Through communication between the Android system and the engine of the Windows target application, the key events of the Android upper layer are mapped and transmitted to the target application running in the engine of the Windows target application, so as to realize key simulation of the Windows target application on an Android phone compatible with the Windows system, wherein the Windows target application is, for example, a game application.

[0053] Install the Windows game application in the Android system. When the Windows game program is started, the screen touch events of the Android upper layer are monitored through the interactive interface on the Android side, that is, the game controller simulation graphical program interface, also known as the screen touch event listener, and the monitored screen touch events are sent to the game controller simulation input controller in the Windows game application startup engine. The controller executes according to the set mapping relationship to map the screen touch events to key events of the Windows game application. When the key events of the Windows game application are monitored through the Windows input event listener, the key events are passed to the Windows game application in the startup engine to control the Windows game application and accurately capture key events. In an environment where Android is compatible with Windows applications, computer game buttons (such as up, down, left, right, etc.) are simulated and displayed on the Android side, and the display layout is similar to that of a game controller, and the buttons of the Windows game application can be set according to user habits. This undoubtedly makes the gaming experience more friendly than on a computer and the operation is smoother than before.

[0054] It should be noted that the relevant explanations in the aforementioned embodiments are also applicable to this embodiment, and the principles are the same, which will not be repeated here.

[0055] In order to implement the above embodiment, the embodiment of the present application also proposes a key simulation device for an application.

[0056] Figure 4 A schematic diagram of the structure of a key simulation device for an application provided in an embodiment of the present application.

[0057] like Figure 4 As shown, the device may include:

[0058] An acquisition module 41 is used to acquire screen touch events of the Android system;

[0059] A mapping module 42, used for mapping the screen touch event to a key event of a Windows target application according to a set mapping relationship;

[0060] The transfer module 43 is used to transfer the key event to the Windows target application to control the Windows target application.

[0061] Furthermore, in an implementation of the embodiment of the present application, the acquisition module 41 is specifically configured to:

[0062] Sending a service acquisition request to the service manager ServiceManager of the Android system; wherein the service acquisition request is used by the ServiceManager to query the service list to determine the process information corresponding to the touch event service to be called;

[0063] Receive the process to which the touch event service to be called belongs, which is sent by the ServiceManager;

[0064] A service call request is sent to the process to call the touch event service to obtain the screen touch event.

[0065] In one implementation of the embodiment of the present application, the device further includes:

[0066] The setting module is used to obtain the user's operation information on the key mapping option in the interactive interface displayed by the Android system; according to the operation information, establish the set mapping relationship between the screen touch event of the Android system and the key event of the Windows target application.

[0067] In one implementation of the embodiment of the present application, the device further includes:

[0068] A building module is used to install the Windows target application in the Android system.

[0069] In one implementation of the embodiment of the present application, the building module is further used to:

[0070] Create a file system environment for Windows system;

[0071] Installing an instruction translation tool in the file system environment; wherein the instruction translation tool is used to translate calls of the Windows system into calls recognizable by the Android system;

[0072] The Windows target application is installed in the file system environment where the instruction translation tool is installed.

[0073] It should be noted that the above explanation of the method embodiment is also applicable to the device of this embodiment, and will not be repeated here.

[0074] In the key simulation device of the application in the embodiment of the present application, the screen touch event of the Android system is obtained, and the screen touch event is mapped to the key event of the Windows target application according to the set mapping relationship, and the key event is passed to the Windows target application to control the Windows target application. Based on the set mapping relationship, the screen touch event of the Android system is mapped to the key event of the Windows target application to realize the simulation of the keys of the Windows application running on the Android device, thereby realizing the control of the computer application.

[0075] In order to implement the above embodiments, the present application also proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in the above method embodiments is implemented.

[0076] In order to implement the above embodiments, the present application also proposes a non-temporary computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method described in the above method embodiments is implemented.

[0077] In order to implement the above embodiments, the present application also proposes a computer program product on which a computer program is stored. When the computer program is executed by a processor, the method described in the above method embodiments is implemented.

[0078] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a message transceiver device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0079] Reference Figure 5 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0080] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0081] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0082] The power component 806 provides power to the various components of the electronic device 800. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.

[0083] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0084] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0085] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0086] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0087] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0088] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0089] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0090] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0091] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0092] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0093] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0094] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0095] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0096] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0097] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A method for simulating keystrokes of an application, characterized in that: include: Get the screen touch events of the Android system; According to the set mapping relationship, the screen touch event is mapped to a key event of the Windows target application; The key event is transmitted to the Windows target application to control the Windows target application.

2. The method according to claim 1, characterized in that The step of obtaining the screen touch event of the Android system includes: Sending a service acquisition request to the service manager ServiceManager of the Android system; wherein the service acquisition request is used by the ServiceManager to query the service list to determine the process information corresponding to the touch event service to be called; Receive the process to which the touch event service to be called belongs, which is sent by the ServiceManager; A service call request is sent to the process to call the touch event service to obtain the screen touch event.

3. The method according to claim 1, characterized in that Before mapping the screen touch event to a key event of the Windows target application according to the set mapping relationship, the method includes: Get the user's operation information on the key mapping options in the interactive interface displayed by the Android system; According to the operation information, the set mapping relationship between the screen touch event of the Android system and the key event of the Windows target application is established.

4. The method according to claim 1, characterized in that Before obtaining the screen touch event of the Android system, the following steps are included: Install the Windows target application in the Android system.

5. The method according to claim 2, characterized in that The step of installing the Windows target application in the Android system comprises: Create a file system environment for Windows system; Installing an instruction translation tool in the file system environment; wherein the instruction translation tool is used to translate calls of the Windows system into calls recognizable by the Android system; The Windows target application is installed in the file system environment where the instruction translation tool is installed.

6. A key simulation device for an application, characterized in that: include: Acquisition module, used to obtain screen touch events of Android system; A mapping module, used for mapping the screen touch event to a key event of a Windows target application according to a set mapping relationship; The transfer module is used to transfer the key event to the Windows target application to control the Windows target application.

7. The device according to claim 6, characterized in that The acquisition module is specifically used for: Sending a service acquisition request to the service manager ServiceManager of the Android system; wherein the service acquisition request is used by the ServiceManager to query the service list to determine the process information corresponding to the touch event service to be called; Receive the process to which the touch event service to be called belongs, which is sent by the ServiceManager; A service call request is sent to the process to call the touch event service to obtain the screen touch event.

8. The device according to claim 6, characterized in that The device further comprises: The setting module is used to obtain the user's operation information on the key mapping selection interface displayed on the Android system; according to the operation information, establish the set mapping relationship between the screen touch event of the Android system and the key event of the Windows target application.

9. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1 to 5 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Method for utilizing shoes as computer peripheral in place of keyboard and mouse and implementation device

    CN102722248A

  • Method and apparatus for starting windows program by android

    CN106371858A

  • System and method for pushing Windows application to Android

    CN107197047A

  • Cross-system program starting method and electronic equipment

    CN111273948A

  • Application program control method and device, electronic equipment and medium

    CN112286667A