Multifunctional virtual keyboard input method
By extending the ability interface of input method management services, a unified virtual keyboard UI service is provided, which solves the problem of virtual keyboard input in domestic Linux systems, realizes the unified processing of physical keyboards and virtual keyboards, simplifies the functions of virtual keyboard UI services and provides a variety of interactive methods.
Patent Information
- Application Number
- CN202510104660.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-02-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Domestic Linux systems lack common virtual keyboard input methods. The existing virtual keyboard programs cannot support Chinese input and other languages, and cannot be compatible with the existing input method engine.
By extending the capability interface for input method management services, a unified virtual keyboard UI service is provided, and IPC communication is used to interact with input method management services and virtual keyboard UI proxy module, supporting unified processing of physical keyboards and virtual keyboards.
It realizes the ability to provide virtual keyboard input without modifying the existing input method engine, solves the problem of virtual keyboard input in domestic Linux systems, and simplifies the functions of virtual keyboard UI services, and provides a variety of ways to display and hide virtual keyboards.
Smart Images

Figure CN119536530A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a multifunctional virtual keyboard input method. Background Art
[0002] With the advancement of Linux localization, localized Linux systems are gradually applied to a variety of devices. Among these devices, some only support input devices such as touch screens, but not physical keyboards; some devices have available physical keyboards, but some keys on the keyboard may be invalid; some devices are two-in-one devices, and their physical keyboards can be separated from the device body. Therefore, localized Linux systems need a new input method.
[0003] Among the methods for inputting without using a physical keyboard, using a virtual keyboard for inputting is a feasible method.
[0004] The reality is that the domestically produced Linux system is a traditional PC system, not designed for mobile devices. Therefore, there is no dedicated virtual keyboard input method available in the system.
[0005] Therefore, in Linux systems, there is generally a built-in program called onboard and a virtual keyboard program built into the fcitx input method framework.
[0006] As for the onboard program, it is a virtual keyboard that can send simulated key events. From the perspective of input method, its function is the same as that of a physical keyboard. That is, when users use onboard to input Chinese, the onboard program and the Chinese input method input window will coexist on the user's screen, which is not a good user experience.
[0007] As for the virtual keyboard program built into the fcitx input method framework, this program is just a virtual keyboard that can input various symbols. It cannot input other languages such as Chinese, and its scope of use is relatively limited.
[0008] In addition, there is a virtual keyboard provided by Qt. As far as the virtual keyboard provided by Qt is concerned, this virtual keyboard can only be used by the Qt program that has the virtual keyboard built in, and cannot be used by other programs, and cannot provide good compatibility.
[0009] Finally, there is a situation where a certain input method program has its own built-in virtual keyboard. This virtual keyboard can usually only be used for the input method program and is relatively limited in scope of use.
[0010] That is, there is an urgent need for a universal virtual keyboard input method and device, so that the original physical keyboard input method in the domestic Linux system can support virtual keyboard input without modification and support future newly added input method engines. Summary of the invention
[0011] To solve the above problems, the present invention provides a multifunctional virtual keyboard input method, which adopts the following technical solutions: A multifunctional virtual keyboard input method, comprising: The user requests the input method management service to display the virtual keyboard; The input method management service determines whether the default working mode is the physical keyboard input mode; If not, the input method management service requests the virtual keyboard UI service to display the virtual keyboard window; The user selects a target input method through the virtual keyboard window, and the virtual keyboard UI service requests the input method management service to set the current input method as the target input method through IPC communication, where the target input method is one of the input methods installed and enabled on the current computer; The user triggers a key event through the virtual keyboard window, and the virtual keyboard UI service passes the key event to the input method management service through IPC communication; The input method management service processes the key event to obtain candidate results, and transmits the candidate results to the virtual keyboard UI service through IPC communication. The UI interface provided by the virtual keyboard UI service displays the candidate results, and the candidate results include multiple candidate words; The user determines a candidate word from the candidate results; The virtual keyboard UI service sends the index value corresponding to the candidate word to the input method management service; The input method management service finds the corresponding candidate word through the index value and submits it to the application.
[0012] In another possible implementation, the input method management service determines whether the default working mode is the physical keyboard input mode, including: The input method management service determines whether the default working mode is the physical keyboard input mode by detecting whether there is an available physical keyboard in the peripherals connected to the computer; When there is an available physical keyboard, determining that the default working mode is the physical keyboard input mode; When there is no available physical keyboard, it is determined that the default operating mode is not the physical keyboard input mode.
[0013] In another possible implementation, the input method management service includes a virtual keyboard UI proxy module, and the input method management service requests the virtual keyboard UI service to display a virtual keyboard window, including: The virtual keyboard UI agent module in the input method management service requests the virtual keyboard UI service to display the virtual keyboard window.
[0014] In another possible implementation, the input method management service includes a virtual keyboard UI proxy module, an input method context module, and an input method engine interface module, and the virtual keyboard UI service requests the input method management service to set the current input method as the target input method through IPC communication, including: The virtual keyboard UI service requests the virtual keyboard UI proxy module in the input method management service to set the current input method as the target input method through IPC communication; The input method context module obtains the interface of the target input method from the input method engine interface module, and provides the interface to the virtual keyboard UI proxy module; The virtual keyboard UI agent module communicates with the target input method engine through the interface provided by the input method context module.
[0015] In another possible implementation, the input method management service includes a virtual keyboard UI proxy module, an input method context module, and an input method engine interface module, and the virtual keyboard UI service transmits the key event to the input method management service through IPC communication, including: The virtual keyboard UI service transmits the key events to the virtual keyboard UI proxy module through IPC communication; The virtual keyboard UI proxy module forwards the key events to the input method context module; The input method context module sends the key events to the input method engine interface module.
[0016] In another possible implementation, the input method management service processes the key event, obtains a candidate result, and transmits the candidate result to the virtual keyboard UI service through IPC communication, including: The input method engine interface module in the input method management service processes the key events to obtain candidate results, and transmits the candidate results to the virtual keyboard UI proxy module through the input method context module; The virtual keyboard UI proxy module collects candidate results and transmits the candidate results to the virtual keyboard UI service through IPC communication.
[0017] In another possible implementation, the method further includes: When the user requests the input method management service to hide the virtual keyboard, the input method management service determines whether the default working mode is the physical keyboard input mode; If not, the input method management service requests the virtual keyboard UI service to hide the virtual keyboard window; If so, the user hides the virtual keyboard window through the virtual keyboard floating button, the virtual keyboard tray icon, or the virtual keyboard window close button.
[0018] In summary, this application includes the following beneficial technical effects: This application expands the capability interface of the input method management service so that a unified virtual keyboard UI service can be used to use the input method engine that already exists in the system, thereby realizing the ability to provide virtual keyboard input without changing the existing input method engine, and solving the problem of no available virtual keyboard in the domestic Linux system.
[0019] By extending the capability interface of the input method management service, the modification of the existing input method engine is avoided, so that the input method engine does not need to distinguish the source of key events, and uniformly handles physical keyboard key events and virtual keyboard key events.
[0020] This application simplifies the functions of the virtual keyboard UI service in the prior art, so that it only needs to perform IPC communication with the input method management service to support multiple input method engines already available in the domestic Linux system, solving the problem of needing to develop a dedicated input method engine for the virtual keyboard UI service.
[0021] The present application also provides multiple ways to display and hide the virtual keyboard, an automated control method for automatically displaying the virtual keyboard by clicking on the application input box and automatically hiding the virtual keyboard by clicking on the non-input box area of the application window, a method for forcing the display of the virtual keyboard through a virtual keyboard floating button or a virtual keyboard tray icon, and a method for closing the virtual keyboard by clicking on the virtual keyboard floating button or the virtual keyboard tray icon and the close button of the virtual keyboard window itself. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a schematic diagram of the framework structure of a multifunctional virtual keyboard input method in an embodiment of the present application. DETAILED DESCRIPTION
[0023] The present application is further described in detail below in conjunction with the accompanying drawings.
[0024] After reading this specification, those skilled in the art may make non-creative modifications to this embodiment as needed, but such modifications are protected by patent law as long as they are within the scope of the claims of this application.
[0025] 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 creative work are within the scope of protection of this application.
[0026] In addition, the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article, unless otherwise specified, generally means that the associated objects before and after are in an "or" relationship.
[0027] The embodiments of the present application are further described in detail below in conjunction with the drawings in the specification.
[0028] The present application embodiment provides a multifunctional virtual keyboard input method, such as Figure 1 As shown, the method is implemented by interconnected applications, input method management services and virtual keyboard UI services, wherein the input method management service specifically includes: an input method context module, a virtual keyboard UI proxy module and an input method engine interface module. The input method context module is connected to the virtual keyboard UI proxy module and the input method engine interface module respectively, wherein: The input method context module can be understood as an information container, which contains all the information related to an application using the input method service (including: the identity information of the application, the input method used by the current application, and other necessary information). Each application has a corresponding input method context module in the input method management service; The virtual keyboard UI proxy module is used to implement the communication between the virtual keyboard UI service and the application, and the communication between the virtual keyboard UI service and the input method engine; The input method engine interface module contains multiple input method engines, including Sogou Pinyin input method, Sogou Wubi input method, iFlytek input method and other input method engines that have been installed and enabled in the system.
[0029] Specifically, the present application provides a multifunctional virtual keyboard input method as follows: Step S1: The user requests the input method management service to display a virtual keyboard. For the embodiment of the present application, the user can request the input method management service to display the virtual keyboard through the application, or can force the virtual keyboard to be displayed by clicking the virtual keyboard tray icon and the virtual keyboard floating button; Furthermore, when the input method management service detects that there is an available physical keyboard on the current computer, the user can only force the virtual keyboard to be displayed through the virtual keyboard tray icon or the virtual keyboard floating button.
[0030] Step S2: The input method management service determines whether the default working mode is the physical keyboard input mode.
[0031] For the embodiment of the present application, the input method management service detects whether there is an available physical keyboard in the peripherals connected to the computer to determine whether the default working mode is the physical keyboard input mode. When there is an available physical keyboard, the default working mode is the physical keyboard input mode, and when it does not exist, the default working mode is not the physical keyboard input mode, that is, the default working mode is the virtual keyboard input mode; Furthermore, when the connection state between the physical keyboard and the computer changes, the working mode of the input method management service will switch to a corresponding state; Furthermore, following the content in step S1, when there is an available physical keyboard, when the user forces the display of the virtual keyboard, the working mode of the input method management service will also switch to the virtual keyboard input mode; when there is no available physical keyboard, the working mode of the input method management service is the virtual keyboard input mode, if the user again performs the operation of forcing the display of the virtual keyboard and hiding the virtual keyboard, the working mode of the input method management service will not change and will remain in the virtual keyboard input mode. The user forcing the display of the virtual keyboard refers to the user actively displaying the virtual keyboard through the virtual keyboard tray icon or the virtual keyboard floating button; Furthermore, when the user forcibly hides the virtual keyboard, the working mode of the input method management service is different depending on the display method of the virtual keyboard. Specifically: when the default working mode of the input method management service is the virtual keyboard input mode, when the user again forces the virtual keyboard to be displayed and hides the virtual keyboard, the working mode of the input method management service is still the virtual keyboard input mode; and when the default working mode of the input management service is the physical keyboard input mode, when the user forcibly displays the virtual keyboard, the working mode of the input method management service is switched from the physical keyboard input mode to the virtual keyboard input mode. If the virtual keyboard continues to be hidden, the working mode of the input method management service will be switched from the virtual keyboard input mode to the physical keyboard input mode.
[0032] Step S3: If not, the input method management service requests the virtual keyboard UI service to display a virtual keyboard window.
[0033] For the embodiment of the present application, when the working mode is the virtual keyboard input mode, the virtual keyboard UI agent module in the input method management service requests the virtual keyboard UI service to display the virtual keyboard window.
[0034] Furthermore, when the working mode is the physical keyboard input mode, the virtual keyboard UI proxy module in the input method management service will not request the virtual keyboard UI service to display the virtual keyboard window.
[0035] Step S4: the user selects a target input method through the virtual keyboard window provided by the virtual keyboard UI service, and the virtual keyboard UI service requests the input method management service to set the current input method as the target input method through IPC communication.
[0036] For the embodiment of the present application, the target input method is one of the input methods that have been installed and enabled on the current computer, for example, the pinyin input method or the wubi input method. The pinyin input method can be the sogou pinyin input method or the iflytek pinyin input method. The wubi input method is the same as above and will not be described in detail. Specifically, After the user selects the target input method through the virtual keyboard window, the virtual keyboard UI service requests the virtual keyboard UI proxy module in the input method management service to set the current input method as the target input method through IPC communication. The input method context module obtains the interface of the target input method from the input method engine interface module and provides the interface to the virtual keyboard UI proxy module. Then the virtual keyboard UI proxy module communicates with the target input method engine through the interface provided by the input method context module, thereby activating the target input method and achieving the effect of setting the target input method.
[0037] Step S5: The user triggers a key event through the virtual keyboard window, and the virtual keyboard UI service transmits the key event to the input method management service through IPC communication; Step S6: The input method management service processes the key event to obtain candidate results, and transmits the candidate results to the virtual keyboard UI service through IPC communication. The UI interface provided by the virtual keyboard UI service displays the candidate results.
[0038] For the embodiment of the present application, the specific implementation process of step S5 and step S6 is as follows: The user triggers a key event by pressing a letter on the virtual keyboard; The virtual keyboard UI service will pass the key events to the virtual keyboard UI proxy module through IPC communication; The virtual keyboard UI proxy module forwards the key events to the input method context module; The input method context module sends the key event to the input method engine interface module; The input method engine interface module in the input method management service processes the key events to obtain candidate results, and transmits the candidate results to the virtual keyboard UI proxy module through the input method context module; The virtual keyboard UI proxy module collects candidate results and transmits the candidate results to the virtual keyboard UI service through IPC communication.
[0039] Furthermore, when the user clicks some control characters (such as arrow keys, delete keys, and space keys, etc.), the input method management service will not generate candidate results after processing the key events generated by such control characters, but will directly forward these control characters to the application, thereby achieving the purpose of controlling the cursor position or deleting characters.
[0040] Step S7: The user determines a candidate word from the candidate results.
[0041] For the embodiment of the present application, the candidate results are displayed on the virtual keyboard window, and the candidate results include multiple candidate words. The user can click on the candidate word to determine the candidate word, or can use the keys defined by the input method engine itself to achieve the purpose of determining the candidate word. For example, some input methods can determine the candidate word through the numeric keypad of the virtual keyboard itself, and can also determine the candidate word through the arrow keys; Furthermore, when the candidate words required by the user do not exist among the candidate words displayed in the current candidate results, that is, when the user needs to turn pages of candidate words, the user can find the required candidate words according to the keys corresponding to the page turning or obtaining more candidate words functions defined by the input method engine itself.
[0042] Step S8, the virtual keyboard UI service sends the index value corresponding to the candidate word to the input method management service; Step S9: The input method management service finds the corresponding candidate word through the index value and submits it to the application.
[0043] For the embodiment of the present application, each candidate word in the candidate result has a corresponding index value, and the input method context module in the input method management service temporarily stores a preset number of candidate words. When the user selects a candidate word, the virtual keyboard UI service sends the index value corresponding to the candidate word to the virtual keyboard UI proxy module in the input method management service, and then the virtual keyboard UI proxy module sends the index value to the input method context module. The input method context module searches for the index value in the index values corresponding to the temporarily stored candidate words. If the index value is found, the input method context module submits the candidate word corresponding to the index value to the application; If not found, the input method context module forwards the index value to the input method engine interface module, which contains the engine interface of the target input method. Therefore, in this case, the target input method's own input window will be displayed (at this time, the role of the virtual keyboard is equivalent to onboard), and the target input method engine will find the corresponding candidate word based on the index value and submit it to the input method context module. Finally, the input method context module submits the candidate word to the application, thereby completing the display of the multi-functional virtual keyboard and the user's specific usage process.
[0044] Furthermore, the present application also includes a method for hiding the multi-functional virtual keyboard, as follows: When the user requests the input method management service to hide the virtual keyboard, the input method management service determines whether it is the physical keyboard input mode according to the default working mode. The user can request the input method management service to hide the virtual keyboard through the application, or can force hiding the virtual keyboard by clicking the virtual keyboard tray icon and the virtual keyboard floating button; If not, the input method management service requests the virtual keyboard UI service to hide the virtual keyboard window; If so, the user hides the virtual keyboard window through the virtual keyboard floating button, the virtual keyboard tray icon, or the close button of the virtual keyboard window.
[0045] This application expands the capability interface of the input method management service so that a unified virtual keyboard UI service can be used to use the input method engine that already exists in the system, thereby realizing the ability to provide virtual keyboard input without changing the existing input method engine, and solving the problem of no available virtual keyboard in the domestic Linux system.
[0046] By extending the capability interface of the input method management service, the modification of the existing input method engine is avoided, so that the input method engine does not need to distinguish the source of key events, and uniformly handles physical keyboard key events and virtual keyboard key events.
[0047] This application simplifies the functions of the virtual keyboard UI service in the prior art, so that it only needs to perform IPC communication with the input method management service to support multiple input method engines already available in the domestic Linux system, solving the problem of needing to develop a dedicated input method engine for the virtual keyboard UI service.
[0048] The present application also provides multiple ways to display and hide the virtual keyboard, an automated control method for automatically displaying the virtual keyboard by clicking on the application input box and automatically hiding the virtual keyboard by clicking on the non-input box area of the application window, a method for forcing the display of the virtual keyboard through a virtual keyboard floating button or a virtual keyboard tray icon, and a method for closing the virtual keyboard by clicking on the virtual keyboard floating button, the virtual keyboard tray icon, and the close button of the virtual keyboard UI itself.
[0049] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0050] The above are only some implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A multifunctional virtual keyboard input method, characterized in that: include: The user requests the input method management service to display the virtual keyboard; The input method management service determines whether the default working mode is the physical keyboard input mode; If not, the input method management service requests the virtual keyboard UI service to display the virtual keyboard window; The user selects a target input method through the virtual keyboard window, and the virtual keyboard UI service requests the input method management service to set the current input method as the target input method through IPC communication, where the target input method is one of the input methods installed and enabled on the current computer; The user triggers a key event through the virtual keyboard window, and the virtual keyboard UI service transmits the key event to the input method management service through IPC communication; The input method management service processes the key event to obtain candidate results, and transmits the candidate results to the virtual keyboard UI service through IPC communication. The UI interface provided by the virtual keyboard UI service displays the candidate results, and the candidate results include multiple candidate words; The user determines a candidate word from the candidate results; The virtual keyboard UI service sends the index value corresponding to the candidate word to the input method management service; The input method management service finds the corresponding candidate word through the index value and submits it to the application.
2. A multifunctional virtual keyboard input method according to claim 1, characterized in that: The input method management service determines whether the default working mode is the physical keyboard input mode, including: The input method management service determines whether the default working mode is the physical keyboard input mode by detecting whether there is an available physical keyboard in the peripherals connected to the computer; When there is an available physical keyboard, determining that the default working mode is the physical keyboard input mode; When there is no available physical keyboard, it is determined that the default operating mode is not the physical keyboard input mode.
3. A multifunctional virtual keyboard input method according to claim 1, characterized in that: The input method management service includes a virtual keyboard UI proxy module, and the input method management service requests the virtual keyboard UI service to display a virtual keyboard window, including: The virtual keyboard UI agent module in the input method management service requests the virtual keyboard UI service to display the virtual keyboard window.
4. A multifunctional virtual keyboard input method according to claim 1, characterized in that: The input method management service includes a virtual keyboard UI proxy module, an input method context module, and an input method engine interface module. The virtual keyboard UI service requests the input method management service to set the current input method as the target input method through IPC communication, including: The virtual keyboard UI service requests the virtual keyboard UI proxy module in the input method management service to set the current input method as the target input method through IPC communication; The input method context module obtains the interface of the target input method from the input method engine interface module, and provides the interface to the virtual keyboard UI proxy module; The virtual keyboard UI agent module communicates with the target input method engine through the interface provided by the input method context module.
5. A multifunctional virtual keyboard input method according to claim 1, characterized in that: The input method management service includes a virtual keyboard UI proxy module, an input method context module, and an input method engine interface module. The virtual keyboard UI service transmits key events to the input method management service through IPC communication, including: The virtual keyboard UI service transmits the key events to the virtual keyboard UI proxy module through IPC communication; The virtual keyboard UI proxy module forwards the key events to the input method context module; The input method context module sends the key events to the input method engine interface module.
6. A multifunctional virtual keyboard input method according to claim 5, characterized in that: The input method management service processes the key events, obtains candidate results, and passes the candidate results to the virtual keyboard UI service through IPC communication, including: The input method engine interface module in the input method management service processes the key events to obtain candidate results, and transmits the candidate results to the virtual keyboard UI proxy module through the input method context module; The virtual keyboard UI proxy module collects candidate results and transmits the candidate results to the virtual keyboard UI service through IPC communication.
7. A multifunctional virtual keyboard input method according to claim 1, characterized in that: The method further comprises: When the user requests the input method management service to hide the virtual keyboard, the input method management service determines whether the default working mode is the physical keyboard input mode; If not, the input method management service requests the virtual keyboard UI service to hide the virtual keyboard window; If so, the user hides the virtual keyboard window through the virtual keyboard floating button or the virtual keyboard tray icon or the close button of the virtual keyboard window.
Citation Information
Patent Citations
Implementing method for virtual simulation keyboard of mobile communication terminal
CN101132428A
Control method of terminal input mode, device and mobile terminal
CN101626418A
Input control method and apparatus, and related device
CN106648145A
Customization method, device and equipment for kernel virtual keyboard of Linux system and medium
CN114020159A