Disclosure of Invention
In view of the above problems, the present application provides a key adjustment method, device, electronic device and storage medium, which are beneficial to reducing the rate of incorrect input when a user uses the electronic device for input.
In order to achieve the above object, an embodiment of the present application provides a key adjustment method, including:
acquiring a sensing area of a touch screen of the electronic equipment; the sensing area is generated when the distance between the finger of the user and the touch screen is smaller than or equal to a preset value;
comparing the area of the induction area with the area of the soft keyboard key displayed by the touch screen to obtain a comparison result;
and adjusting the size of the soft keyboard key according to the comparison result.
In one possible embodiment, before comparing the area of the sensing region with the area of the soft keyboard key displayed on the touch screen, the method further comprises:
receiving a first near field communication signal sent by a touch circuit of the touch screen;
and determining the area of the soft keyboard key according to the first near field communication signal.
In one possible embodiment, the first near field communication signal comprises position information of the soft keyboard keys; the determining the area of the soft keyboard key according to the first near field communication signal comprises:
demodulating the first near field communication signal to obtain the position information;
and determining the area of the soft keyboard key based on the position information.
In a possible implementation manner, the resizing the soft keyboard keys according to the comparison result includes:
if the area of the induction area is larger than that of the soft keyboard key, increasing the area of the soft keyboard key according to a preset proportion to obtain the adjusted area of the soft keyboard key;
comparing the adjusted area of the soft keyboard key with the area of the induction area;
and executing at least one adjustment operation on the size of the soft keyboard key until the area of the adjusted soft keyboard key is larger than or equal to the area of the induction area.
In a possible implementation manner, the acquiring a sensing area of a touch screen of an electronic device includes:
receiving a second near field communication signal sent by the touch circuit;
demodulating the second near field communication signal to obtain an area where electrostatic capacitance at the intersection of the X-axis electrode and the Y-axis electrode of the touch screen is larger than or equal to a threshold value;
determining a region where the electrostatic capacitance is greater than or equal to a threshold as the sensing region.
In one possible implementation, scanning, by the touch control circuit, an area where the electrostatic capacitance is greater than or equal to a threshold value by X-axis and Y-axis electrodes of the touch screen; the first near field communication signal is sent by the touch control circuit when the area with the electrostatic capacitance larger than or equal to the threshold value is detected.
Other embodiments of the present application provide a key adjustment apparatus, including:
the sensing acquisition module is used for acquiring a sensing area of a touch screen of the electronic equipment; the sensing area is generated when the distance between the finger of the user and the touch screen is smaller than or equal to a preset value;
the comparison module is used for comparing the area of the induction area with the area of the soft keyboard key displayed by the touch screen to obtain a comparison result;
and the key adjusting module is used for adjusting the size of the soft keyboard key according to the comparison result.
Other embodiments of the present application provide an electronic device comprising an input device, an output device, and a processor adapted to implement one or more instructions; and a computer storage medium storing one or more instructions adapted to be loaded by the processor and to perform the steps of:
acquiring a sensing area of a touch screen of the electronic equipment; the sensing area is generated when the distance between the finger of the user and the touch screen is smaller than or equal to a preset value;
comparing the area of the induction area with the area of the soft keyboard key displayed by the touch screen to obtain a comparison result;
and adjusting the size of the soft keyboard key according to the comparison result.
Still other embodiments of the present application provide a computer storage medium having stored thereon one or more instructions adapted to be loaded by a processor and to perform the steps of:
acquiring a sensing area of a touch screen of the electronic equipment; the sensing area is generated when the distance between the finger of the user and the touch screen is smaller than or equal to a preset value;
comparing the area of the induction area with the area of the soft keyboard key displayed by the touch screen to obtain a comparison result;
and adjusting the size of the soft keyboard key according to the comparison result.
It can be seen that, in the embodiment of the application, the sensing area of the touch screen of the electronic device is obtained; the sensing area is generated when the distance between the finger of the user and the touch screen is smaller than or equal to a preset value; comparing the area of the induction area with the area of the soft keyboard key displayed by the touch screen to obtain a comparison result; and adjusting the size of the soft keyboard key according to the comparison result. Therefore, when a user uses the touch screen of the electronic equipment, the induction area of the touch screen is obtained, the area of the induction area is compared with the area of a single key of the soft keyboard on the touch screen, the size of the single key is adjusted according to the comparison result, the soft keyboard key is adjusted for different users, and therefore the user is enabled not to touch adjacent keys by mistake when inputting, and further the wrong input rate is reduced.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "comprising" and "having," and any variations thereof, as appearing in the specification, claims and drawings of this application, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus. Furthermore, the terms "first," "second," and "third," etc. are used to distinguish between different objects and are not used to describe a particular order.
The embodiment of the application provides a scheme for adjusting the size of the keys of the soft keyboard aiming at the electronic equipment with the projection type capacitive touch screen, the scheme detects whether a sensing area exists on the touch screen, if so, the area size of the sensing area is obtained, in addition, the area of the single key of the soft keyboard on the touch screen is obtained through interaction with the touch circuit of the touch screen, the area of the induction area is compared with the area of the single key of the soft keyboard, if the area of the induction area is larger than the area of the single key of the soft keyboard, the area of the single key of the soft keyboard is increased according to the preset proportion each time until the area of the single key of the soft keyboard is smaller than or equal to the area of the induction area, therefore, the area of a single key of the soft keyboard can be flexibly adjusted according to the sizes of fingers of different users, and the error input rate of the user during input by using the electronic equipment is favorably reduced.
The key adjustment method provided by the embodiment of the application is explained in detail below with reference to the related drawings.
Referring to fig. 1, fig. 1 is a schematic flow chart of a key adjustment method provided in an embodiment of the present application, and is applied to an electronic device, where the electronic device includes a Central Processing Unit (CPU) for controlling display and touch functions and a touch circuit of a touch screen, the CPU is electrically connected to the touch circuit, and the method is executed by the CPU, as shown in fig. 1, and includes steps S11-S13:
s11, acquiring a sensing area of a touch screen of the electronic equipment; the sensing area is generated when the distance between the finger of the user and the touch screen is smaller than or equal to a preset value.
In the embodiment of the present application, the touch screen is a projected capacitive touch screen, a human body can conduct electricity due to a large amount of moisture, as shown in fig. 2, during use of the electronic device, as the user's finger gradually approaches the touch screen, when the distance between the finger of the user and the touch screen is less than or equal to the preset value, even if the finger does not contact the touch screen, the coupling capacitance is generated between the finger and the electrode of the touch screen, the coupling capacitance can change the electrostatic capacitance at the intersection of the X-axis electrode and the Y-axis electrode of the touch screen, as shown in fig. 3, the touch screen includes a transparent electrode layer X and a transparent electrode layer Y which are distributed in a matrix form, and a touch circuit of the touch screen scans the X-axis and the Y-axis of the matrix to detect an area where the electrostatic capacitance at the intersection of the X-axis electrode and the Y-axis electrode is greater than or equal to a threshold value, that is, an area where the electrostatic capacitance is increased due to the generation of the coupling capacitance.
The touch control circuit sends out a near field communication signal (namely a second near field communication signal) under the condition that the area with the electrostatic capacitance larger than or equal to the threshold value is detected, the near field communication signal comprises specific position information of the area with the electrostatic capacitance larger than or equal to the threshold value, after the main control CPU receives the near field communication signal, the near field communication signal is demodulated to obtain the specific position information of the area with the electrostatic capacitance larger than or equal to the threshold value, and the area with the electrostatic capacitance larger than or equal to the threshold value is determined as an induction area on the touch screen according to the specific position information. It can be understood that, compared with a scheme that the size of the soft keyboard key is adjusted by taking the actual pressing area of the finger of the user and the touch screen as the sensing area, determining the sensing area according to the coupling capacitance is beneficial to improving the accuracy of judging the actual size of the finger of the user, thereby being more beneficial to the accuracy of adjusting the size of the subsequent soft keyboard key.
And S12, comparing the area of the induction area with the area of the soft keyboard key displayed by the touch screen to obtain a comparison result.
In the embodiment of the present application, after detecting an area where the electrostatic capacitance is greater than or equal to the threshold, the touch circuit indicates that a touch event is or is about to occur, at this time, the touch circuit sends a near field communication signal (i.e., a first near field communication signal), where the near field communication signal includes position information of a single key of the soft keyboard displayed on the touch screen, and after receiving the near field communication signal, the main control CPU demodulates the near field communication signal to obtain the position information of the single key of the soft keyboard, and then calculates an area S1 of the single key according to the position information. In addition, after acquiring the sensing area, the main control CPU can obtain the area S2, and compare S1 with S2 to obtain a comparison result.
And S13, adjusting the size of the soft keyboard key according to the comparison result.
In this embodiment of the application, if the comparison result indicates that S2 is greater than S1, the size of the soft keyboard key is increased according to a preset ratio, for example, S1 is increased by 10% to obtain an adjusted area S3, then S3 is compared with S2, if S2 is still greater than S3, the size of the soft keyboard key is continuously increased according to the preset ratio, for example, S3 is increased by 10% to obtain a re-adjusted area S4, then S4 is compared with S2, and at least one operation of adjusting the size of the soft keyboard key is performed until the area S2 of the sensing region is less than or equal to the area Sn of the adjusted soft keyboard key. Optionally, if the comparison result indicates that the area of the sensing region is smaller than or equal to the area of the soft keyboard key, the size of the soft keyboard key is not adjusted.
It can be seen that, in the embodiment of the application, the sensing area of the touch screen of the electronic device is obtained; the sensing area is generated when the distance between the finger of the user and the touch screen is smaller than or equal to a preset value; comparing the area of the induction area with the area of the soft keyboard key displayed by the touch screen to obtain a comparison result; and adjusting the size of the soft keyboard key according to the comparison result. Therefore, when a user uses the touch screen of the electronic equipment, the induction area of the touch screen is obtained, the area of the induction area is compared with the area of a single key of the soft keyboard on the touch screen, the size of the single key is adjusted according to the comparison result, the soft keyboard key is adjusted for different users, and therefore the user is enabled not to touch adjacent keys by mistake when inputting, and further the wrong input rate is reduced.
Referring to fig. 4, fig. 4 is a schematic flow chart of another key adjustment method according to an embodiment of the present application, as shown in fig. 4, including steps S41-S45:
s41, acquiring a sensing area of a touch screen of the electronic equipment; the sensing area is generated when the distance between the finger of the user and the touch screen is smaller than or equal to a preset value;
s42, receiving a first near field communication signal sent by a touch circuit of the touch screen;
s43, determining the area of the soft keyboard key displayed by the touch screen according to the first near field communication signal;
in one possible embodiment, the first near field communication signal comprises position information of the soft keyboard keys; the determining the area of the soft keyboard key displayed by the touch screen according to the first near field communication signal includes:
demodulating the first near field communication signal to obtain the position information;
and determining the area of the soft keyboard key based on the position information.
S44, comparing the area of the induction area with the area of the soft keyboard key to obtain a comparison result;
and S45, adjusting the size of the soft keyboard key according to the comparison result.
In a possible implementation manner, the adjusting the size of the soft keyboard key according to the comparison result includes:
if the area of the induction area is larger than that of the soft keyboard key, increasing the area of the soft keyboard key according to a preset proportion to obtain the adjusted area of the soft keyboard key;
comparing the adjusted area of the soft keyboard key with the area of the induction area;
and executing at least one adjustment operation on the size of the soft keyboard key until the area of the adjusted soft keyboard key is larger than or equal to the area of the induction area.
In a possible implementation manner, the acquiring a sensing area of a touch screen of an electronic device includes:
receiving a second near field communication signal sent by the touch circuit;
demodulating the second near field communication signal to obtain an area where electrostatic capacitance at the intersection of the X-axis electrode and the Y-axis electrode of the touch screen is larger than or equal to a threshold value;
determining a region where the electrostatic capacitance is greater than or equal to a threshold as the sensing region.
Scanning an X-axis electrode and a Y-axis electrode of the touch screen through the touch circuit to detect an area of which the electrostatic capacitance is greater than or equal to a threshold value; the first near field communication signal is sent by the touch control circuit when the area with the electrostatic capacitance larger than or equal to the threshold value is detected.
The specific implementation of the steps S41-S45 is described in the embodiment shown in fig. 1, and can achieve the same or similar advantages, and will not be described herein again.
Based on the description of the method embodiment shown in fig. 1 or fig. 4, an embodiment of the present application further provides a key adjustment device, please refer to fig. 5, where fig. 5 is a schematic structural diagram of the key adjustment device provided in the embodiment of the present application, and as shown in fig. 5, the device includes:
the sensing acquisition module 51 is configured to acquire a sensing area of a touch screen of the electronic device; the sensing area is generated when the distance between the finger of the user and the touch screen is smaller than or equal to a preset value;
the comparison module 52 is configured to compare the area of the sensing area with the area of the soft keyboard key displayed on the touch screen to obtain a comparison result;
and the key adjusting module 53 is configured to adjust the size of the soft keyboard key according to the comparison result.
In one possible embodiment, as shown in fig. 6, the device further comprises a key acquisition module 54; the key acquisition module 54 is configured to:
receiving a first near field communication signal sent by a touch circuit of the touch screen;
and determining the area of the soft keyboard key according to the first near field communication signal.
In one possible embodiment, the first near field communication signal comprises position information of the soft keyboard keys; in terms of determining the area of the soft keyboard key according to the first near field communication signal, the key obtaining module 54 is specifically configured to:
demodulating the first near field communication signal to obtain the position information;
and determining the area of the soft keyboard key based on the position information.
In a possible implementation manner, in adjusting the size of the soft keyboard key according to the comparison result, the key adjusting module 53 is specifically configured to:
if the area of the induction area is larger than that of the soft keyboard key, increasing the area of the soft keyboard key according to a preset proportion to obtain the adjusted area of the soft keyboard key;
comparing the adjusted area of the soft keyboard key with the area of the induction area;
and executing at least one adjustment operation on the size of the soft keyboard key until the area of the adjusted soft keyboard key is larger than or equal to the area of the induction area.
In a possible implementation manner, in terms of acquiring a sensing area of a touch screen of an electronic device, the sensing acquisition module 51 is specifically configured to:
receiving a second near field communication signal sent by the touch circuit;
demodulating the second near field communication signal to obtain an area where electrostatic capacitance at the intersection of the X-axis electrode and the Y-axis electrode of the touch screen is larger than or equal to a threshold value;
determining a region where the electrostatic capacitance is greater than or equal to a threshold as the sensing region.
In one possible implementation, scanning, by the touch control circuit, an area where the electrostatic capacitance is greater than or equal to a threshold value by X-axis and Y-axis electrodes of the touch screen; the first near field communication signal is sent by the touch control circuit when the area with the electrostatic capacitance larger than or equal to the threshold value is detected.
According to an embodiment of the present application, the units in the key adjustment apparatus shown in fig. 5 or fig. 6 may be respectively or entirely combined into one or several additional units to form the key adjustment apparatus, or some unit(s) may be further split into multiple functionally smaller units to form the key adjustment apparatus, which may implement the same operation without affecting implementation of technical effects of embodiments of the present application. The units are divided based on logic functions, and in practical application, the functions of one unit can be realized by a plurality of units, or the functions of a plurality of units can be realized by one unit. In other embodiments of the present application, the key-based adjustment device may also include other units, and in practical applications, these functions may also be implemented by the assistance of other units, and may be implemented by cooperation of multiple units.
According to another embodiment of the present application, the key adjustment apparatus device shown in fig. 5 or fig. 6 may be constructed by running a computer program (including program codes) capable of executing the steps involved in the corresponding method shown in fig. 1 or fig. 4 on a general-purpose computing device, such as a computer, including a processing element such as a Central Processing Unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), and a storage element, and implementing the key adjustment method of the embodiment of the present application. The computer program may be recorded on a computer-readable recording medium, for example, and loaded and executed in the above-described computing apparatus via the computer-readable recording medium.
Based on the description of the method embodiment and the device embodiment, the embodiment of the application further provides an electronic device. Referring to fig. 7, the electronic device includes at least a processor 71, an input device 72, an output device 73, and a computer storage medium 74. The processor 71, input device 72, output device 73, and computer storage medium 74 within the electronic device may be connected by a bus or other means.
A computer storage medium 74 may be stored in the memory of the electronic device, the computer storage medium 74 being used to store a computer program comprising program instructions, the processor 71 being used to execute the program instructions stored by the computer storage medium 74. The processor 71 (or CPU) is a computing core and a control core of the electronic device, and is adapted to implement one or more instructions, and in particular, is adapted to load and execute the one or more instructions so as to implement a corresponding method flow or a corresponding function.
In one embodiment, the processor 71 of the electronic device provided in the embodiment of the present application may be configured to perform a series of key adjustment processes:
acquiring a sensing area of a touch screen of the electronic equipment; the sensing area is generated when the distance between the finger of the user and the touch screen is smaller than or equal to a preset value;
comparing the area of the induction area with the area of the soft keyboard key displayed by the touch screen to obtain a comparison result;
and adjusting the size of the soft keyboard key according to the comparison result.
In yet another embodiment, before comparing the area of the sensing region with the area of the soft keyboard keys displayed on the touch screen, the processor 71 is further configured to:
receiving a first near field communication signal sent by a touch circuit of the touch screen;
and determining the area of the soft keyboard key according to the first near field communication signal.
In yet another embodiment, the first near field communication signal comprises position information of the soft keyboard keys; the processor 71 executes the determining of the area of the soft keyboard key according to the first near field communication signal, including:
demodulating the first near field communication signal to obtain the position information;
and determining the area of the soft keyboard key based on the position information. In another embodiment, the processor 71 performs the adjusting of the size of the soft keyboard key according to the comparison result, including:
if the area of the induction area is larger than that of the soft keyboard key, increasing the area of the soft keyboard key according to a preset proportion to obtain the adjusted area of the soft keyboard key;
comparing the adjusted area of the soft keyboard key with the area of the induction area;
and executing at least one adjustment operation on the size of the soft keyboard key until the area of the adjusted soft keyboard key is larger than or equal to the area of the induction area.
In another embodiment, the processor 71 performs the acquiring of the sensing area of the touch screen of the electronic device, including:
receiving a second near field communication signal sent by the touch circuit;
demodulating the second near field communication signal to obtain an area where electrostatic capacitance at the intersection of the X-axis electrode and the Y-axis electrode of the touch screen is larger than or equal to a threshold value;
determining a region where the electrostatic capacitance is greater than or equal to a threshold as the sensing region.
In still another embodiment, the processor 71 scans the X-axis and Y-axis electrodes of the touch screen through the touch control circuit to detect an area where the electrostatic capacitance is greater than or equal to a threshold value; the first near field communication signal is sent by the touch control circuit when the area with the electrostatic capacitance larger than or equal to the threshold value is detected.
Illustratively, the electronic device may be a mobile phone, a tablet, a wearable device, a notebook, a kiosk, etc., the electronic device may include, but is not limited to, a processor 71, an input device 72, an output device 73, and a computer storage medium 74, the input device 72 may be a keyboard, a touch screen, etc., and the output device 73 may be a speaker, a display, a radio frequency transmitter, etc. It will be appreciated by those skilled in the art that the schematic diagrams are merely examples of an electronic device and are not limiting of an electronic device and may include more or fewer components than those shown, or some components in combination, or different components.
It should be noted that, since the steps in the key adjustment method are implemented when the processor 71 of the electronic device executes the computer program, the embodiments of the key adjustment method are all applicable to the electronic device, and all can achieve the same or similar beneficial effects.
An embodiment of the present application further provides a computer storage medium (Memory), which is a Memory device in an electronic device and is used to store programs and data. It is understood that the computer storage medium herein may include a built-in storage medium in the terminal, and may also include an extended storage medium supported by the terminal. The computer storage medium provides a storage space that stores an operating system of the terminal. Also stored in this memory space are one or more instructions, which may be one or more computer programs (including program code), suitable for loading and execution by processor 71. The computer storage medium may be a high-speed RAM memory, or may be a non-volatile memory (non-volatile memory), such as at least one disk memory; alternatively, it may be at least one computer storage medium located remotely from the processor 71. In one embodiment, one or more instructions stored in a computer storage medium may be loaded and executed by processor 71 to perform the corresponding steps described above with respect to the key adjustment method; in particular implementations, one or more instructions in the computer storage medium are loaded by processor 71 and perform the following steps: acquiring a sensing area of a touch screen of the electronic equipment; the sensing area is generated when the distance between the finger of the user and the touch screen is smaller than or equal to a preset value;
comparing the area of the induction area with the area of the soft keyboard key displayed by the touch screen to obtain a comparison result;
and adjusting the size of the soft keyboard key according to the comparison result.
In yet another example, one or more instructions in the computer storage medium, when loaded by processor 71, further performs the steps of:
receiving a first near field communication signal sent by a touch circuit of the touch screen;
and determining the area of the soft keyboard key according to the first near field communication signal.
In yet another example, one or more instructions in the computer storage medium, when loaded by processor 71, further performs the steps of:
demodulating the first near field communication signal to obtain the position information;
and determining the area of the soft keyboard key based on the position information.
In yet another example, one or more instructions in the computer storage medium, when loaded by processor 71, further performs the steps of:
if the area of the induction area is larger than that of the soft keyboard key, increasing the area of the soft keyboard key according to a preset proportion to obtain the adjusted area of the soft keyboard key;
comparing the adjusted area of the soft keyboard key with the area of the induction area;
and executing at least one adjustment operation on the size of the soft keyboard key until the area of the adjusted soft keyboard key is larger than or equal to the area of the induction area.
In yet another example, one or more instructions in the computer storage medium, when loaded by processor 71, further performs the steps of:
receiving a second near field communication signal sent by the touch circuit;
demodulating the second near field communication signal to obtain an area where electrostatic capacitance at the intersection of the X-axis electrode and the Y-axis electrode of the touch screen is larger than or equal to a threshold value;
determining a region where the electrostatic capacitance is greater than or equal to a threshold as the sensing region.
In yet another example, the one or more instructions in the computer storage medium, when loaded by the processor 71, further cause the touch circuitry to scan areas of the touch screen where the electrostatic capacitance is greater than or equal to a threshold value; the first near field communication signal is sent by the touch control circuit when the area with the electrostatic capacitance larger than or equal to the threshold value is detected.
Illustratively, the computer program of the computer storage medium includes computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, and the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like.
It should be noted that, since the computer program of the computer storage medium is executed by the processor to implement the steps in the key adjustment method, all the embodiments of the key adjustment method are applicable to the computer storage medium, and can achieve the same or similar beneficial effects.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, 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 application.