Method and device for using combination keys based on cloud application and storage medium
Patent Information
- Application Number
- CN202411350931.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-01-14
AI Technical Summary
In a virtual machine, blocked control keys cannot be combined with other keys, affecting the user experience.
The effective use of key combinations is achieved by recording the key combinations that the virtual machine needs to use in the whitelist, and emulating these key combinations in the virtual machine, listening and processing keyboard events in response to the masked control keys.
Responding to key combinations composed of blocked control keys on the virtual machine improves the user experience, simple and efficient operation, no need to modify the keyboard transmission process, just adjust the whitelist.
Smart Images

Figure CN119311370A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication terminal operation, and in particular to a method, device and storage medium for using a combination key based on a cloud application. Background Art
[0002] Cloud applications are designed to run application screens in virtual machines in local systems, allowing users to feel as if they are operating applications on their own machines. The technology of cloud applications is to transfer the system screen in the virtual machine to the local system and display the window area of the application in the virtual machine in the local system, so as to achieve the effect of running the application in the virtual machine on the local system.
[0003] In order to ensure the effectiveness of cloud applications, when using function keys, it is necessary to block (intercept) the control keys of system functions on the virtual machine to avoid a bad experience of using two systems at the same time; for example, the start menu, taskbar functions, lock screen, etc., if not intercepted, will make users feel the existence of two systems, affecting the user experience.
[0004] However, some application key combinations use the control keys of local system functions. For example, the win key is the control key of the local system function that the virtual machine wants to block. Blocking the win key will make the key combinations (such as win+e, win+r) unable to respond on the virtual machine. Summary of the invention
[0005] In view of the defects existing in the prior art, the technical problem solved by the present invention is: how to respond to a combination key used in conjunction with other keys of a blocked control key on a virtual machine.
[0006] To achieve the above objectives, in the first aspect, an embodiment of the present application provides a method for using combination keys based on cloud applications, the method comprising the following steps: adding combination keys that the virtual machine needs to use and includes control keys to a whitelist; after monitoring the combination keys in the whitelist, simulating the combination keys in the virtual machine.
[0007] In combination with the first aspect, in one embodiment, after monitoring the combination key in the whitelist, the process of simulating the combination key in the virtual machine includes: after monitoring the combination key in the whitelist being lifted, marking the combination key as a combination key to be simulated, and pressing and lifting the combination key to be simulated in the virtual machine.
[0008] In combination with the first aspect, in one embodiment, the process of monitoring the combination keys in the whitelist also includes: after monitoring the virtual machine system pressing a control key that needs to be blocked, marking the control key for blocking, and controlling the virtual machine to not respond to the control key with the blocking mark; after monitoring the virtual machine system lifting the control key, clearing the blocking mark of the control key.
[0009] In combination with the first aspect, in one implementation, after monitoring the key combination in the whitelist, the process of simulating the key combination in the virtual machine specifically includes:
[0010] After monitoring keyboard events, if the key press includes a control key that needs to be blocked, determine the type of keyboard event:
[0011] If a key is pressed, the key is marked as blocked, and the control virtual machine does not respond to the control key marked as blocked;
[0012] If the key is lifted, the shielding mark of the control key is cleared. If the key in the keyboard event hits the key combination in the whitelist, the key combination is marked to be simulated. After the control virtual machine simulates the key combination, the mark to be simulated of the key combination is cleared.
[0013] In combination with the first aspect, in one implementation, the combination key specifically includes a control key and a non-control key; the non-control key includes a numeric key, a symbol key, a letter key and a navigation key.
[0014] In combination with the first aspect, in one implementation, the numeric keys include 0 to 9, the letter keys include a to z, and the navigation keys include home, end, pageup, and pagedown.
[0015] In combination with the first aspect, in one implementation, the monitoring process includes: monitoring key events of the local system through a keyboard key monitoring interface and sending the key events to the virtual machine.
[0016] In a second aspect, an embodiment of the present application provides a system for using a combination key based on a cloud application, the system being arranged on a virtual machine, and characterized in that the system comprises:
[0017] A whitelist setting module, which is used to: implement the step of adding a key combination including a control key that is required to be used by the virtual machine to the whitelist provided in the first aspect;
[0018] The key combination simulation module is used to: implement the step of simulating the key combination in the virtual machine after monitoring the key combination in the white list provided in the first aspect.
[0019] In a third aspect, an embodiment of the present application provides a device for using combination keys based on cloud applications, wherein the device for using combination keys based on cloud applications comprises a processor, a memory, and a program for using combination keys based on cloud applications stored in the memory and executable by the processor, wherein when the program for using combination keys based on cloud applications is executed by the processor, the method provided in the first aspect is implemented.
[0020] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which is stored a program for using combination keys based on cloud applications, and when the computer program is executed, the method provided in the first aspect is implemented.
[0021] Compared with the prior art, the advantages of the present invention are:
[0022] The present invention realizes responding to key combinations consisting of shielded control keys on the virtual machine by recording a white list of key combinations used by the virtual machine and simulating the key combinations hitting the white list on the virtual machine.
[0023] At the same time, the above method does not need to modify the keyboard transmission process from the local system to the virtual system. The modification of the combination key only needs to adjust the whitelist. The operation is simple and efficient, and the user experience is good. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1 A flowchart of a method for using a combination key based on a cloud application in an embodiment of the present invention;
[0026] Figure 2 This is a schematic diagram of the hardware structure of a device using combination keys based on cloud applications involved in the embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0028] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0029] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0030] In a first aspect, an embodiment of the present application provides a method for using a combination key based on a cloud application, the method comprising the steps of:
[0031] (1) Create a virtual machine using the key combination that includes the control key and add it to the whitelist.
[0032] (2) After monitoring the key combination in the whitelist, simulate the key combination in the virtual machine.
[0033] It can be seen that the present invention achieves responding to key combinations consisting of blocked control keys on the virtual machine by recording a white list of key combinations used by the virtual machine and simulating the key combinations hitting the white list on the virtual machine.
[0034] At the same time, the above method does not need to modify the keyboard transmission process from the local system to the virtual system. The modification of the combination key only needs to adjust the whitelist. The operation is simple and efficient, and the user experience is good.
[0035] In one embodiment, the key combination including the control key specifically includes a control key and a non-control key;
[0036] Control keys include win key, alt key and fn key;
[0037] Non-control keys include numeric keys (0-9), symbol keys, letter keys (a-z) and navigation keys (home, end, pageup, pagedown);
[0038] It should be noted that the above control keys may not include the ctrl key, because the ctrl key is generally not used as a combination key for system functions.
[0039] In one embodiment, the monitoring process in the above method includes: monitoring key events of the local system through a keyboard key monitoring interface and sending the key events to the virtual machine.
[0040] In one embodiment, after the combination key in the whitelist is monitored in the above method, the process of simulating the combination key in the virtual machine includes: after monitoring the combination key in the whitelist being lifted, marking the combination key as a combination key to be simulated, and pressing and lifting the combination key to be simulated in the virtual machine.
[0041] At the same time, in order to cooperate with the control keys that need to be blocked, the process of monitoring the combination keys in the whitelist in the above method also includes: after monitoring the virtual machine system pressing the control key that needs to be blocked, marking the control key for blocking (for example, marking it as 1), and controlling the virtual machine not to respond to the control key with the blocking mark; after monitoring the virtual machine system lifting the control key, clearing the blocking mark of the control key.
[0042] The above method is explained below in terms of timing through a specific embodiment.
[0043] First, the transmission process of local keyboard events is explained.
[0044] After a keyboard event is triggered locally (a key is pressed and then released), the local system sends the keyboard event to the virtual machine, the virtual machine simulates the keyboard event to the virtual system, and the virtual machine distributes the keyboard event to specific applications.
[0045] In the above process, the virtual machine calls the monitoring interface to monitor keyboard events and calls the interception interface to intercept the control keys that need to be blocked.
[0046] On this basis, see Figure 1 As shown, the process of the above method includes:
[0047] S1: Add all key combinations that are required to create a virtual machine, including the control key, to the whitelist.
[0048] S2: Set the shielding mark (1) and the to-be-simulated mark (0), as well as the corresponding operations; the shielding mark indicates that the corresponding key needs to be intercepted, and the to-be-simulated mark indicates that the corresponding key needs to be triggered.
[0049] S3: After listening to the keyboard event, determine the type of key in the keyboard event:
[0050] If the keys include control keys that need to be shielded, go to S4;
[0051] If the key is any other key, no processing is performed and the process goes to S3.
[0052] S4: Determine the type of keyboard event: if it is a key press, go to S5; if it is a key release, go to S6.
[0053] S5: Mark the key as blocked (1), control the virtual machine not to respond to the control key with the block mark, and go to S3.
[0054] S6: Clear the shielding mark of the control key, and determine whether the key in the keyboard event hits the combination key in the whitelist. If so, go to S7, otherwise go to S3.
[0055] S7: The key combination is marked as pending simulation (0) and forwarded to the virtual machine system. After the virtual machine simulates the key combination, the pending simulation mark of the key combination is cleared. At this point, the process of monitoring the response of the key combination in the whitelist on the virtual machine ends.
[0056] It should be noted that if a key is pressed in S4, then normally, the key will be lifted afterwards.
[0057] The win+e key combination is monitored and then released. When win+e is pressed, win is marked as shielded to prevent response. When win+e is released, the shielding mark is cleared first, and then the simulated mark is performed to respond.
[0058] In a second aspect, an embodiment of the present application further provides a system for using combination keys based on cloud applications, which is arranged on a virtual machine and is used to implement the method mentioned in the first aspect.
[0059] Specifically, the system includes:
[0060] The whitelist setting module is used to: implement the steps of creating a virtual machine in the above method and including a key combination including a control key, and adding it to the whitelist.
[0061] The key combination simulation module is used to: implement the step of simulating the key combination in the virtual machine after monitoring the key combination in the white list mentioned in the above method.
[0062] Among them, the functional implementation of each module in the above-mentioned device for using combination keys based on cloud applications corresponds to the steps in the above-mentioned method embodiment for using combination keys based on cloud applications, and its functions and implementation processes will not be repeated here one by one.
[0063] In a third aspect, an embodiment of the present application provides a device that uses combination keys based on cloud applications. The device that uses combination keys based on cloud applications can be a personal computer (PC), a laptop computer, a server, or other device with data processing capabilities.
[0064] Reference Figure 2 , Figure 2 The hardware structure diagram of the device for using key combinations based on cloud applications involved in the embodiment of the present application is shown in FIG. In the embodiment of the present application, the device for using key combinations based on cloud applications may include a processor, a memory, a communication interface, and a communication bus.
[0065] The communication bus may be of any type and is used to interconnect the processor, the memory, and the communication interface.
[0066] The communication interface includes an input / output (I / O) interface, a physical interface, and a logical interface, etc., which are used to interconnect devices inside a device that uses a combination key based on a cloud application, and an interface that interconnects a device that uses a combination key based on a cloud application with other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, an optical fiber interface, an ATM interface, etc.; the user device can be a display, a keyboard, etc.
[0067] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0068] The processor may be a general-purpose processor, and the general-purpose processor may call the program based on the cloud application using the combination key stored in the memory, and execute the method based on the cloud application using the combination key provided in the embodiment of the present application. For example, the general-purpose processor may be a central processing unit (CPU). The method executed when the program based on the cloud application using the combination key is called may refer to the various embodiments of the method based on the cloud application using the combination key of the present application, and will not be repeated here.
[0069] Those skilled in the art will understand that Figure 2 The hardware structure shown in the figure does not constitute a limitation on the present application, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0070] In a fourth aspect, an embodiment of the present application also provides a computer-readable storage medium.
[0071] The computer-readable storage medium of the present application stores a program for using combination keys based on cloud applications, wherein when the program for using combination keys based on cloud applications is executed by a processor, the steps of the method for using combination keys based on cloud applications as described above are implemented.
[0072] Among them, the method implemented when the program based on cloud application using combination keys is executed can refer to the various embodiments of the method based on cloud application using combination keys in this application, and will not be repeated here.
[0073] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.
[0074] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.
[0075] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.
[0076] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.
[0077] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.
[0078] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.
[0079] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.
[0080] The above are only specific implementations of the embodiments of the present invention, but the protection scope of the embodiments of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the embodiments of the present invention, and these modifications or replacements should be included in the protection scope of the embodiments of the present invention. Therefore, the protection scope of the embodiments of the present invention shall be based on the protection scope of the claims.
Claims
1. A method for using a combination key based on a cloud application, characterized in that: The method comprises the following steps: adding a key combination including a control key that is needed by the virtual machine to a white list; and simulating the key combination in the virtual machine after monitoring the key combination in the white list.
2. The method for using a combination key based on a cloud application according to claim 1, characterized in that: After the key combination in the white list is monitored, the process of simulating the key combination in the virtual machine includes: after the key combination in the white list is monitored to be lifted, the key combination is marked as a key combination to be simulated, and the key combination to be simulated is pressed and then lifted in the virtual machine.
3. The method for using a combination key based on a cloud application according to claim 2, characterized in that: The process of monitoring the combination key in the whitelist also includes: after monitoring the virtual machine system pressing the control key that needs to be blocked, marking the control key for blocking, and controlling the virtual machine not to respond to the control key with the blocking mark; after monitoring the virtual machine system lifting the control key, clearing the blocking mark of the control key.
4. The method for using a combination key based on a cloud application according to claim 3, characterized in that: After the key combination in the whitelist is monitored, the process of simulating the key combination in the virtual machine specifically includes: After monitoring keyboard events, if the key press includes a control key that needs to be blocked, determine the type of keyboard event: If a key is pressed, the key is marked as blocked, and the control virtual machine does not respond to the control key marked as blocked; If the key is lifted, the shielding mark of the control key is cleared. If the key in the keyboard event hits the key combination in the whitelist, the key combination is marked to be simulated. After the control virtual machine simulates the key combination, the mark to be simulated of the key combination is cleared.
5. The method for using a combination key based on a cloud application according to any one of claims 1 to 4, characterized in that: The combination keys specifically include control keys and non-control keys; the non-control keys include numeric keys, symbol keys, letter keys and navigation keys.
6. The method for using a combination key based on a cloud application according to claim 5, characterized in that: The number keys include 0 to 9, the letter keys include a to z, and the navigation keys include home, end, pageup and pagedown.
7. The method for using a combination key based on a cloud application according to any one of claims 1 to 4, characterized in that: The monitoring process includes: monitoring the key events of the local system through the keyboard key monitoring interface and sending the key events to the virtual machine.
8. A system for using a combination key based on a cloud application, the system being arranged on a virtual machine, characterized in that: The system includes: A whitelist setting module, which is used to: implement the step of adding a combination of keys including a control key required for use by the virtual machine to the whitelist as described in any one of claims 1 to 7; A key combination simulation module is used to: implement the step of simulating the key combination in a virtual machine after monitoring the key combination in a white list as described in any one of claims 1 to 7.
9. A device using a combination key based on a cloud application, characterized in that: The device for using combination keys based on cloud applications includes a processor, a memory, and a program for using combination keys based on cloud applications stored in the memory and executable by the processor, wherein when the program for using combination keys based on cloud applications is executed by the processor, the steps of the method for using combination keys based on cloud applications as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program for using combination keys based on cloud applications, wherein when the program for using combination keys based on cloud applications is executed, the steps of the method for using combination keys based on cloud applications as described in any one of claims 1 to 7 are implemented.