Virtual keyboard setting method, device and storage medium
By obtaining the keyboard mode and parameters selected by the user, and calculating the layout parameters of the virtual keyboard, the problem of poor user experience of the existing virtual keyboard is solved and a more efficient user input experience is achieved.
Patent Information
- Application Number
- CN202010307337.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-17
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2040-04-17
AI Technical Summary
When the existing virtual keyboard is displayed on electronic devices such as mobile phones and tablets, the user experience is poor and the usage efficiency is low, and it cannot adapt to different hand shapes, usage habits and usage scenarios.
By obtaining user selection instructions, determining the keyboard mode, and guiding the user to set keyboard parameters according to the keyboard mode, calculate the keyboard layout parameters, including keyboard width, height and display position, thereby generating a virtual keyboard that is more in line with the actual usage of the user.
It improves the flexibility of the virtual keyboard, optimizes the user experience, improves the user's usage efficiency, and makes it more convenient and efficient when using the virtual keyboard to input.
Smart Images

Figure CN111562876B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic devices, and in particular to a method, device and storage medium for setting a virtual keyboard. Background Art
[0002] A virtual keyboard, also known as a soft keyboard, is a keyboard mode displayed on the screen of an electronic device. Virtual keyboards are widely used in electronic devices such as mobile phones, tablets, and computers. On electronic devices, users complete input through the keys on the virtual keyboard to operate on text.
[0003] At present, when a virtual keyboard is displayed on an electronic device such as a mobile phone or tablet, its width is usually the width of the screen, its height is usually slightly less than half of the height of the screen, and its display position is usually at the bottom of the screen. Moreover, as the screen rotates or the screen size of the electronic device changes, the relative position of the virtual keyboard on the screen and the ratio of its width to height relative to the width and height of the screen do not change.
[0004] Therefore, in the process of using the virtual keyboard, problems such as poor user experience and low usage efficiency are likely to occur. Summary of the invention
[0005] The present application provides a method, device and storage medium for setting a virtual keyboard, so as to solve the problems of poor user experience and low use efficiency of the virtual keyboard in the prior art.
[0006] In a first aspect, the present invention provides a method for setting a virtual keyboard, comprising:
[0007] Obtaining a selection instruction, and determining a keyboard mode according to the selection instruction;
[0008] Get keyboard parameters;
[0009] A keyboard layout parameter is determined according to the keyboard parameter and the keyboard mode, wherein the keyboard layout parameter includes at least one of a keyboard width, a keyboard height, and a keyboard display position.
[0010] Optionally, after determining the keyboard layout parameters according to the keyboard parameters and the keyboard mode, the method further includes:
[0011] The keyboard floating window is displayed according to the keyboard layout parameters.
[0012] Optionally, after displaying the keyboard floating window according to the keyboard layout parameters, the method further includes:
[0013] In response to a movement instruction on the keyboard floating window, a display position of the keyboard floating window is changed.
[0014] Optionally, after displaying the keyboard floating window according to the keyboard layout parameters, the method further includes:
[0015] In response to a rotation instruction of the interface where the keyboard floating window is located, the keyboard floating window is rotated, wherein the keyboard layout parameters are reconfirmed according to the rotated interface and the keyboard layout parameters.
[0016] Optionally, determining keyboard layout parameters according to the keyboard parameters and the keyboard mode includes at least one of the following:
[0017] Determining a keyboard width according to the first trigger position and the keyboard mode;
[0018] determining the keyboard height according to the second trigger position and the third trigger position;
[0019] The keyboard display position is determined according to the second trigger position and the keyboard mode.
[0020] Optionally, after determining the keyboard layout parameters according to the keyboard parameters and the keyboard mode, the method further includes:
[0021] A switching instruction is obtained, and the keyboard mode is updated according to the switching instruction.
[0022] Optionally, before obtaining the selection instruction, the method further includes:
[0023] displaying a selection box, the selection box including a plurality of keyboard mode options;
[0024] Accordingly, the obtaining selection instruction includes:
[0025] Gets a selection instruction acting on the keyboard mode option in the selection box.
[0026] In a second aspect, the present application provides a device for setting a virtual keyboard, comprising:
[0027] A first acquisition module, used for acquiring a selection instruction;
[0028] A first determination module, configured to determine a keyboard mode according to the selection instruction, wherein the keyboard mode includes one or more of a left-hand mode, a right-hand mode and a standard mode;
[0029] The second acquisition module is used to obtain keyboard parameters;
[0030] The second determination module is used to determine keyboard layout parameters according to the keyboard parameters and the keyboard mode, and the keyboard layout parameters include keyboard width, keyboard height and keyboard display position.
[0031] Optionally, the device further comprises:
[0032] The display module is used to display a keyboard floating window according to the keyboard layout parameters.
[0033] Optionally, the device further comprises:
[0034] The moving module is used to respond to the moving instruction on the keyboard floating window and change the display position of the keyboard floating window.
[0035] Optionally, the device further comprises:
[0036] A rotation module is used to respond to a rotation instruction of the interface where the keyboard floating window is located, rotate the keyboard floating window, wherein the keyboard layout parameters are reconfirmed according to the rotated interface and the keyboard layout parameters.
[0037] Optionally, the second determining module specifically includes:
[0038] A first determining submodule, used for determining a keyboard width according to a first trigger position and the keyboard mode;
[0039] A second determination submodule, used to determine the keyboard height according to the second trigger position and the third trigger position;
[0040] The third determining submodule is used to determine the keyboard display position according to the second trigger position and the keyboard mode.
[0041] Optionally, the device further comprises:
[0042] The switching module is used to obtain a switching instruction and update the keyboard mode according to the switching instruction.
[0043] Optionally, the device further comprises:
[0044] A selection module, used for displaying a selection box, wherein the selection box includes a plurality of keyboard mode options;
[0045] Correspondingly, the first acquisition module is specifically used to obtain a selection instruction acting on the keyboard mode option in the selection box.
[0046] In a third aspect, the present application provides an electronic device, including: a memory, a processor, and a communication interface;
[0047] The memory is used to store the processor executable instructions;
[0048] The communication interface is used to obtain or send information according to the instructions of the processor;
[0049] The processor is used to call the program instructions in the memory to execute the setting method of the virtual keyboard in the first aspect and any possible design of the first aspect.
[0050] In a fourth aspect, the present application provides a readable storage medium, which stores execution instructions. When at least one processor of an electronic device executes the execution instructions, the electronic device executes the method for setting a virtual keyboard in the first aspect and any possible design of the first aspect.
[0051] The virtual keyboard setting method, device, equipment and storage medium provided in the present application determine the keyboard mode selected by the user by obtaining the user's selection instruction. And according to the keyboard mode, the electronic device guides the user to set the keyboard parameters under the keyboard mode. After the electronic device obtains the keyboard parameters, it determines the keyboard layout parameters according to the keyboard parameters and the keyboard mode. The keyboard layout parameters are used to determine the width, height and display position of the keyboard when the keyboard is displayed. The virtual keyboard generated by the electronic device according to the keyboard layout parameters can be more in line with the actual usage of the user, optimize the user experience, improve the user's efficiency, and make the user more convenient and efficient when using the virtual keyboard for input. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0053] Figure 1 A schematic diagram of a virtual keyboard scenario provided by an embodiment of the present application;
[0054] Figure 2 A flowchart of a method for setting a virtual keyboard provided in one embodiment of the present application;
[0055] Figure 3 A schematic diagram of a selection box interface of an electronic device provided by an embodiment of the present application;
[0056] Figure 4 A schematic diagram of a keyboard parameter setting guide provided in an embodiment of the present application;
[0057] Figure 5 A schematic diagram of keyboard parameter settings provided in an embodiment of the present application;
[0058] Figure 6 A flowchart of another method for setting a virtual keyboard provided in an embodiment of the present application;
[0059] Figure 7 A schematic diagram of a keyboard floating window of an electronic device provided in one embodiment of the present application;
[0060] Figure 8 A schematic diagram of a keyboard floating window movement of an electronic device provided by an embodiment of the present application;
[0061] Fig. 9 A schematic diagram of a keyboard floating window rotation of an electronic device provided by an embodiment of the present application;
[0062] Fig.10 A schematic diagram of the structure of a virtual keyboard setting device provided in one embodiment of the present application;
[0063] Fig.11 A schematic diagram of the structure of another device for setting a virtual keyboard provided in one embodiment of the present application;
[0064] Fig.12 A schematic diagram of the structure of another device for setting a virtual keyboard provided in an embodiment of the present application;
[0065] Fig.13 A schematic diagram of the hardware structure of an electronic device provided in one embodiment of the present application.
[0066] Description of reference numerals:
[0067] 1. Keyboard head;
[0068] 2. Nine-grid keyboard;
[0069] 3. Full keyboard. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0071] The terms "first", "second", "third", "fourth", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in sequences other than those illustrated or described herein.
[0072] It should be understood that in the present invention, "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products or apparatuses.
[0073] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0074] A virtual keyboard, also known as a soft keyboard, is a keyboard mode displayed on the screen of an electronic device. Virtual keyboards are widely used in electronic devices such as mobile phones, tablets, and computers to assist users in completing input through virtual keys on the screen. On the computer display, the user controls the mouse to click the keys on the virtual keyboard to complete the input. On touch-screen electronic devices such as mobile phones and tablets, users usually control the virtual keyboard to complete the input by pressing keys with their fingers.
[0075] At present, on touch-screen electronic devices such as mobile phones, tablets, and computers, the display of a virtual keyboard is usually adapted to the screen of the electronic device. The width of the virtual keyboard is usually the width of the screen. The height of the virtual keyboard is usually slightly less than half the height of the screen. The location of the virtual keyboard is usually at the bottom of the screen. That is, when the screen of the electronic device is rotated, or when using electronic devices with different screen sizes, the width and height of the virtual keyboard change as the width and height of the screen change. The relative position of the virtual keyboard on the screen, and the ratio of its width and height to the width and height of the screen, will not change.
[0076] Usually, when the mobile phone is in landscape mode, the virtual keyboard will appear in a long and flat shape below the mobile phone. In a large-sized tablet, the virtual keyboard will appear in a wide and tall shape below the mobile phone. Because different users have different palm sizes and finger lengths. Therefore, for the same electronic device and the same virtual keyboard, different users have different user experiences. For example, when using a large-sized tablet, its virtual keyboard is wide and tall. When the user's hand shape is wide and the fingers are slender, it may be easy to reach the entire keyboard and complete the input efficiently. When the user's hand shape is narrow and the fingers are short, it may be necessary to move the arm to click on each key of the virtual keyboard, and the input efficiency is low. For example, when the user only uses the left hand, it may not be easy to reach the keys on the right side of the virtual keyboard, and when the user only uses the right hand, it may not be easy to reach the keys on the left side of the virtual keyboard.
[0077] Therefore, in the process of using the virtual keyboard, the one-size-fits-all display method in the prior art cannot adapt to the use of users with different hand shapes (such as palm size, finger length, etc.), users with different usage habits (such as left-hand input or right-hand input), and users in different usage scenarios (single-hand input or double-hand input). This one-size-fits-all display method easily leads to problems such as low user efficiency and poor user experience.
[0078] In response to the above problems, the present application proposes a method, device, equipment and storage medium for setting a virtual keyboard. The electronic device determines the keyboard mode selected by the user by obtaining a selection instruction. Among them, the keyboard mode includes one or more of a left-hand mode, a right-hand mode and a standard mode. Furthermore, according to the keyboard mode, the electronic device guides the user to set keyboard parameters. After the electronic device obtains the keyboard parameters, it determines the keyboard layout parameters according to the keyboard parameters and the keyboard mode selected by the user. Among them, the keyboard layout parameters include keyboard width, keyboard height and keyboard display position. Further, after determining the keyboard layout parameters under the keyboard mode, the electronic device can display a keyboard floating window according to the keyboard layout parameters, and perform operations such as moving, scaling, and switching keyboard modes on the keyboard floating window. Through the above method, the present application can improve the flexibility of the virtual keyboard, improve the user's usage efficiency, make user input more convenient, and improve the user experience.
[0079] Figure 1 FIG. 1 is a schematic diagram of a virtual keyboard provided by an embodiment of the present application. In electronic devices, common modes of virtual keyboards include full keyboard mode, nine-square grid mode, etc. In this embodiment, according to the common modes of virtual keyboards, combined with the method of the present application, the display of the virtual keyboard can be the nine-square grid mode as shown in FIG. 1(a), or the left-hand side mode as shown in FIG. Figure 1 (b) Full keyboard mode, etc.
[0080] like Figure 1 (a) shows a virtual keyboard in a nine-square grid mode, and Figure 1 (b) shows a virtual keyboard in full keyboard mode. The virtual keyboard has the same keyboard head 1. The keyboard head 1 includes buttons such as mode 1, mode 2, size, move, and close. The user controls the virtual keyboard through the buttons in the keyboard head 1.
[0081] The Mode 1 button is used to indicate switching between the nine-grid mode and the full keyboard mode. The Mode 2 button is used to indicate switching between keyboard modes. The Size button is used to indicate that the user manually adjusts the size of the virtual keyboard. The Move button is used to indicate that the user moves the virtual keyboard. The Close button is used to indicate that the user closes the keyboard floating window of the virtual keyboard.
[0082] Figure 1The virtual keyboard in the nine-square grid mode shown in (a) also includes a nine-square grid keyboard button 2. Figure 1 The virtual keyboard in full keyboard mode shown in (b) also includes a full keyboard button 3. The user completes the text operation by clicking the nine-grid keyboard 2 or the button in the full keyboard 3.
[0083] The display of the virtual keyboard can also be semicircular, elliptical, triangular or other shapes, which are not limited in the present application. The shape of the virtual keyboard is designed to facilitate the user to complete the key operation in the one-handed mode.
[0084] In this embodiment, the virtual keyboard can be applied to touch screen electronic devices, such as mobile phones, tablets, computers, car computers, controllers, servers, etc. The following uses electronic devices as the execution subject and describes the technical solution of this application in detail through specific embodiments.
[0085] Figure 2 A flowchart of a method for setting a virtual keyboard provided by an embodiment of the present application is shown. Figure 1 Based on the embodiment shown, Figure 2 As shown, with the electronic device as the execution subject, the method of this embodiment may include:
[0086] S101, obtaining a selection instruction, and determining a keyboard mode according to the selection instruction, where the keyboard mode includes one or more of a left-hand mode, a right-hand mode and a standard mode.
[0087] In this embodiment, the electronic device obtains a selection instruction according to the user's selection, and the selection instruction is used to indicate the keyboard mode selected by the user.
[0088] In one example, an electronic device obtains a selection instruction acting on a keyboard mode option in a selection box, and the selection box is displayed on an interface of the electronic device. The selection box may include multiple keyboard mode options.
[0089] like Figure 3 As shown, the interface of the electronic device includes three keyboard mode options: left-right mode, right-hand mode, and standard mode. The user can select one of the keyboard mode options by clicking to trigger. The electronic device determines the keyboard mode option selected by the user according to the user's click trigger instruction, and the keyboard mode option is the selection instruction obtained by the electronic device.
[0090] The display time of the selection box may be a preset time length. If the user does not complete the selection of the keyboard mode within the preset time length, the electronic device may use the preset default keyboard mode as the selected keyboard mode. When the user does not complete the selection within the preset time length, the electronic device determines that the preset default keyboard mode is the selected keyboard mode, and determines that the selection instruction is the obtained selection instruction.
[0091] In another example, the electronic device obtains a voice instruction that acts on a keyboard mode option, and based on the voice instruction, the electronic device generates a corresponding selection instruction.
[0092] In this example, the electronic device has a microphone function. The electronic device can start to keep the microphone turned on after the selection box appears to obtain the user's voice data. The electronic device detects in real time whether the voice data contains keywords based on the voice data obtained by the microphone. When the electronic device detects that the voice data contains keywords, the electronic device generates a corresponding selection instruction based on the keywords and turns off the microphone.
[0093] Taking the left-hand mode as an example, the keywords for the electronic device to recognize the voice content may be "left-hand mode", "left hand", "left", etc.
[0094] For example, when the user says "left-hand mode", "select left-hand mode" or "left hand", the electronic device detects the keyword "left hand" in the voice data and generates a selection instruction for selecting the left-hand mode based on the keyword "left hand".
[0095] In another example, the electronic device obtains a biological parameter acting on a keyboard mode option, and based on the biological parameter, the electronic device determines a corresponding selection instruction.
[0096] In this example, the biometric parameter may include the direction in which the user's finger taps the screen. Based on the direction in which the screen is tapped, the electronic device may determine whether the hand used by the user is the left hand or the right hand. For example, when the direction in which the screen is tapped is to the right, the user is more likely to use the left hand to tap the screen; and when the direction in which the screen is tapped is to the left, the user is more likely to use the right hand to tap the screen.
[0097] After the electronic device determines the hand used by the user to click the screen, the electronic device determines the mode selected by the user. For example, when the user clicks the screen with the left hand, the electronic device determines that the mode selected by the user is the left-hand mode. The electronic device generates a selection instruction based on the determined mode.
[0098] The biological parameter may also include the position where the user's finger clicks the screen. The electronic device determines the keyboard mode selected by the user based on the width of the screen and the position where the user's finger clicks the screen. The specific steps may include:
[0099] Step 1: The electronic device compares the width of the screen with a preset width, wherein the preset width is a parameter obtained by the electronic device based on experience.
[0100] Step 2. When the width of the screen is less than or equal to the preset width, when the clicked position is on the left half of the screen, the electronic device determines that the mode selected by the user is the right-hand mode; when the clicked position is on the right half of the screen, the electronic device determines that the mode selected by the user is the left-hand mode.
[0101] For example, when the electronic device is a mobile phone and is used in portrait orientation, when the user holds the mobile phone, the position where the user's left thumb clicks the screen is usually on the right half of the screen.
[0102] Step 3. When the width of the screen is greater than the preset width, when the clicked position is on the left half of the screen, the electronic device determines that the mode selected by the user is the left-hand mode; when the clicked position is on the right half of the screen, the electronic device determines that the mode selected by the user is the right-hand mode.
[0103] For example, when the electronic device is a tablet, when the user holds the tablet in his left hand, the position where the left and right thumbs click on the screen is usually on the left half of the screen.
[0104] Step 4: The electronic device generates a selection instruction according to the determined mode.
[0105] In another example, the user selection process is that after the user logs into the account on the electronic device, the keyboard mode selected by the user is determined according to the keyboard mode pre-stored in the account, and the selection instruction is determined according to the keyboard mode.
[0106] The keyboard mode selected by the user can be a left-hand mode, a right-hand mode or a standard mode. In the left-hand mode, the user is in a state of using the left hand to operate the electronic device. In this process, the user's right hand cannot cooperate with the left hand to operate the electronic device. In the right-hand mode, the user is in a state of operating the electronic device with the right hand. In this process, the user's left hand cannot cooperate with the right hand to operate the electronic device. In the standard mode, the user is in a state where the left and right hands can be used to operate the electronic device at the same time. In this process, the user reduces the requirements for the virtual keyboard through the coordinated operation of the left and right hands.
[0107] S102: Obtain keyboard parameters.
[0108] In this embodiment, the electronic device determines a keyboard parameter setting guide according to the keyboard mode determined in S101. The user sets the keyboard parameters according to the keyboard parameter setting guide of the electronic device.
[0109] When the keyboard mode determined in S101 is the standard mode, the user can use the left and right hands in a coordinated manner, which reduces the user's requirements for the virtual keyboard. Therefore, in this keyboard mode, the electronic device determines the keyboard parameters according to the width and height of the screen.
[0110] When the keyboard mode determined in S101 is the left-hand mode, the electronic device guides the user to hold the mobile phone with the left hand and click the corresponding position of the screen with the left thumb. The electronic device obtains the position parameter of the left thumb clicking the screen and determines the position parameter as the keyboard parameter in the left-hand mode.
[0111] When the keyboard mode determined in S101 is the right-hand mode, the electronic device guides the user to hold the mobile phone with the right hand and click the corresponding position of the screen with the right thumb. The electronic device obtains the position parameter where the right thumb clicks the screen and determines the position parameter as the keyboard parameter in the right-hand mode.
[0112] In one example, the user can click the corresponding position on the electronic device according to the preset guidance to determine the keyboard parameters. The guidance method can be a combination of graphic and text guidance. Taking the setting guidance of the right-hand mode as an example, when the electronic device is a mobile phone, the guidance process can be as follows: Figure 4 As shown in (a) to (d) of FIG. 1 , the process of obtaining keyboard parameters may include:
[0113] Step 1: Figure 4 As shown in (a), the user holds the mobile phone with his right hand.
[0114] Step 2: Figure 4 As shown in (b), the user's right thumb clicks on the left side of the screen to obtain the first trigger position.
[0115] Step 3: Figure 4 As shown in (c), the user's right thumb clicks the upper part of the screen to obtain the second trigger position.
[0116] Step 4: Figure 4 As shown in (d), the user's right thumb clicks the bottom of the screen to obtain the third trigger position.
[0117] Among them, this application does not limit the execution order of steps 2 to 4.
[0118] In addition, the keyboard parameter setting guide can also be a text guide or a graphic guide, which is not limited in this application.
[0119] In another example, when the electronic device determines the keyboard mode option according to the biometric parameter, the electronic device can further determine the fourth trigger position of the electronic device according to the position where the user's finger clicks the screen in the biometric parameter. The fourth trigger position is the position where the user's finger clicks the screen.
[0120] In another example, the user may also log into an account in the electronic device, and the electronic device obtains the keyboard parameters pre-stored by the user in the account.
[0121] S103: Determine keyboard layout parameters according to keyboard parameters and keyboard mode, where the keyboard layout parameters include keyboard width, keyboard height, and keyboard display position.
[0122] In this embodiment, the electronic device obtains the position parameter of the screen clicked by the user according to the setting guidance of S102, and determines the position parameter as a keyboard parameter. The keyboard parameter may include a first trigger position, a second trigger position, and a third trigger position clicked by the user on the screen of the electronic device according to the setting guidance. The electronic device calculates the keyboard layout parameter according to the keyboard parameter and the keyboard mode. The keyboard layout parameter may include a keyboard width, a keyboard height, and a keyboard display position.
[0123] In one example, the electronic device may determine the keyboard width according to the first trigger position and the keyboard mode. The electronic device may determine the keyboard height according to the second trigger position and the third trigger position. The electronic device may determine the keyboard display position according to the second trigger position and the keyboard mode.
[0124] Combination Figure 5 When the electronic device is a mobile phone, taking the right-hand mode as an example, the calculation process of the keyboard layout parameters is as follows:
[0125] Step 1: The electronic device determines the corresponding position according to the first trigger position, the second trigger position and the third trigger position clicked in S102. Figure 5 As shown, the divisions of the above three trigger positions in the interface can be shown as points A, B and C in the figure.
[0126] Step 2: The electronic device can calculate the keyboard width based on the first trigger position A and the right edge of the mobile phone. The keyboard width is as follows: Figure 5 The middle line segment w is shown as the vertical distance from the center of point A to the right edge of the mobile phone.
[0127] Step 3: The electronic device can calculate the keyboard height according to the second trigger position B and the third starting position C. The keyboard height is as follows: Figure 5The middle line segment h is the vertical distance from the dotted line where point B is located to the dotted line where point C is located. The dotted line where point B is located is a line passing through point B and parallel to the upper boundary of the mobile phone. The dotted line where point C is located is a line passing through point C and parallel to the upper boundary of the mobile phone.
[0128] Step 3: Since the keyboard mode is right-hand mode, the virtual keyboard should appear on the right side of the phone. The right edge of the virtual keyboard should coincide with the right edge of the phone. The electronic device obtains the vertical projection point D of the second trigger position B on the right edge of the phone, and determines that point D is the upper right corner of the virtual keyboard. Figure 5 As shown, the electronic device obtains a dotted line passing through point B, which is parallel to the upper boundary of the mobile phone. The dotted line intersects with the right boundary of the mobile phone at point D, and the electronic device determines that point D is the point at the upper right corner of the virtual keyboard.
[0129] Step 4: The electronic device determines the keyboard display position of the keyboard in the coordinate system of the keyboard interface according to the point of the upper right corner of the keyboard, the keyboard width and the keyboard height calculated in the above steps.
[0130] In another example, when the selection instruction is determined according to the biological parameter, the electronic device determines the layout parameters of the keyboard according to the biological parameter, the keyboard parameter and the keyboard mode.
[0131] The biological parameter may include the position where the finger clicks the screen. The electronic device determines the fourth trigger position according to the position where the finger clicks the screen. When the electronic device is a mobile phone, taking the right-hand mode as an example, the process of determining the keyboard layout parameters according to the fourth trigger position may include:
[0132] Step 1: The electronic device can calculate the keyboard width according to the fourth trigger position and the right edge of the mobile phone.
[0133] Step 2: The electronic device can calculate the keyboard height according to the keyboard width and the preset ratio. The preset ratio is a ratio parameter set based on experience. Specifically, the keyboard height is equal to the keyboard width multiplied by the preset ratio.
[0134] For example, the preset ratio may be 1, in which case the keyboard height is equal to the keyboard width.
[0135] Step 3: The electronic device may determine the upper boundary and the lower boundary of the keyboard based on the keyboard height and the fourth trigger position.
[0136] For example, the electronic device may determine that the height at which the fourth trigger position is located is the lower boundary of the keyboard, and the upper boundary of the keyboard is the position of the keyboard height moved up from the height.
[0137] For example, the electronic device may determine that the height of the fourth trigger position is the center height of the keyboard. The upper boundary of the keyboard is the position of half the keyboard height from the center height. The lower boundary of the keyboard is the position of half the keyboard height from the center height.
[0138] In this example, there is no restriction on the height of the fourth trigger position in the entire keyboard, which can be determined based on actual experience. The height of the fourth trigger position in the left-hand mode and the height of the fourth trigger position in the right-hand mode can be set separately.
[0139] The setting method of the virtual keyboard provided in the present application obtains the user's selection instruction through the electronic device to determine the keyboard mode selected by the user. And according to the keyboard mode, the electronic device guides the user to set the keyboard parameters under the keyboard mode. After the electronic device obtains the keyboard parameters, it determines the keyboard layout parameters according to the keyboard parameters and the keyboard mode. The keyboard layout parameters are used to determine the width, height and display position of the keyboard when the keyboard is displayed. The present application calculates the keyboard layout parameters of the user by obtaining the keyboard mode selected by the user and the keyboard parameters under the keyboard mode. The virtual keyboard generated by the electronic device according to the keyboard layout parameters can be more in line with the actual usage of the user, optimize the user experience, improve the user's efficiency, and make the user more convenient and efficient when using the virtual keyboard for input.
[0140] When the electronic device completes the setting of the virtual keyboard in a keyboard mode, the electronic device can also display a keyboard floating window of the virtual keyboard by triggering, and operate the virtual keyboard through the keyboard floating window, and operate the text through the virtual keyboard.
[0141] Figure 6 A flowchart of another method for setting a virtual keyboard provided by an embodiment of the present application is shown. Figures 1 to 5 Based on the embodiment shown, Figure 6 As shown, with the electronic device as the execution subject, the method of this embodiment may include:
[0142] S201, obtaining a selection instruction, and determining a keyboard mode according to the selection instruction, where the keyboard mode includes one or more of a left-hand mode, a right-hand mode, and a standard mode.
[0143] S202: Obtain keyboard parameters.
[0144] S203: Determine keyboard layout parameters according to keyboard parameters and keyboard mode, where the keyboard layout parameters include keyboard width, keyboard height, and keyboard display position.
[0145] Among them, steps S201 to S203 are Figure 2 The implementation of steps S101 to S103 in the embodiment is similar, and will not be repeated here in this embodiment.
[0146] S204: Display a keyboard floating window according to keyboard layout parameters.
[0147] In this embodiment, after the electronic device determines the keyboard layout parameters, when the virtual keyboard is triggered, the virtual keyboard is displayed on the interface of the electronic device in the form of a keyboard floating window. Figure 7 As shown, when the electronic device is a mobile phone, the keyboard floating window is suspended on the mobile phone interface. When multiple application icons are displayed on the mobile phone interface, the keyboard floating window is suspended above the application icons.
[0148] The layout parameters of the keyboard floating window are the keyboard layout parameters calculated in S203.
[0149] Among them, the keyboard floating window can be triggered by clicking on the input box, or by clicking on the text, etc. This application does not impose any restrictions on this.
[0150] S205: responding to a move instruction on the keyboard floating window, changing the display position of the keyboard floating window.
[0151] In this embodiment, after the electronic device triggers the keyboard floating window, the user can also control the keyboard floating window to move within the interface of the electronic device by clicking a move button on the keyboard floating window. Figure 8 (a) shows the mobile phone interface before the keyboard floating window moves. Figure 8 (b) shows the mobile phone interface displayed after the user clicks the move button and moves the keyboard floating window.
[0152] S206 , responding to a rotation instruction of the interface where the keyboard floating window is located, rotating the keyboard floating window, wherein the keyboard layout parameters are reconfirmed according to the rotated interface and the keyboard layout parameters.
[0153] In this embodiment, after the electronic device triggers the keyboard floating window, when the user rotates the screen, the keyboard layout parameters of the keyboard floating window are recalculated according to the rotated interface. Fig. 9 , the calculation process is described in detail. Fig. 9 (a) is the mobile phone interface before rotation. Fig. 9 (b) is the mobile phone interface after rotation. The calculation process may include the following steps:
[0154] Step 1: The electronic device obtains the position parameters of the keyboard floating window according to the keyboard layout parameters, including the distance h1 from the upper border of the keyboard floating window to the upper border of the mobile phone, and the distance w1 from the left border of the keyboard floating window to the left border of the mobile phone.
[0155] Step 2: The electronic device obtains the lengths of the left border and the upper border of the mobile phone before rotation, which are determined as H1 and W1 respectively.
[0156] Step 3: The electronic device obtains the lengths of the left boundary and the upper boundary of the mobile phone after rotation, and determines them as H2 and W2 respectively.
[0157] Step 4: The electronic device calculates h2 according to H2 and the ratio of h1 to H1. h2 is the distance from the upper boundary of the keyboard floating window to the upper boundary of the rotated mobile phone interface.
[0158] Step 5: The electronic device calculates w2 according to W2 and the ratio of w1 to W1. w2 is the distance from the right edge of the keyboard floating window to the right edge of the rotated mobile phone interface.
[0159] Step 6: The electronic device calculates a new keyboard display position according to h2, w2 calculated in steps 4 and 5, and the keyboard height and keyboard width in the keyboard layout parameters. The keyboard floating window is displayed in the rotated mobile phone interface according to the new keyboard display position, keyboard height and keyboard width.
[0160] S207: Obtain a switching instruction, and update the keyboard mode according to the switching instruction.
[0161] In this embodiment, when the electronic device triggers the keyboard floating window, the user can switch the keyboard mode by clicking the Mode 2 button in the keyboard floating window. For example, the current keyboard mode is the left-hand mode, and after clicking the Mode 2 button, the keyboard mode is switched to the right-hand mode. The keyboard layout parameters of the switched right-hand mode can be the layout parameters of the right-hand mode saved by the electronic device when the user exited the right-hand mode last time.
[0162] In this embodiment, S205, S206, and S207 are operations that can be performed on the keyboard floating window after the keyboard floating window is displayed. After the keyboard floating window is displayed in S204, there is no requirement for the order in which the operations corresponding to these three steps are performed, and one or more of the steps can be performed, and this application does not limit this. For example, after the keyboard floating window is displayed in S204, the electronic device can first execute S206, then execute S205, and then end this operation.
[0163] In this embodiment, in addition to performing operations such as S205, S206, and S207 on the keyboard floating window, the user can also perform operations such as scaling, changing the keyboard layout, changing the keyboard skin, and replacing common symbols on the keyboard floating window, and this application does not impose any restrictions on this.
[0164] The setting method of the virtual keyboard provided in the present application obtains the user's selection instruction through the electronic device to determine the keyboard mode selected by the user. And according to the keyboard mode, the electronic device obtains the keyboard parameters corresponding to the keyboard mode, as well as the keyboard layout parameters. When the electronic device triggers the keyboard floating window, the electronic device displays the keyboard floating window according to the keyboard layout parameters. The electronic device can also perform operations such as moving and switching keyboard modes for the keyboard floating window. When the electronic device rotates, the electronic device can also recalculate the keyboard layout parameters according to the rotated interface. The present application triggers the keyboard floating window in the electronic device and operates the keyboard floating window, thereby improving the flexibility of the user during use. This process can facilitate the user to adjust the keyboard floating window according to the actual usage, optimize the user experience, and improve the user's efficiency.
[0165] Fig.10 A schematic diagram of the structure of a virtual keyboard setting device provided by an embodiment of the present application is shown. Fig.10 As shown, the virtual keyboard setting device 10 of this embodiment is used to implement the operation corresponding to the server in any of the above method embodiments. The virtual keyboard setting device 10 of this embodiment may include:
[0166] The first acquisition module 11 is used to acquire a selection instruction.
[0167] The first determining module 12 is used to determine a keyboard mode according to the selection instruction, where the keyboard mode includes one or more of a left-hand mode, a right-hand mode and a standard mode.
[0168] The second acquisition module 13 is used to acquire keyboard parameters.
[0169] The second determining module 14 is used to determine keyboard layout parameters according to keyboard parameters and keyboard mode. The keyboard layout parameters include keyboard width, keyboard height and keyboard display position.
[0170] The virtual keyboard setting device 10 provided in the embodiment of the present application can execute the above method embodiment. Its specific implementation principle and technical effects can be found in the above method embodiment, and this embodiment will not be repeated here.
[0171] Fig.11 A schematic diagram of the structure of another virtual keyboard setting device provided in an embodiment of the present application is shown. Fig.10 Based on the embodiment shown, Fig.11As shown, the virtual keyboard setting device 10 of this embodiment is used to implement the operation corresponding to the server in any of the above method embodiments, and the virtual keyboard setting device 10 of this embodiment also includes:
[0172] The selection module 15 is used to display a selection box, which includes multiple keyboard mode options; correspondingly, the first acquisition module is specifically used to acquire selection instructions acting on the keyboard mode options in the selection box.
[0173] The display module 16 is used to display the keyboard floating window according to the keyboard layout parameters.
[0174] The moving module 17 is used to respond to the moving instruction on the keyboard floating window and change the display position of the keyboard floating window.
[0175] The rotation module 18 is used to respond to a rotation instruction of the interface where the keyboard floating window is located, rotate the keyboard floating window, and reconfirm the keyboard layout parameters according to the rotated interface and the keyboard layout parameters.
[0176] The switching module 19 is used to obtain a switching instruction and update the keyboard mode according to the switching instruction.
[0177] The virtual keyboard setting device 10 provided in the embodiment of the present application can execute the above method embodiment. Its specific implementation principle and technical effects can be found in the above method embodiment, and this embodiment will not be repeated here.
[0178] Fig.12 A schematic diagram of the structure of another virtual keyboard setting device provided in an embodiment of the present application is shown. Fig.10 and Fig.11 Based on the embodiment shown, Fig.12 As shown, the virtual keyboard setting device 10 of this embodiment is used to implement the operation corresponding to the server in any of the above method embodiments. The second determination module 14 of this embodiment specifically includes:
[0179] The first determining submodule 141 is used to determine the keyboard width according to the first trigger position and the keyboard mode.
[0180] The second determining submodule 142 is used to determine the keyboard height according to the second trigger position and the third trigger position.
[0181] The third determining submodule 143 is used to determine the actual position of the keyboard according to the second trigger position and the keyboard mode.
[0182] The virtual keyboard setting device 10 provided in the embodiment of the present application can execute the above method embodiment. Its specific implementation principle and technical effects can be found in the above method embodiment, and this embodiment will not be repeated here.
[0183] Fig.13 The hardware structure diagram of an electronic device provided by an embodiment of the present application is shown. As shown in FIG13 , the electronic device 20 is used to implement the operation corresponding to the electronic device in any of the above method embodiments. The electronic device 20 of this embodiment may include: a memory 21, a processor 22 and a communication interface 22.
[0184] The memory 21 is used to store computer programs.
[0185] The processor 22 is used to execute the computer program stored in the memory to implement the method for setting the virtual keyboard in the above embodiment. For details, please refer to the relevant description in the above method embodiment.
[0186] Optionally, the memory 21 may be independent or integrated with the processor 22 .
[0187] When the memory 21 is a device independent of the processor 22, the electronic device 20 may further include:
[0188] The bus 23 is used to connect the memory 21 and the processor 22 .
[0189] Optionally, this embodiment further includes: a communication interface 24, which can be connected to the processor 21 through the bus 23. The processor 22 can control the communication interface 24 to implement the above-mentioned receiving and sending functions of the electronic device 20.
[0190] After logging into the account, the processor 22 can control the communication interface 24 to upload the user data to the cloud storage space corresponding to the account. The processor 22 can also control the communication interface 24 to download the user data in the cloud storage space corresponding to the user's account to the local computer. The user data may include the keyboard mode selected by the user and the keyboard parameters corresponding to the keyboard mode.
[0191] The electronic device provided in this embodiment can be used to execute the above-mentioned method for setting a virtual keyboard. Its implementation method and technical effect are similar, and this embodiment will not be repeated here.
[0192] The present application also provides a computer-readable storage medium, the computer-readable storage medium includes a computer program, and the computer program is used to implement the setting method of the virtual keyboard in the above embodiment.
[0193] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0194] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0195] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The above-mentioned module-composed unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
[0196] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.
[0197] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The steps of the method disclosed in the invention may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0198] The memory may include high-speed random access memory (RAM), and may also include non-volatile memory (NVM), such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a disk or an optical disk, etc.
[0199] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0200] The computer-readable storage medium may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. The storage medium may be any available medium that can be accessed by a general or special-purpose computer.
[0201] Those skilled in the art will appreciate that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed. The aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various media that can store program codes.
[0202] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the above embodiments can still be modified, or some or all of the technical features can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for setting a virtual keyboard, applied to an electronic device, characterized in that: The method comprises: Obtaining a biometric parameter acting on a keyboard mode option, the biometric parameter including a position where a user's finger clicks on the screen; Determining a keyboard mode selected by the user according to the width of the screen and the position where the user's finger clicks the screen, the keyboard mode including one or more of a left-hand mode, a right-hand mode and a standard mode; Determine a keyboard layout parameter according to the biological parameter and the keyboard mode, wherein the keyboard layout parameter includes at least one of a keyboard width, a keyboard height, and a keyboard display position; When the keyboard mode is the right-hand mode, determining the keyboard layout parameters according to the biological parameters and the keyboard mode includes: Determining a fourth trigger position according to the position where the finger clicks the screen; determining a keyboard width according to a fourth trigger position and a right boundary of the electronic device; Determining the keyboard height according to the keyboard width and a preset ratio; Determining an upper boundary and a lower boundary of the keyboard according to the keyboard height and the fourth trigger position; The determining the keyboard mode selected by the user according to the width of the screen and the position where the user's finger clicks the screen includes: comparing the width of the screen with a preset width; If the width of the screen is less than or equal to the preset width, when the clicked position is located in the left half of the screen, it is determined that the mode selected by the user is the right-hand mode; when the clicked position is located in the right half of the screen, it is determined that the mode selected by the user is the left-hand mode; If the width of the screen is greater than the preset width, when the clicked position is on the left half of the screen, the mode selected by the user is determined to be the left-hand mode; when the clicked position is on the right half of the screen, the mode selected by the user is determined to be the right-hand mode.
2. The method for setting a virtual keyboard according to claim 1, characterized in that: After determining the keyboard layout parameters, the method further includes: The keyboard floating window is displayed according to the keyboard layout parameters.
3. The method for setting a virtual keyboard according to claim 2, characterized in that: After displaying the keyboard floating window according to the keyboard layout parameters, the method further includes: In response to a movement instruction on the keyboard floating window, a display position of the keyboard floating window is changed.
4. The method for setting a virtual keyboard according to claim 2, characterized in that: After displaying the keyboard floating window according to the keyboard layout parameters, the method further includes: In response to a rotation instruction of the interface where the keyboard floating window is located, the keyboard floating window is rotated, wherein the keyboard layout parameters are reconfirmed according to the rotated interface and the keyboard layout parameters.
5. The method for setting a virtual keyboard according to any one of claim 1, characterized in that: After determining the keyboard layout parameters, the method further includes: A switching instruction is obtained, and the keyboard mode is updated according to the switching instruction. The switching can be triggered by a key, or by voice, or by biological parameter detection.
6. An electronic device, characterized in that: include: Memory, processor and communication interface; The memory is used to store the processor executable instructions; The communication interface is used to obtain or send information according to the instructions of the processor; The processor is used to execute a setting method for implementing a virtual keyboard as claimed in any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the virtual keyboard setting method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Left or right hand adapting virtual keyboard display method and terminal
CN102810039A
Method for automatically adjusting keyboard display block of touch screen
CN104182155A
Method and device for layout of customized keyboard
CN107015748A
Method for adjusting input virtual keyboard and input apparatus
US20170300227A1