Virtual keyboard display method and device and electronic equipment

文档序号:1904098 发布日期:2021-11-30 浏览:2次 中文

阅读说明:本技术 一种虚拟键盘显示方法、装置和电子设备 (Virtual keyboard display method and device and electronic equipment ) 是由 何福林 史少琰 于 2021-07-29 设计创作,主要内容包括:本发明实施例提供了一种虚拟键盘显示方法、装置和电子设备,其中,所述方法包括:获取虚拟键盘中按键对应的图层,所述图层包括文字层、键帽层和光源层;所述文字层为所述按键提供文字,所述键帽层为所述按键提供底色,所述光源层为所述按键提供光源;对所述文字层和所述键帽层进行Alpha遮罩处理,形成漏光键帽层;所述漏光键帽层中包含形状为所述文字且透明的文字区域;在显示所述虚拟键盘时,通过所述光源层透过所述漏光键帽层中为所述文字区域提供光源,以及,通过所述光源层为所述漏光键帽层周围的区域提供光源。本发明实施例可以根据用户需求选择的图层来显示对应的虚拟键盘,通过根据用户需求为用户提供漏光式流光键盘,提高了用户输入体验。(The embodiment of the invention provides a virtual keyboard display method, a virtual keyboard display device and electronic equipment, wherein the method comprises the following steps: obtaining a layer corresponding to a key in a virtual keyboard, wherein the layer comprises a text layer, a key cap layer and a light source layer; the character layer provides characters for the keys, the key cap layer provides ground colors for the keys, and the light source layer provides light sources for the keys; carrying out Alpha mask processing on the character layer and the key cap layer to form a light leakage key cap layer; the light leakage key cap layer comprises a character area which is transparent and takes the shape of the character; when the virtual keyboard is displayed, the light source layer penetrates through the light leakage key cap layer to provide light sources for the character areas, and the light source layer provides light sources for the areas around the light leakage key cap layer. According to the embodiment of the invention, the corresponding virtual keyboard can be displayed according to the layer selected by the user requirement, and the light leakage type streamer keyboard is provided for the user according to the user requirement, so that the user input experience is improved.)

1. A virtual keyboard display method, the method comprising:

obtaining a layer corresponding to a key in a virtual keyboard, wherein the layer comprises a text layer, a key cap layer and a light source layer; the character layer provides characters for the keys, the key cap layer provides ground colors for the keys, and the light source layer provides light sources for the keys;

carrying out Alpha mask processing on the character layer and the key cap layer to form a light leakage key cap layer; the light leakage key cap layer comprises a character area which is transparent and takes the shape of the character;

and providing a light source for the character region through the light source layer and the light leakage key cap layer, and providing a light source for the region around the light leakage key cap layer through the light source layer.

2. The method of claim 1, wherein the light source layer comprises a background layer and a halo layer, wherein the providing the light source for the text region through the light-leaking keycap layer by the light source layer and the providing the light source for the region around the light-leaking keycap layer by the light source layer comprises:

a light source is provided for the character area through the background layer and the light leakage key cap layer;

and providing a light source for the area around the light leakage key cap layer through the halo layer.

3. The method of claim 1, further comprising:

responding to touch operation aiming at the keys, and determining corresponding light effect attribute parameters, wherein the light effect attribute parameters are used for forming a streamer animation effect of the virtual keyboard;

determining a target key participating in forming the streamer animation effect in the virtual keyboard according to the light effect attribute parameters;

and linking the light source layer of the target key to provide a light source according to the light effect attribute parameters so as to form the streamer animation effect.

4. The method of claim 3, further comprising:

and responding to the selection operation aiming at the streamer animation effect, and determining the light effect attribute parameters for forming the streamer animation effect.

5. The method according to claim 3, wherein the light effect property parameters comprise at least one of animation duration, animation interval time, light source color, light source brightness, light source transparency, light source shape, light source path, light source response range.

6. The method of claim 1, further comprising:

responding to the switching operation aiming at the character layer, and determining a target character layer;

and switching the character layer into the target character layer, and performing Alpha masking treatment on the target character layer and the key cap layer to form a light leakage key cap layer.

7. The method of claim 2, wherein the text layer is smaller in size than the key cap layer, the key cap layer is smaller in size than the background layer, and the background layer is smaller in size than the halo layer.

8. A virtual keyboard display apparatus, the apparatus comprising:

the layer obtaining module is used for obtaining a layer corresponding to a key in a virtual keyboard, and the layer comprises a text layer, a key cap layer and a light source layer; the character layer provides characters for the keys, the key cap layer provides ground colors for the keys, and the light source layer provides light sources for the keys;

the mask processing module is used for carrying out Alpha mask processing on the character layer and the key cap layer to form a light leakage key cap layer; the light leakage key cap layer comprises a character area which is transparent and takes the shape of the character;

and the light source providing module is used for providing a light source for the character area through the light leakage key cap layer by the light source layer and providing a light source for the area around the light leakage key cap layer by the light source layer.

9. An electronic device comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory, and wherein the one or more programs configured to be executed by the one or more processors comprise instructions for performing the virtual keyboard display method of any of method claims 1-7.

10. A readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the virtual keyboard display method of any of method claims 1-7.

Technical Field

The embodiment of the invention relates to the technical field of input methods, in particular to a virtual keyboard display method, a virtual keyboard display device and electronic equipment.

Background

With the development of computer technology, electronic devices such as mobile phones and tablet computers are more and more popular, and great convenience is brought to life, study and work of people. These electronic devices are typically installed with an input method application (abbreviated as input method) so that a user can input information using the input method.

In order to make the input method more pleasant, the input method provides a streamer keyboard with a cool appearance function for a user on an electronic device, and particularly, the streamer keyboard provides streamer effects for keys in a virtual keyboard when displaying the virtual keyboard of the input method, however, the streamer keyboard can only be designed by a designer in advance, and then the streamer keyboard can be displayed on the input method.

Disclosure of Invention

The embodiment of the invention provides a virtual keyboard display method, which provides a streamer keyboard for a user according to the user requirement and improves the user input experience.

Correspondingly, the embodiment of the invention also provides a virtual keyboard display device and electronic equipment, which are used for ensuring the realization and application of the method.

In order to solve the above problem, an embodiment of the present invention discloses a virtual keyboard display method, which specifically includes:

obtaining a layer corresponding to a key in a virtual keyboard, wherein the layer comprises a text layer, a key cap layer and a light source layer; the character layer is used for providing characters for the keys, the key cap layer is used for providing ground colors for the keys, and the light source layer is used for providing light sources for the keys;

carrying out Alpha mask processing on the character layer and the key cap layer to form a light leakage key cap layer; the light leakage key cap layer comprises a character area which is transparent and takes the shape of the character;

and providing a light source for the character region through the light source layer and the light leakage key cap layer, and providing a light source for the region around the light leakage key cap layer through the light source layer.

Optionally, the light source layer includes a background layer and a halo layer, the light source layer provides a light source for the text region through the light-leakage keycap layer, and the light source layer provides a light source for a region around the light-leakage keycap layer, including: a light source is provided for the character area through the background layer and the light leakage key cap layer; and providing a light source for the area around the light leakage key cap layer through the halo layer.

Optionally, the method further comprises: responding to touch operation aiming at the keys, and determining corresponding light effect attribute parameters, wherein the light effect attribute parameters are used for forming a streamer animation effect of the virtual keyboard; determining a target key participating in forming the streamer animation effect in the virtual keyboard according to the light effect attribute parameters; and linking the light source layer of the target key to provide a light source according to the light effect attribute parameters so as to form the streamer animation effect.

Optionally, the method further comprises: and responding to the selection operation aiming at the streamer animation effect, and determining the light effect attribute parameters for forming the streamer animation effect.

Optionally, the light effect attribute parameters include at least one of animation duration, animation interval time, light source color, light source brightness, light source transparency, light source shape, light source path, and light source response range.

Optionally, the method further comprises: responding to the switching operation aiming at the character layer, and determining a target character layer; and switching the character layer into the target character layer, and performing Alpha masking treatment on the target character layer and the key cap layer to form a light leakage key cap layer.

Optionally, the size of the text layer is smaller than that of the key cap layer, the size of the key cap layer is smaller than that of the background layer, and the size of the background layer is smaller than that of the halo layer.

The embodiment of the invention also discloses a virtual keyboard display device, which comprises:

the layer obtaining module is used for obtaining a layer corresponding to a key in a virtual keyboard, and the layer comprises a text layer, a key cap layer and a light source layer; the character layer is used for providing characters for the keys, the key cap layer is used for providing ground colors for the keys, and the light source layer is used for providing light sources for the keys;

the mask processing module is used for carrying out Alpha mask processing on the character layer and the key cap layer to form a light leakage key cap layer; the light leakage key cap layer comprises a character area which is transparent and takes the shape of the character;

and the light source providing module is used for providing a light source for the character area through the light leakage key cap layer by the light source layer and providing a light source for the area around the light leakage key cap layer by the light source layer.

Optionally, the light source layer includes a background layer and a halo layer, and the light source providing module is configured to provide a light source for the text region through the background layer and through the light leakage key cap layer; and providing a light source for the area around the light leakage key cap layer through the halo layer.

Optionally, the apparatus further comprises: the device comprises a streaming animation effect determining module, a virtual keyboard and a control module, wherein the streaming animation effect determining module is used for responding to touch operation aiming at the keys and determining corresponding light effect attribute parameters, and the light effect attribute parameters are used for forming a streaming animation effect of the virtual keyboard; determining a target key participating in forming the streamer animation effect in the virtual keyboard according to the light effect attribute parameters; and linking the light source layer of the target key to provide a light source according to the light effect attribute parameters so as to form the streamer animation effect.

Optionally, the apparatus further comprises: and the light effect attribute parameter determining module is used for responding to selection operation aiming at the streamer animation effect and determining the light effect attribute parameters for forming the streamer animation effect.

Optionally, the light effect attribute parameters include at least one of animation duration, animation interval time, light source color, light source brightness, light source transparency, light source shape, light source path, and light source response range.

Optionally, the apparatus further comprises: the character switching module is used for responding to the switching operation aiming at the character layer and determining a target character layer; and switching the character layer into the target character layer, and performing Alpha masking treatment on the target character layer and the key cap layer to form a light leakage key cap layer.

Optionally, the size of the text layer is smaller than that of the key cap layer, the size of the key cap layer is smaller than that of the background layer, and the size of the background layer is smaller than that of the halo layer.

The embodiment of the invention also discloses a readable storage medium, and when the instructions in the storage medium are executed by a processor of the electronic equipment, the electronic equipment can execute the virtual keyboard display method in any one of the embodiments of the invention.

The embodiment of the invention also discloses an electronic device, which comprises a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs are configured to be executed by one or more processors and comprise a virtual keyboard display method for performing any one of the embodiments of the invention.

The embodiment of the invention has the following advantages:

in the embodiment of the invention, when the virtual keyboard is displayed, the image layer corresponding to the keys in the virtual keyboard is obtained, the image layer comprises a character layer, a key cap layer and a light source layer, Alpha mask processing is carried out on the character layer and the key cap layer to form a light leakage key cap layer containing a character area which is transparent and takes the shape of characters in the character layer, the light source layer penetrates through the light leakage key cap layer to provide a light source for the character area, and the light source layer provides a light source for the area around the light leakage key cap layer, so that the light leakage type light flowing keyboard is formed. According to the embodiment of the invention, the keys in the virtual keyboard are divided into the text layer, the key cap layer and the light source layer, and the corresponding virtual keyboard can be displayed according to the layer selected by the user requirement, so that the light leakage type streamer keyboard is provided for the user according to the user requirement, and the user input experience is improved.

Drawings

FIG. 1 is a flowchart illustrating steps of a method for displaying a virtual keyboard according to an embodiment of the present invention;

FIG. 2 is a schematic diagram of a light leakage key cap layer of the present invention;

FIG. 3 is a schematic diagram of a virtual keyboard according to the present invention;

FIG. 4 is a flowchart illustrating steps in an alternative embodiment of a virtual keyboard display method of the present invention;

FIG. 5 is a schematic diagram of a plurality of layers of a key of the present invention;

FIG. 6 is a block diagram of a virtual keyboard display device according to an embodiment of the present invention;

FIG. 7 illustrates a block diagram of an electronic device for virtual keyboard display in accordance with an exemplary embodiment;

fig. 8 is a schematic structural diagram of an electronic device for virtual keyboard display according to another exemplary embodiment of the present invention.

Detailed Description

In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.

Referring to fig. 1, a flowchart illustrating steps of an embodiment of a virtual keyboard display method according to the present invention is shown, which may specifically include the following steps:

102, obtaining a layer corresponding to a key in a virtual keyboard, wherein the layer comprises a text layer, a key cap layer and a light source layer; the character layer provides characters for the keys, the key cap layer provides ground colors for the keys, and the light source layer provides light sources for the keys.

In the embodiment of the invention, each key in the virtual keyboard of the input method is provided with a corresponding layer, and the layer at least comprises a text layer, a key cap layer and a light source layer. Wherein, the character layer is used for providing characters for the keys, for example, the characters [ H ] can be provided for the keys through the character layer [ H ]; the key cap layer is used for providing a base color for the keys, for example, black can be provided for the keys through the black key cap layer as the base color; the light source layer is used for providing light sources for the keys, and for example, colored light sources can be provided for the keys through the colored light source layer.

Of course, besides the text layer, the key cap layer and the light source layer, other patterns may be further provided for the key, for example, patterns of various patterns are provided for the key through the pattern layer, which is not required to be limited in the embodiment of the present invention.

104, carrying out Alpha mask processing on the character layer and the key cap layer to form a light leakage key cap layer; the light leakage key cap layer comprises a character area which is transparent and takes the shape of the character.

Specifically, in the embodiment of the present invention, the size of the text layer is smaller than that of the key cap layer, and the key cap layer and the text layer are subtracted from each other to form a light leakage key cap layer including a text region which is transparent and has the shape of the text layer. For example, referring to fig. 2, which is a schematic diagram of a light-leaking keycap layer according to the present invention, a transparent light-leaking keycap layer 204 with a character shape of [ H ] can be obtained by subtracting two image layers, i.e., a character layer with characters [ H ] and a black keycap layer, and at this time, a light source can transmit through the character region 202.

And 106, when the virtual keyboard is displayed, providing a light source for the character area through the light leakage key cap layer by the light source layer, and providing a light source for the area around the light leakage key cap layer by the light source layer.

The light source may be a light source with various effects, such as a red light source, a colored light source, a flashing light source, a light source with alternate brightness and darkness, a colorful and gradient light source, and the like.

The area around the light-leaking key cap layer (key cap layer) is within a certain range near the key cap layer, as an example of the present invention, there is usually a certain gap between the key cap layers, and the area around the key cap layer may be an area not exceeding the gap.

In the embodiment of the invention, when the keys of the virtual keyboard are displayed, the light source layer can be used for providing the light source for the light leakage key cap layer, so that the light source can display the characters corresponding to the effect of the light source on the light leakage key cap layer through the character area of the light leakage key cap layer, and the light source can display the effect corresponding to the light source for the area around the light leakage key cap layer.

Referring to fig. 3, according to the schematic view of the key of the virtual keyboard, when the light source layer provides a light source for the light leakage keycap layer, the light source can penetrate through the transparent light leakage keycap layer with the shape of the text region being H, and the light source can be displayed around the light leakage keycap layer, so that the key looks scientific and technological, and provides a cool visual experience for a user.

In the virtual keyboard display method, when the virtual keyboard is displayed, a graph corresponding to a key in the virtual keyboard is obtained, the graph layer comprises a character layer, a key cap layer and a light source layer, Alpha mask processing is carried out on the character layer and the key cap layer, a light leakage key cap layer which is transparent and is in the shape of characters in the character layer is formed, when the virtual keyboard is displayed, the light source layer penetrates through the light leakage key cap layer to provide a light source for the character area, and the light source layer provides a light source for the area around the light leakage key cap layer, so that the light leakage type light flowing keyboard is formed. According to the embodiment of the invention, the keys in the virtual keyboard are divided into the text layer, the key cap layer and the light source layer, and the corresponding virtual keyboard can be displayed according to the layer selected by the user requirement, so that the light leakage type streamer keyboard is provided for the user according to the user requirement, and the user input experience is improved.

Referring to fig. 4, a flowchart illustrating steps of an alternative embodiment of a virtual keyboard display method according to the present invention is shown, which may specifically include the following steps:

step 402, obtaining a layer corresponding to a key in a virtual keyboard, wherein the layer comprises a text layer, a key cap layer and a light source layer; the character layer provides characters for the keys, the key cap layer provides ground colors for the keys, and the light source layer provides light sources for the keys.

Step 404, performing Alpha masking treatment on the character layer and the key cap layer to form a light leakage key cap layer; the light leakage key cap layer comprises a character area which is transparent and takes the shape of the character.

Step 406, providing a light source for the text region through the light leakage key cap layer by the light source layer, and providing a light source for the region around the light leakage key cap layer by the light source layer.

In an exemplary embodiment, the step 406 of providing a light source layer including a background layer and a halo layer for providing a light source for the text region through the light-leaking keycap layer and providing a light source for the region around the light-leaking keycap layer through the light source layer may include the steps of:

a light source is provided for the character area through the background layer and the light leakage key cap layer;

and providing a light source for the area around the light leakage key cap layer through the halo layer.

In the embodiment of the invention, the light source layer comprises a background layer and a halo layer, wherein the background layer is mainly used for providing light sources for character areas in the light leakage key cap layer, and the halo layer is used for providing light sources for areas around the light leakage key cap layer, so that various streamer animation effects are displayed.

Referring to fig. 5, a schematic diagram of multiple image layers of a key according to the present invention is shown, wherein a background layer 504 is located between a light leakage key cap layer 502 and a halo layer 506, the size of the key cap layer (light leakage key cap layer) 502 is smaller than that of the background layer 504, and the size of the background layer 504 is smaller than that of the halo layer 506, so that the halo layer 506 is not completely shielded by the background layer 504, so that a light source can be provided in the area around the light leakage key cap layer 502 in the halo layer 504.

In the embodiment of the present invention, the light sources provided by the halo layer and the background layer may be of the same color system, for example, both are red or both are colored, and of course, in order to provide more styles of virtual keyboards for users, the halo layer and the background layer may also be of different color systems, for example, the background layer is a green light source, and the halo layer is a colorful and gradient light source.

Step 408, responding to the touch operation aiming at the key, and determining a corresponding light effect attribute parameter; the light effect attribute parameters are used for forming a stream light animation effect of the virtual keyboard.

In an exemplary embodiment, the light effect property parameters include at least one of animation duration, animation interval time, light source color, light source brightness, light source transparency, light source shape, light source path, and light source response range.

In the embodiment of the invention, each streamer animation effect has the corresponding light effect attribute parameter, a user can select the streamer animation effect displayed on the virtual keyboard according to the requirement, and the input method acquires the corresponding light effect attribute parameter according to the streamer animation effect selected by the user.

Specifically, the animation duration in the light effect attribute parameter refers to a length of time for displaying the streamer animation effect on the virtual keyboard, and may be 3s (seconds), for example; the animation interval time refers to a visual interval for displaying the streamer animation effect on the virtual keyboard, and may be, for example, an interval of 1 s; the light source color refers to the color of the light source provided by the background layer and the halo layer, for example, the background layer may provide a red light source, and the halo layer may provide a light source with a color gradient; the light source brightness refers to the brightness of the light source; the light source transparency refers to the transparency of the light leakage key cap layer penetrated by the light source; the light source shape refers to a shape of the light source displayed on the virtual keyboard, and may be, for example, a water wave, a stripe, or the like; the light source path refers to a path displayed by a light source on a virtual keyboard, for example, the light source moves from top to bottom according to a row or a column of the keyboard on the virtual keyboard; the light source response range refers to a display range of the light source on the virtual keyboard, and for example, the light source may be displayed only on the left side of the virtual keyboard or on the entire virtual keyboard. Of course, the light effect attribute parameters are only examples, and in practice, other light effect attribute parameters may be set, so that different streamer animation effects are formed on the virtual keyboard, which is not required to be limited in the embodiment of the present invention.

In the embodiment of the present invention, the touch operation may refer to a click operation on a key in the virtual keyboard, a sliding operation on the key on the virtual keyboard, or the like. After the touch operation of the user on the virtual keyboard is detected, the selected light effect attribute parameters can be obtained. For example, assuming that the user has selected the input method skin of the water ripple, after detecting the touch operation of the [ H ] key on the virtual keyboard by the user, the light effect attribute parameter corresponding to the skin is obtained, and the flowing light animation effect of the water ripple is displayed at the [ H ] key.

And step 410, determining a target key participating in forming the streamer animation effect in the virtual keyboard according to the light effect attribute parameters.

And step 412, linking the light source layer of the target key to provide a light source according to the light effect attribute parameters to form the streamer animation effect.

In the embodiment of the invention, the linkage refers to that the virtual keyboard participates in forming the target key of the streamer animation effect, when the light source layer of one key provides light sources, the light source layers of other keys also correspondingly provide light sources, and the streamer animation effect is formed through linkage of the light source layers of a plurality of keys, wherein the key participating in forming one streamer animation effect on the virtual keyboard is the target key.

In the specific implementation, different streamer animation effects are different, and target keys needing to be linked to participate in forming the streamer animation effects in the virtual keyboard are also different. For example, if the light source path is that the light source moves two lines from left to right with the key pressed by the user as a starting point, and the light source response range is the virtual keyboard on the left, the target key that needs to participate in forming the streamer animation effect is the key on the upper left corner of the virtual keyboard, and the light source layers of the target keys are linked to form the corresponding streamer animation effect according to the light effect attribute parameters.

In the virtual keyboard display method, when a touch operation of a user on the virtual keyboard is detected, for example, a click operation on a certain key is detected, the background layer and the halo layer are controlled to provide light sources according to the light effect attribute parameters corresponding to the selected streamer animation effect, and the streamer animation effect is formed on the virtual keyboard, so that the method is simple and easy to implement.

In an exemplary embodiment, the method may further include the steps of: and responding to the selection operation aiming at the streamer animation effect, and determining the light effect attribute parameters for forming the streamer animation effect.

In the embodiment of the present invention, a plurality of kinds of streamer animation effects may be preset, and a user may select the streamer animation effects according to his own needs, for example, if the user wants to display the streamer animation effects of ripple water ripples on a virtual keyboard, the light effect attribute parameters corresponding to the water ripples may be obtained. As an optional example of the present invention, a user may select a certain streamer animation effect, or further adjust a light effect attribute parameter in the streamer animation effect, for example, assuming that an animation time duration in the streamer animation effect is 3s, the user may adjust to 2s, and further, for example, assuming that a light source response range in the streamer animation effect is from a position where a user key is pressed as a starting point, a light source is displayed from left to right to an edge of the virtual keyboard, and the user may adjust to use the position where the user key is pressed as a starting point, and two keys of the virtual keyboard from left to right display a light source.

In the above optional embodiment, the user may select the streamer animation effect of the virtual keyboard, so that the corresponding streamer animation effect may be displayed on the virtual keyboard, and further, the input experience of the user is improved.

In an exemplary embodiment, the method may further include the steps of: responding to the switching operation aiming at the character layer, and determining a target character layer; and switching the character layer into the target character layer, and performing Alpha masking treatment on the target character layer and the key cap layer to form a light leakage key cap layer.

In the prior art, the keys in the virtual keyboard are a whole, that is, if a user wants to switch the characters of the virtual keyboard to another font or language, the user needs to switch the whole to the virtual keyboard corresponding to the font or language.

In the embodiment of the present invention, the keys in the virtual keyboard are divided into a plurality of image layers, for example, text layers, which can be switched according to the font or language desired by the user, for example, when the user wants to switch the font from [ chinese running regular script ] to [ microsoft elegant black ], the text layer of [ microsoft elegant black ] is the target text layer, the input method receives the switching instruction, replaces the text layer of [ chinese running regular script ] with the target text layer, and then performs Alpha masking on the target text layer and the keycap layer to form the light leakage keycap layer, so that the font on the virtual keyboard is displayed as microsoft elegant black ].

As an optional example, the virtual keyboard further includes layers such as a keycap layer, a background layer, and a halo layer, and the user may switch the layers. Specifically, if the user wants to switch the color of the key, for example, from black to white, the white key cap layer is replaced with the black key cap layer; if the user wants to switch the light source color of the font in the key, for example, from color gradient to red, the red background layer is replaced by the color gradient background layer; if the user wants to switch the color of the light source displayed around the key, for example from color gradient to red, the halo layer of red is replaced by the halo layer of color gradient.

In the optional embodiment, the user can switch the layers of the keyboard in the virtual keyboard, so that the layers are replaced by characters, ground colors, streaming animation effects and the like required by the user, the personalized setting of the user on the virtual keyboard is realized, and the input experience of the user is further improved.

The embodiment of the invention at least has the following advantages: firstly, on the basis of displaying the stream animation effect on a virtual keyboard, the virtual keyboard can be switched to any font by switching a character layer; secondly, the light effect attribute parameters of the streamer animation effect can be opened to a skin author (or a user) to be set (such as single animation time length, animation interval time, light source color, light source brightness, light source transparency, light source shape, light source path, light source response range and the like); third, the streamer animation effect can be applied to virtual keyboards of any font or language.

It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.

Referring to fig. 6, a block diagram of a virtual keyboard display device according to an embodiment of the present invention is shown, and may specifically include the following modules:

the layer obtaining module 602 is configured to obtain a layer corresponding to a key in a virtual keyboard, where the layer includes a text layer, a key cap layer, and a light source layer; the character layer is used for providing characters for the keys, the key cap layer is used for providing ground colors for the keys, and the light source layer is used for providing light sources for the keys;

a mask processing module 604, configured to perform Alpha mask processing on the text layer and the key cap layer to form a light-leaking key cap layer; the light leakage key cap layer comprises a character area which is transparent and takes the shape of the character;

and a light source providing module 606 for providing a light source for the text region through the light leakage key cap layer by the light source layer, and providing a light source for the region around the light leakage key cap layer by the light source layer.

In an exemplary embodiment, the light source layer includes a background layer and a halo layer, and the light source providing module 606 is configured to provide a light source for the text region through the background layer and through the light leakage key cap layer; and providing a light source for the area around the light leakage key cap layer through the halo layer.

In an exemplary embodiment, the apparatus further comprises: the device comprises a streaming animation effect determining module, a virtual keyboard and a control module, wherein the streaming animation effect determining module is used for responding to touch operation aiming at the keys and determining corresponding light effect attribute parameters, and the light effect attribute parameters are used for forming a streaming animation effect of the virtual keyboard; determining a target key participating in forming the streamer animation effect in the virtual keyboard according to the light effect attribute parameters; and linking the light source layer of the target key to provide a light source according to the light effect attribute parameters so as to form the streamer animation effect.

In an exemplary embodiment, the apparatus further comprises: and the light effect attribute parameter determining module is used for responding to selection operation aiming at the streamer animation effect and determining the light effect attribute parameters for forming the streamer animation effect.

In an exemplary embodiment, the light effect property parameters include at least one of animation duration, animation interval time, light source color, light source brightness, light source transparency, light source shape, light source path, and light source response range.

In an exemplary embodiment, the apparatus further comprises: the character switching module is used for responding to the switching operation aiming at the character layer and determining a target character layer; and switching the character layer into the target character layer, and performing Alpha masking treatment on the target character layer and the key cap layer to form a light leakage key cap layer.

In an exemplary embodiment, the size of the text layer is smaller than that of the key cap layer, the size of the key cap layer is smaller than that of the background layer, and the size of the background layer is smaller than that of the halo layer.

In summary, in the embodiments of the present invention, the image layers corresponding to the keys in the virtual keyboard are obtained, where the image layer text layer, the keycap layer, and the light source layer perform Alpha mask processing on the text layer and the keycap layer to form the light leakage keycap layer including the text region that is transparent and takes the shape of the text in the text layer, and when the virtual keyboard is displayed, the light source layer provides a light source for the text region through the light leakage keycap layer, and the light source layer provides a light source for the region around the light leakage keycap layer, so as to form the light leakage type light flowing keyboard. According to the embodiment of the invention, the keys in the virtual keyboard are divided into the text layer, the key cap layer and the light source layer, and the corresponding virtual keyboard can be displayed according to the layer selected by the user requirement, so that the streamer keyboard is provided for the user according to the user requirement, and the user input experience is improved.

For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.

Fig. 7 is a block diagram illustrating a structure of an electronic device 700 for virtual keyboard display according to an example embodiment. For example, the electronic device 700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a gaming console, a tablet device, a medical device, a fitness device, a personal digital assistant, a smart wearable device, and the like.

Referring to fig. 7, electronic device 700 may include one or more of the following components: a processing component 702, a memory 704, a power component 606, a multimedia component 708, an audio component 710, an input/output (I/O) interface 712, a sensor component 714, and a communication component 716.

The processing component 702 generally controls overall operation of the electronic device 700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing element 702 may include one or more processors 720 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 702 may include one or more modules that facilitate interaction between the processing component 702 and other components. For example, the processing component 702 can include a multimedia module to facilitate interaction between the multimedia component 708 and the processing component 702.

The memory 704 is configured to store various types of data to support operation at the device 700. Examples of such data include instructions for any application or method operating on the electronic device 700, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 704 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.

The power component 706 provides power to the various components of the electronic device 700. The power components 706 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the electronic device 700.

The multimedia component 708 includes a screen that provides an output interface between the electronic device 700 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 700 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

The audio component 710 is configured to output and/or input audio signals. For example, the audio component 710 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 700 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 704 or transmitted via the communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.

The I/O interface 712 provides an interface between the processing component 702 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.

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

The communication component 716 is configured to facilitate wired or wireless communication between the electronic device 700 and other devices. The electronic device 700 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 714 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 714 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

In an exemplary embodiment, the electronic device 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.

In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 704 comprising instructions, executable by the processor 720 of the electronic device 700 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.

A non-transitory computer readable storage medium in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform a virtual keyboard display method, the method comprising: obtaining a layer corresponding to a key in a virtual keyboard, wherein the layer comprises a text layer, a key cap layer and a light source layer; the character layer is used for providing characters for the keys, the key cap layer is used for providing ground colors for the keys, and the light source layer is used for providing light sources for the keys; carrying out Alpha mask processing on the character layer and the key cap layer to form a light leakage key cap layer; the light leakage key cap layer comprises a character area which is transparent and takes the shape of the character; and providing a light source for the character region through the light source layer and the light leakage key cap layer, and providing a light source for the region around the light leakage key cap layer through the light source layer.

Optionally, the light source layer includes a background layer and a halo layer, the light source layer provides a light source for the text region through the light-leakage keycap layer, and the light source layer provides a light source for a region around the light-leakage keycap layer, including: a light source is provided for the character area through the background layer and the light leakage key cap layer; and providing a light source for the area around the light leakage key cap layer through the halo layer.

Optionally, the method further comprises: responding to touch operation aiming at the keys, and determining corresponding light effect attribute parameters, wherein the light effect attribute parameters are used for forming a streamer animation effect of the virtual keyboard; determining a target key participating in forming the streamer animation effect in the virtual keyboard according to the light effect attribute parameters; and linking the light source layer of the target key to provide a light source according to the light effect attribute parameters so as to form the streamer animation effect.

Optionally, the method further comprises: and responding to the selection operation aiming at the streamer animation effect, and determining the light effect attribute parameters for forming the streamer animation effect.

Optionally, the light effect attribute parameters include at least one of animation duration, animation interval time, light source color, light source brightness, light source transparency, light source shape, light source path, and light source response range.

Optionally, the method further comprises: responding to the switching operation aiming at the character layer, and determining a target character layer; and switching the character layer into the target character layer, and performing Alpha masking treatment on the target character layer and the key cap layer to form a light leakage key cap layer.

Optionally, the size of the text layer is smaller than that of the key cap layer, the size of the key cap layer is smaller than that of the background layer, and the size of the background layer is smaller than that of the halo layer.

Fig. 8 is a schematic structural diagram of an electronic device 800 for virtual keyboard display according to another exemplary embodiment of the present invention. The electronic device 800 may be a server, which may vary widely due to configuration or performance, and may include one or more Central Processing Units (CPUs) 822 (e.g., one or more processors) and memory 832, one or more storage media 830 (e.g., one or more mass storage devices) storing applications 842 or data 844. Memory 832 and storage medium 830 may be, among other things, transient or persistent storage. The program stored in the storage medium 830 may include one or more modules (not shown), each of which may include a series of instruction operations for the server. Still further, the central processor 822 may be configured to communicate with the storage medium 830 to execute a series of instruction operations in the storage medium 830 on the server.

The server may also include one or more power supplies 826, one or more wired or wireless network interfaces 850, one or more input-output interfaces 858, one or more keyboards 856, and/or one or more operating systems 841, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

An electronic device comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors the one or more programs including instructions for: obtaining a layer corresponding to a key in a virtual keyboard, wherein the layer comprises a text layer, a key cap layer and a light source layer; the character layer is used for providing characters for the keys, the key cap layer is used for providing ground colors for the keys, and the light source layer is used for providing light sources for the keys; carrying out Alpha mask processing on the character layer and the key cap layer to form a light leakage key cap layer; the light leakage key cap layer comprises a character area which is transparent and takes the shape of the character; and providing a light source for the character region through the light source layer and the light leakage key cap layer, and providing a light source for the region around the light leakage key cap layer through the light source layer.

Optionally, the light source layer includes a background layer and a halo layer, the light source layer provides a light source for the text region through the light-leakage keycap layer, and the light source layer provides a light source for a region around the light-leakage keycap layer, including: a light source is provided for the character area through the background layer and the light leakage key cap layer; and providing a light source for the area around the light leakage key cap layer through the halo layer.

Optionally, the method further comprises: responding to touch operation aiming at the keys, and determining corresponding light effect attribute parameters, wherein the light effect attribute parameters are used for forming a streamer animation effect of the virtual keyboard; determining a target key participating in forming the streamer animation effect in the virtual keyboard according to the light effect attribute parameters; and linking the light source layer of the target key to provide a light source according to the light effect attribute parameters so as to form the streamer animation effect.

Optionally, the method further comprises: and responding to the selection operation aiming at the streamer animation effect, and determining the light effect attribute parameters for forming the streamer animation effect.

Optionally, the light effect attribute parameters include at least one of animation duration, animation interval time, light source color, light source brightness, light source transparency, light source shape, light source path, and light source response range.

Optionally, the method further comprises: responding to the switching operation aiming at the character layer, and determining a target character layer; and switching the character layer into the target character layer, and performing Alpha masking treatment on the target character layer and the key cap layer to form a light leakage key cap layer.

Optionally, the size of the text layer is smaller than that of the key cap layer, the size of the key cap layer is smaller than that of the background layer, and the size of the background layer is smaller than that of the halo layer.

The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.

Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.

Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.

The virtual keyboard display method, the virtual keyboard display device and the electronic device provided by the invention are described in detail, specific examples are applied in the text to explain the principle and the implementation mode of the invention, and the description of the above embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

19页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:功率逐步唤醒机制

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类