Method and apparatus for customizing layout of virtual keyboard, and device and readable storage medium
By monitoring user drag-and-drop information to adjust the virtual keyboard layout, the inconvenience caused by fixed layouts in existing technologies is solved, enabling flexible adjustment of custom layouts and efficient input.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- SHANGHAI DROI TECH CO LTD
- Filing Date
- 2025-06-09
- Publication Date
- 2026-07-16
AI Technical Summary
The existing virtual keyboard layout is fixed, and users cannot customize the layout according to their personal preferences and usage habits, which makes it inconvenient to use when frequently entering specific characters or symbols.
By monitoring user dragging information on the screen, the default layout of the virtual keyboard is adjusted, a custom layout is obtained to achieve the target layout, and it is stored in the local database for future use, or the default layout is restored when there is no operation.
It enables flexible adjustment of the customizable virtual keyboard layout, improving user input efficiency and user experience.
Smart Images

Figure CN2025099958_16072026_PF_FP_ABST
Abstract
Description
A method, apparatus, device, and readable storage medium for customizing virtual keyboard layout
[0001] Relevant publicly available cross-references
[0002] This disclosure claims priority to Chinese Patent Application No. 2025100428648, filed on January 10, 2025, entitled "A method, apparatus, device and readable storage medium for customizing virtual keyboard layout", the entire contents of which are incorporated herein by reference. Technical Field
[0003] This disclosure relates to the field of virtual rendering, and more specifically, to a method, apparatus, device, and readable storage medium for customizing the arrangement of a virtual keyboard. Background Technology
[0004] Currently, existing virtual keyboards typically have a fixed layout, preventing users from customizing the key arrangement according to their personal preferences and usage habits. Users are forced to adapt to this fixed keyboard layout for daily work and life.
[0005] However, this fixed layout limits the user experience to some extent, especially in scenarios where users need to frequently input specific characters or symbols, as the position of these character and symbol keys prevents users from pressing them quickly.
[0006] Therefore, how to implement a custom virtual keyboard layout is a technical problem that needs to be solved.
[0007] Public content
[0008] The purpose of this disclosure is to provide a method for customizing the arrangement of a virtual keyboard. The technical solution of this disclosure can achieve the effect of customizing the arrangement of a virtual keyboard.
[0009] In a first aspect, embodiments of this disclosure provide a method for customizing the arrangement of a virtual keyboard, applied to a mobile smart terminal operating system, comprising: initializing a default layout of the virtual keyboard, wherein the default layout includes the key positions and specifications of the virtual keyboard; acquiring drag information from a user on a terminal screen, wherein the drag information includes key position change information; updating the default layout according to the drag information to obtain a target layout and displaying it on the terminal screen.
[0010] In the above embodiments, this disclosure adjusts the default layout of the virtual keyboard by monitoring the user's dragging information of the virtual keyboard keys on the screen, and a custom layout can be obtained to achieve the target layout.
[0011] In some embodiments, after updating the default layout according to the drag information, obtaining the target layout and displaying it on the terminal screen, the method further includes: storing the data information corresponding to the target layout in a local database so that the data information stored in the local database can be obtained and applied when the virtual keyboard layout is initialized next time.
[0012] In the above embodiments, the layout information of a custom virtual keyboard can be stored locally, and the target layout can be directly retrieved and applied the next time it is used.
[0013] In some embodiments, after updating the default layout according to the drag information, obtaining the target layout and displaying it on the terminal screen, the method further includes: when the user clicks to restore the default layout or when the user does not perform any operation within a preset time, restoring the target layout of the virtual keyboard to the default layout.
[0014] In the above embodiments, this disclosure can automatically restore the virtual keyboard to the default layout when the user clicks "Restore Default" or when there is no operation for a preset time, so that it can be used by others.
[0015] In some embodiments, obtaining drag information from the user on the terminal screen includes: calling a system listener through a system interface; and listening to the user's long-press operation on the terminal screen and the drag information of the virtual keyboard before and after the long-press operation through the system listener.
[0016] In the above embodiments, this disclosure allows for the monitoring of user hand movements on the screen by setting up a listener, thereby accurately obtaining drag information.
[0017] In some embodiments, obtaining drag information of a user on a terminal screen includes: determining whether a user has pressed and held a button for more than a preset time; when it is determined that the user has pressed and held a button for more than a preset time, determining that the user is performing a long press operation, and obtaining drag information of the button during the long press operation.
[0018] In the above embodiments, this disclosure assumes that the user has performed a drag operation when the user stays for a longer period than a preset time, and can monitor drag information during the drag process.
[0019] In some embodiments, updating the default layout according to the drag information to obtain the target layout and displaying it on the terminal screen includes: updating the layout information of the default layout where the keys have changed according to the drag information to obtain the target layout; and redrawing the virtual keyboard according to the target layout to obtain the target virtual keyboard.
[0020] In the above embodiments, this disclosure allows for the redrawing of the target virtual keyboard by updating the default layout, thus providing users with a real-time display of the customized virtual keyboard layout.
[0021] In some embodiments, obtaining drag information from a user on a terminal screen includes: obtaining touch information when the user touches a virtual keyboard to obtain drag information; or obtaining keyboard adjustment information manually entered by the user to obtain drag information.
[0022] In the above embodiments, this disclosure can obtain drag information by monitoring the user's touch screen information, or by the user directly inputting information related to modifying the layout.
[0023] Secondly, embodiments of this disclosure provide an apparatus for customizing the arrangement of a virtual keyboard, comprising:
[0024] The initialization module is configured to initialize the default layout of the virtual keyboard, which includes the key positions and specifications of the virtual keyboard.
[0025] The acquisition module is configured to acquire drag information from the user on the terminal screen, including information on changes in button positions.
[0026] The layout module is configured to update the default layout according to the drag information, obtain the target layout, and display it on the terminal screen.
[0027] Optionally, the device further includes:
[0028] The storage module is configured such that after the layout module updates the default layout according to the drag information, obtains the target layout, and displays it on the terminal screen, it stores the data information corresponding to the target layout in a local database so that the data information stored in the local database can be retrieved and applied when the virtual keyboard layout is initialized next time.
[0029] Optionally, the device further includes:
[0030] The recovery module is configured such that after the layout module updates the default layout according to the drag information, obtains the target layout and displays it on the terminal screen, it restores the target layout of the virtual keyboard to the default layout when the user clicks to restore the default layout or when the user does not perform any operation within a preset time.
[0031] Optionally, the module can be specifically configured as follows:
[0032] The system listener is invoked via the system interface;
[0033] The system listener monitors the user's long-press actions on the terminal screen, as well as the dragging information of the virtual keyboard before and after the long-press actions.
[0034] Optionally, the module can be specifically configured as follows:
[0035] Determine if the user has pressed and held a button for more than a preset time;
[0036] When it is determined that a user has pressed and held a button for more than a preset time, it is confirmed that the user is performing a long press operation, and the dragging information of the button during the long press operation is obtained.
[0037] Optionally, the layout module can be specifically configured as follows:
[0038] Update the layout information of the default layout where the buttons have changed according to the drag information to obtain the target layout;
[0039] Redraw the virtual keyboard according to the target layout to obtain the target virtual keyboard.
[0040] Optionally, the module can be specifically configured as follows:
[0041] Obtain touch information when the user touches the virtual keyboard to get drag information;
[0042] or
[0043] Obtain the keyboard adjustment information manually entered by the user to get the drag information.
[0044] Thirdly, embodiments of this disclosure provide an electronic device including a processor and a memory, the memory storing computer-readable instructions that, when executed by the processor, perform the steps of the method provided in the first aspect above.
[0045] Fourthly, embodiments of this disclosure provide a readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the method provided in the first aspect above.
[0046] Other features and advantages of this disclosure will be set forth in the following description and will be apparent in part from the description or may be learned by practicing embodiments of this disclosure. The objects and other advantages of this disclosure may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0047] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments of this disclosure will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this disclosure and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 is a flowchart of a method for customizing the arrangement of a virtual keyboard according to an embodiment of this disclosure;
[0049] Figure 2 is a flowchart of an implementation method for a custom virtual keyboard layout provided in an embodiment of this disclosure;
[0050] Figure 3 is a schematic block diagram of a device for customizing virtual keyboard layout according to an embodiment of this disclosure;
[0051] Figure 4 is a structural schematic diagram of a device for customizing the arrangement of virtual keyboards according to an embodiment of this disclosure. Detailed Implementation
[0052] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.
[0053] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this disclosure, the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0054] This disclosure is applied to scenarios involving custom layouts of virtual keyboards. Specifically, it involves monitoring information about how users drag virtual keyboard keys on the screen, adjusting the default layout, and redrawing the target layout for the user's use.
[0055] Currently, existing virtual keyboards typically have a fixed layout, preventing users from customizing the key arrangement according to their personal preferences and usage habits. Users are forced to adapt to this fixed layout for daily work and life. However, this fixed layout limits the user experience to some extent, especially in scenarios requiring frequent input of specific characters or symbols, where the placement of these keys hinders rapid keystrokes.
[0056] To this end, this disclosure initializes the default layout of a virtual keyboard through a mobile smart terminal operating system. The default layout includes the key positions and specifications of the virtual keyboard. It then acquires drag information from the user on the terminal screen, including key position changes. The default layout is updated according to the drag information to obtain the target layout, which is then displayed on the terminal screen. By monitoring the user's drag information on the virtual keyboard keys on the screen and adjusting the default layout, a custom arrangement can be obtained to achieve the target layout.
[0057] In this embodiment of the disclosure, the executing entity can be a custom layout virtual keyboard device in a custom layout virtual keyboard system. In practical applications, the custom layout virtual keyboard device can be an electronic device such as a terminal device or a server, and there are no restrictions here.
[0058] The method for customizing the arrangement of virtual keyboards according to an embodiment of this disclosure will be described in detail below with reference to Figure 1.
[0059] Please refer to Figure 1. Figure 1 is a flowchart of a method for customizing the arrangement of a virtual keyboard according to an embodiment of this disclosure, applied to a mobile smart terminal operating system. As shown in Figure 1, the method for customizing the arrangement of a virtual keyboard includes:
[0060] Step 110: Initialize the default layout of the virtual keyboard.
[0061] The default layout includes the key positions and specifications of the virtual keyboard, and may also include layout code configuration information. The default layout can be a fixed layout, such as a QWERTY layout. Initializing the default layout of the virtual keyboard includes launching the virtual keyboard application on the device and initializing the position and size of all virtual keyboard keys.
[0062] Optionally, the default layout of the virtual keyboard can be initialized by initializing the relevant code data of the fixed layout stored in the runtime system and drawing the virtual keyboard image of the default layout.
[0063] The relevant code data can be either pre-written by relevant personnel or downloaded from system storage.
[0064] Step 120: Obtain the user's drag information on the terminal screen.
[0065] The drag information includes key position change information. This position change information includes the initial coordinates and orientation of each key on the virtual keyboard, as well as the final coordinates and orientation of each key.
[0066] In some embodiments of this disclosure, obtaining drag information from the user on the terminal screen includes: calling a system listener through a system interface; and listening to the user's long-press operation on the terminal screen and the drag information of the virtual keyboard before and after the long-press operation through the system listener.
[0067] In the above process, this disclosure allows for the monitoring of user hand movements on the screen by setting up a listener, thereby accurately obtaining drag information.
[0068] The long press operation indicates that the user touches the screen and holds it for a preset time to perform some operation information. The preset time can be set according to needs, for example, 1 second.
[0069] In some embodiments of this disclosure, obtaining drag information of a user on a terminal screen includes: determining whether a user has long-pressed a button for more than a preset time; when it is determined that the user has long-pressed a button for more than a preset time, determining that the user is performing a long-press operation, and obtaining drag information of the button during the long-press operation.
[0070] In the above process, if the user stays for a longer period than a preset time, it is considered that the user has performed a drag operation, and drag information during the drag process can be monitored.
[0071] The preset time can be set according to requirements.
[0072] In some embodiments of this disclosure, obtaining drag information from a user on a terminal screen includes: obtaining touch information when the user touches a virtual keyboard to obtain drag information; or obtaining keyboard adjustment information manually entered by the user to obtain drag information.
[0073] In the above process, this disclosure can obtain drag information by monitoring the user's touch screen information, or by the user directly inputting information related to modifying the layout.
[0074] Touch information includes the user's gestures after touching the screen. Drag information can also be obtained from virtual keyboard layout data stored in a local database.
[0075] Step 130: Update the default layout according to the drag information to obtain the target layout and display it on the terminal screen.
[0076] In some embodiments of this disclosure, updating the default layout according to drag information to obtain a target layout and displaying it on the terminal screen includes: updating the layout information of the default layout where the keys have changed according to drag information to obtain the target layout; and redrawing the virtual keyboard according to the target layout to obtain the target virtual keyboard.
[0077] In the above process, this disclosure allows for the real-time redrawing of the target virtual keyboard after updating the default layout, thus providing users with a real-time display of the customized virtual keyboard layout.
[0078] The layout information includes the dragged buttons and the position changes of the corresponding buttons in the drag information.
[0079] In some embodiments of this disclosure, after updating the default layout according to the drag information, obtaining the target layout and displaying it on the terminal screen, the method shown in FIG1 further includes: storing the data information corresponding to the target layout in a local database so as to obtain and apply the data information stored in the local database when the virtual keyboard layout is initialized next time.
[0080] In the above process, this disclosure allows the layout information of a custom virtual keyboard to be stored locally, so that the target layout can be directly retrieved and applied the next time it is used.
[0081] This allows you to iterate through all the buttons, obtain the x and y coordinates of each button, and save the coordinate information to a local database using SharedPreferences (a storage class).
[0082] In some embodiments of this disclosure, after updating the default layout according to the drag information, obtaining the target layout and displaying it on the terminal screen, the method shown in Figure 1 further includes: when the user clicks to restore the default layout or when the user does not perform any operation within a preset time, restoring the target layout of the virtual keyboard to the default layout.
[0083] In the above process, this disclosure can automatically restore the virtual keyboard to the default layout when the user clicks "Restore Default" or when there is no operation for a preset time, so that others can use it.
[0084] In the process shown in Figure 1 above, this disclosure initializes the default layout of the virtual keyboard through the mobile smart terminal operating system. The default layout includes the key positions and specifications of the virtual keyboard. It then acquires drag information from the user on the terminal screen, including key position changes. The default layout is updated according to the drag information to obtain the target layout, which is then displayed on the terminal screen. By monitoring the user's drag information on the virtual keyboard keys on the screen and adjusting the default layout, a custom arrangement can be obtained to achieve the target layout.
[0085] The implementation method of the custom virtual keyboard arrangement of this disclosure embodiment will be described in detail below with reference to FIG2.
[0086] Please refer to Figure 2, which is a flowchart of an implementation method for a custom virtual keyboard layout provided in this embodiment of the present disclosure. As shown in Figure 2, the implementation method for a custom virtual keyboard layout includes:
[0087] Step 210: Confirm whether the user is in drag-and-drop button mode.
[0088] Optionally: Listen to whether the user presses and holds a button for more than a preset time. If yes, proceed to step 220; otherwise, end the process.
[0089] Step 220: Record the position change information of the drag button.
[0090] Optionally: Record information on the position and posture changes of the user dragging the button.
[0091] Step 230: Redraw the virtual keyboard according to the position change information to obtain the target virtual keyboard.
[0092] Optionally: Update the button layout information whose position has changed in the default layout information to obtain the target layout, and redraw the virtual keyboard according to the target layout to obtain the target virtual keyboard.
[0093] Step 240: Save the layout information of the target virtual keyboard to the local database.
[0094] Optionally: Save the layout information of the target virtual keyboard to a local database for direct use next time.
[0095] Step 250: Automatically restore the virtual keyboard to the default layout.
[0096] Optionally: If there is no user touch operation within a preset time or the user clicks the restore default layout button, restore the target layout to the default layout.
[0097] Furthermore, the specific methods and steps shown in Figure 2 can be referred to the method shown in Figure 1, and will not be elaborated further here.
[0098] The previous section described the method of customizing the virtual keyboard layout using Figures 1 and 2. The following section describes the device for customizing the virtual keyboard layout using Figures 3 and 4.
[0099] Please refer to Figure 3, which is a schematic block diagram of a device 300 for customizing the arrangement of a virtual keyboard provided in this embodiment of the present disclosure. The device 300 may be a module, program segment, or code on an electronic device. The device 300 corresponds to the method embodiment of Figure 1 above and is capable of performing the various steps involved in the method embodiment of Figure 1. The specific functions of the device 300 can be found in the description below. To avoid repetition, detailed descriptions are appropriately omitted here.
[0100] Optionally, the device 300 includes:
[0101] The initialization module 310 is configured to initialize the default layout of the virtual keyboard, wherein the default layout includes the key positions and specifications of the virtual keyboard.
[0102] The acquisition module 320 is configured to acquire drag information of the user on the terminal screen, wherein the drag information includes button position change information;
[0103] The layout module 330 is configured to update the default layout according to the drag information, obtain the target layout, and display it on the terminal screen.
[0104] Optionally, the device further includes:
[0105] The storage module is configured such that after the layout module updates the default layout according to the drag information, obtains the target layout, and displays it on the terminal screen, it stores the data information corresponding to the target layout in the local database so that the data information stored in the local database can be retrieved and applied when the virtual keyboard layout is initialized next time.
[0106] Optionally, the device further includes:
[0107] The restore module is configured to update the default layout according to the drag information, obtain the target layout and display it on the terminal screen. When the user clicks to restore the default layout or when the user does not perform any operation within a preset time, the target layout of the virtual keyboard is restored to the default layout.
[0108] Optionally, the module can be specifically configured as follows:
[0109] The system listener is invoked through the system interface; the system listener monitors the user's long press operation on the terminal screen and the dragging information of the virtual keyboard before and after the long press operation.
[0110] Optionally, the module can be specifically configured as follows:
[0111] Determine if the user has pressed and held a button for more than a preset time; if it is determined that the user has pressed and held a button for more than the preset time, determine that the user is performing a long press operation, and obtain the drag information of the button during the long press operation.
[0112] Optionally, the layout module can be specifically configured as follows:
[0113] Update the layout information of the default layout where the keys have changed according to the drag information to obtain the target layout; redraw the virtual keyboard according to the target layout to obtain the target virtual keyboard.
[0114] Optionally, the module can be specifically configured as follows:
[0115] Obtain touch information when the user touches the virtual keyboard to get drag information; or obtain keyboard adjustment information manually entered by the user to get drag information.
[0116] Please refer to Figure 4, which is a schematic block diagram of a device for customizing a virtual keyboard according to an embodiment of this disclosure. The device may include a memory 410 and a processor 420. Optionally, the device may further include a communication interface 430 and a communication bus 440. This device corresponds to the method embodiment of Figure 1 and is capable of performing the various steps involved in the method embodiment of Figure 1. The specific functions of this device are described below.
[0117] Optionally, the memory 410 is configured to store computer-readable instructions.
[0118] The processor 420 is configured to process readable instructions stored in memory and is capable of executing the steps in the method of Figure 1.
[0119] The communication interface 430 is configured to communicate with other node devices for signaling or data. For example, it may be configured to communicate with a server or terminal, or with other device nodes, but this embodiment is not limited thereto.
[0120] The communication bus 440 is configured to enable direct communication between the aforementioned components.
[0121] In this embodiment, the communication interface 430 of the device is configured to communicate with other node devices via signaling or data. The memory 410 may be a high-speed RAM or a non-volatile memory, such as at least one disk storage device. Optionally, the memory 410 may also be at least one storage device located remotely from the aforementioned processor. The memory 410 stores computer-readable instructions, which, when executed by the processor 420, cause the electronic device to perform the method process shown in FIG1. The processor 420 may be used on the device 300 and configured to perform the functions of this disclosure. Exemplarily, the processor 420 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components; this embodiment is not limited to these.
[0122] This disclosure also provides a readable storage medium in which a computer program, when executed by a processor, performs the method process executed by the electronic device in the method embodiment shown in FIG1.
[0123] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the aforementioned method, and will not be elaborated further here.
[0124] In summary, this disclosure provides a method, apparatus, device, and readable storage medium for customizing the arrangement of a virtual keyboard. The method includes: initializing a default layout of the virtual keyboard, wherein the default layout includes the key positions and specifications of the virtual keyboard; acquiring drag information from a user on a terminal screen, wherein the drag information includes key position change information; updating the default layout according to the drag information to obtain a target layout and displaying it on the terminal screen. This method can achieve the effect of customizing the arrangement of the virtual keyboard.
[0125] In the several embodiments provided in this disclosure, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0126] In addition, the functional modules in the various embodiments of this disclosure can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0127] If a function is implemented as a software module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0128] The above are merely embodiments of this disclosure and are not intended to limit the scope of protection of this disclosure. Various modifications and variations can be made to this disclosure by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure. It should be noted that similar reference numerals and letters in the following figures denote similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0129] The above are merely specific embodiments of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
[0130] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element. Industrial applicability
[0131] By adopting the above solution, the virtual keyboard can be customized, improving the user experience.
Claims
1. A method for customizing the arrangement of a virtual keyboard, characterized in that, Applications in mobile smart terminal operating systems include: Initialize the default layout of the virtual keyboard, wherein the default layout includes the key positions and specifications of the virtual keyboard; Obtain drag information from the user on the terminal screen, wherein the drag information includes button position change information; The default layout is updated according to the drag information to obtain the target layout, which is then displayed on the terminal screen.
2. The method according to claim 1, characterized in that, After updating the default layout according to the drag information to obtain the target layout and displaying it on the terminal screen, the method further includes: The data information corresponding to the target layout is stored in a local database so that the data information stored in the local database can be retrieved and applied when the virtual keyboard layout is initialized next time.
3. The method according to claim 2, characterized in that, The step of storing the data information corresponding to the target layout in a local database includes: Iterate through all the buttons in the target layout and obtain the coordinate information of each button; The coordinate information of each button is stored in the local database using a specified storage class.
4. The method according to any one of claims 1-3, characterized in that, After updating the default layout according to the drag information to obtain the target layout and displaying it on the terminal screen, the method further includes: If the user clicks to restore the default layout or if the user does not perform any operation within a preset time, the target layout of the virtual keyboard is restored to the default layout.
5. The method according to any one of claims 1-4, characterized in that, The process of obtaining user drag information on the terminal screen includes: The system listener is invoked via the system interface; The system listener monitors the user's long-press operation on the terminal screen and the dragging information of the virtual keyboard before and after the long-press operation.
6. The method according to any one of claims 1-5, characterized in that, The process of obtaining user drag information on the terminal screen includes: Determine whether the user has pressed and held a button for more than a preset time; When it is determined that the user has pressed and held a button for more than the preset time, it is determined that the user is performing a long press operation, and the dragging information of the button during the long press operation is obtained.
7. The method according to any one of claims 1-6, characterized in that, The step of updating the default layout according to the drag information, obtaining the target layout, and displaying it on the terminal screen includes: Update the layout information of the default layout where the buttons have changed according to the drag information to obtain the target layout; wherein, the layout information includes the dragged buttons and the position change information of the corresponding buttons in the drag information; The virtual keyboard is redrawn according to the target layout to obtain the target virtual keyboard.
8. The method according to any one of claims 1-7, characterized in that, The process of obtaining user drag information on the terminal screen includes: The drag information is obtained by acquiring the touch information when the user touches the virtual keyboard. or The drag information is obtained by acquiring the keyboard adjustment information manually entered by the user.
9. The method according to claim 8, characterized in that, The touch information includes the user's gestures after touching the screen.
10. The method according to any one of claims 1-9, characterized in that, The default layout for initializing the virtual keyboard includes: Launch the virtual keyboard application on the mobile smart terminal to initialize the position and size of all keys on the virtual keyboard.
11. The method according to any one of claims 1-10, characterized in that, The default layout for initializing the virtual keyboard includes: Initialize the code data related to the fixed layout stored in the runtime system, and draw the virtual keyboard image with the default layout.
12. The method according to any one of claims 1-11, characterized in that, The default layout also includes: layout code configuration information.
13. The method according to any one of claims 1-12, characterized in that, The position change information of the keys includes: the initial coordinate information and initial posture information of each key in the virtual keyboard, as well as the final coordinate information and final posture information of each key.
14. A device for customizing the arrangement of a virtual keyboard, characterized in that, include: An initialization module is configured to initialize the default layout of the virtual keyboard, wherein the default layout includes the key positions and specifications of the virtual keyboard; The acquisition module is configured to acquire drag information of the user on the terminal screen, wherein the drag information includes button position change information; The layout module is configured to update the default layout according to the drag information, obtain the target layout, and display it on the terminal screen.
15. An electronic device, characterized in that, include: A memory and a processor, the memory storing computer-readable instructions that, when executed by the processor, perform the steps of the method as described in any one of claims 1-13.
16. A computer-readable storage medium, characterized in that, include: A computer program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1-13.