CN112034993A - Input method, input device, computer equipment and storage medium - Google Patents

Input method, input device, computer equipment and storage medium Download PDF

Info

Publication number
CN112034993A
CN112034993A CN202010841525.3A CN202010841525A CN112034993A CN 112034993 A CN112034993 A CN 112034993A CN 202010841525 A CN202010841525 A CN 202010841525A CN 112034993 A CN112034993 A CN 112034993A
Authority
CN
China
Prior art keywords
input
input field
character
text box
operation keyboard
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010841525.3A
Other languages
Chinese (zh)
Inventor
何龙
杨都
叶铁英
刘鹏
李少章
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202010841525.3A priority Critical patent/CN112034993A/en
Publication of CN112034993A publication Critical patent/CN112034993A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application relates to an input method, an input device, a computer device and a storage medium. The method comprises the following steps: calling an operation keyboard and generating a text box when the first input field of the application program is monitored to be clicked; mapping the text box and the first input field to be used as a second input field of the operation keyboard, and combining the second input field and the operation keyboard for displaying; acquiring input content input through an operation keyboard, and displaying the input content in a second input field; and when the input is finished, the input content in the second input field is transmitted back to the first input field. The method can intuitively input information.

Description

Input method, input device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to an input method, an input apparatus, a computer device, and a storage medium.
Background
With the development of computer technology, intelligent terminal equipment is more and more popular. In the process of using the intelligent terminal device, information interaction is not needed, for example, a user needs to set some information on the intelligent terminal device or input some information. Therefore, in order to realize information interaction with the intelligent terminal device, the existing intelligent terminal device is generally provided with a virtual keyboard for a user to set and input interaction information. The virtual keyboard can be hidden at ordinary times, and the virtual keyboard is displayed on a display interface of the intelligent terminal equipment when in need.
However, in some special interfaces, especially where the application interface is in a landscape interface as shown in FIG. 1, the input field where the application is placed is located near the bottom. Therefore, when the input field is clicked in the application program to call the virtual keyboard for input, as shown in fig. 2, the virtual keyboard displayed on the interface blocks the input field at the bottom of the application program, so that information cannot be intuitively input.
Disclosure of Invention
The invention provides an input method, an input device, computer equipment and a storage medium, aiming at the problem that an input field is blocked and information cannot be input visually.
An input method, characterized in that the method comprises:
calling an operation keyboard and generating a text box when the first input field of the application program is monitored to be clicked;
mapping the text box and the first input field to be used as a second input field of the operation keyboard, and combining the second input field and the operation keyboard for display;
acquiring input content input through the operation keyboard, and displaying the input content in the second input field;
and when the input is finished, the input content in the second input field is transmitted back to the first input field.
In one embodiment, the obtaining input content input through the operation keyboard, and displaying the input content in the second input field includes:
when the second input field is monitored to be clicked, acquiring a clicked coordinate value;
traversing the existing characters in the second input field, accumulating the pixel width of each traversed character, comparing the accumulated pixel width with the coordinate value, and determining an input position;
and moving the cursor in the second input field to the input position, and placing the input content input by the operation keyboard in front of the cursor to be displayed.
In one embodiment, traversing characters existing in the second input field, accumulating pixel widths of the traversed characters, comparing the accumulated pixel widths with the coordinate values, and determining an input position includes:
starting traversal by taking a first character existing in the second input field as a starting point, and acquiring the pixel width of the traversed character when any character is traversed;
determining an additional width according to the pixel width;
accumulating the pixel width of each inquired character to obtain the total pixel width;
when the comparison determines that the sum of the total pixel width and the pixel width of the cursor in the second input field is larger than or equal to the sum of the coordinate value and the additional width, ending the traversal;
and determining the intermediate position of the former character of the last traversed character and the last traversed character as an input position.
In one embodiment, the obtaining the pixel width of the character traversed to includes:
acquiring a preset character pixel width table;
and inquiring the pixel width of the traversed character according to the character pixel width table.
In one embodiment, the mapping the text box and the first input field to be used as a second input field of the operation keyboard, and the displaying the second input field and the operation keyboard in combination includes:
acquiring a handle of the first input field;
reading the input content carried by the handle to obtain the original input content in the first input field;
after the original input content is displayed in the text box, the text box is used as a second input field of the operation keyboard;
and combining and displaying the second input field and the operation keyboard according to a preset text box display position.
In one embodiment, the returning the input content to the first input field when the input is completed includes:
acquiring a handle of the first input field and input contents in the second input field;
and according to the handle of the first input field, transmitting the input content in the second input field to the first input field.
In one embodiment, the generating the text box includes:
acquiring text box configuration information and a cursor;
generating a corresponding text box according to the text box configuration information;
and displaying the cursor in the text box, and regularly displaying or hiding the cursor by using a timer.
An input device, the device comprising:
the calling module is used for calling the operation keyboard and generating a text box when the first input field of the application program is monitored to be clicked;
the mapping module is used for mapping the text box and the first input field to serve as a second input field of the operation keyboard, and combining and displaying the second input field and the operation keyboard;
the display module is used for acquiring input content input through the operation keyboard and displaying the input content into the second input field;
and the return module is used for returning the input content in the second input field to the first input field when the input is finished.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the input method of any of the above when the computer program is executed.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the input method of any of the preceding claims.
According to the input method, the input device, the computer equipment and the storage medium, the operation keyboard is called and a text box is generated when the first input field of the application program is monitored to be clicked, then the text box and the first input field are mapped to be used as the second input field of the operation keyboard, the second input field and the operation keyboard are combined to be displayed, further input content input into the second input field through the operation keyboard is obtained, the input content is transmitted back to the first input field mapped with the second input field, and input is completed. According to the method, when the input field is clicked to trigger input, the operation keyboard is called, the input field corresponding to the operation keyboard and the operation keyboard combination are generated and displayed, the input information is displayed through the input field combined with the operation keyboard, and the problem that the input information cannot be intuitively input due to the fact that the input field in an application program is shielded is avoided. Meanwhile, the text box is used as an input field of the operation keyboard, and the text box is a control without an input focus, so that the error of the input focus can be avoided, and accurate and quick input can be further realized.
Drawings
FIG. 1 is an interface diagram of an input field in a landscape application interface, according to an embodiment;
FIG. 2 is an interface diagram illustrating an input bar being occluded in accordance with an embodiment;
FIG. 3 is a schematic flow chart of an input method in one embodiment;
FIG. 4 is a schematic diagram of an interface displayed by combining a second input field with an operating keyboard according to an embodiment;
FIG. 5 is a flowchart illustrating steps of acquiring input contents input through the keypad and displaying the input contents in the second input field according to an embodiment;
FIG. 6 is a block diagram of an input device in one embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The input method provided by the application can be applied to the terminal. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
In one embodiment, as shown in fig. 3, an input method is provided, which is described by taking a terminal to which the method is applied as an example, and includes the following steps:
and step S102, calling an operation keyboard and generating a text box when the first input field of the application program is clicked.
The first input field refers to an input field provided in an application program, for example, an input field in a chat interface in chat software. The operation keyboard is a plug-in program packaged in advance and deployed on the terminal, and is a keyboard panel called and provided for a user to input information after the user clicks an input field. A text box is a container of text and graphics.
Specifically, the terminal monitors the input fields in each application program in real time through the click event, and when the click event of the input fields in the application programs is triggered, namely after the user clicks the input fields of the application programs on the interface of the terminal, the terminal determines that the current user has an input requirement, and then the terminal calls the operation keyboard. And generating a text box while calling the operation keyboard. The generation of the text box can be generated according to the preset text box configuration information. The textbox configuration information includes, but is not limited to, textbox size, shape, style, and the like, and then a corresponding textbox is generated according to the configured size, shape, style, and the like.
And step S104, mapping the text box and the first input field to be used as a second input field of the operation keyboard, and combining the second input field and the operation keyboard for displaying.
Specifically, after the operational keyboard is invoked and the text box is generated, the text box is mapped with the first input field invoking the operational keyboard. For example, when the first input field of the application a is clicked to call the operation keyboard, the first input field of the application a is mapped with the generated text box. The mapping is to perform text mapping and transfer the content already existing in the first input field to the text box.
And after the text mapping between the first input field and the text box is completed, the text box is used as a second input field of the operation keyboard and is combined with the operation keyboard to be displayed on an interface of the terminal for the user to input. The text box and the operation keyboard are displayed in a combined manner, which is to be understood as that the key events of each keyboard on the operation keyboard are associated with the text box and then displayed on the interface. Therefore, when the user performs input by clicking each keyboard on the operation keyboard, the content input by the user is displayed in the second input field, namely, the content input by the user is displayed in the text box through the key event of each keyboard. As shown in fig. 4, an interface diagram for operating a keyboard and text box combination is provided. It should be appreciated that when content already in the first input field is transferred to the text box, the cursor in the text box may be moved according to the transferred content. For example, the cursor "|" in the text box is moved to the end of the delivered content "chinese".
In one embodiment, step S104 includes: acquiring a handle of a first input field; reading input content carried by the handle to obtain original input content in a first input field; displaying the original input content in the text box, and then using the text box as a second input field of the operation keyboard; and combining and displaying the second input field and the operation keyboard according to the preset text box display position.
The handle is an identifier for identifying an object or an item, and it is understood that the handle of the first input field identifies the first input field in this embodiment. The preset text box display position is a display position of the text box on the interface, which is configured in advance according to the interface design requirement, and the display position may be a coordinate value specifically. For example, when the text box is used as an input field of the operation keyboard, the display position may be any position such as above, below, left side, or right side of the operation keyboard.
Specifically, since the operation keyboard is a standard plug-in disposed in the terminal, the terminal may transfer some necessary information to the operation keyboard when calling the operation keyboard. For example, the terminal may pass a handle calling the first input field of the keypad to the keypad. The handle of the input box usually carries its own input content, so when the handle is delivered, the content carried by the handle is delivered together. Therefore, the original input content in the first input field can be acquired by reading the content carried by the handle. And then, sending the read original input content of the first input field into a text box for displaying, and finishing text mapping. Since the text box has already completed the text mapping with the first input field invoking the operation keyboard, that is, the text box receives the content to be input into the first input field. Therefore, the text box is used as a second input field for operating the keyboard. And associating the key event of the operation keyboard with the input of the text box and displaying the key event and the text box on the interface of the terminal. When the text box and the operation keyboard are displayed together, the configured display position of the text box is obtained, and the text box is displayed on the interface according to the configured display position of the text box. For example, as shown in fig. 4, the text box may be displayed above the operation keyboard by a pre-configured text box display position. The text box can also be displayed on the left side, the right side or below the operation keyboard according to actual requirements.
In this embodiment, the original input content of the input field is acquired through the handle of the first input field, so as to ensure the accuracy of acquiring the original input content.
And step S106, acquiring the input content input by operating the keyboard, and displaying the input content in the second input field.
Specifically, after the text box is used as the second input field of the operation keyboard and is displayed on the interface of the terminal together with the operation keyboard, the user can input through touching each key in the operation keyboard. The terminal acquires and displays the content input by the user in the text box associated with the operation keyboard through the key event of each key, and the information can be intuitively input through the text box.
Step S108, when the input is finished, the input content in the second input field is transmitted back to the first input field.
Specifically, after the user completes the input, that is, after the user finishes the content input by operating the keyboard and clicks to complete, the input content input by the user into the second input field is acquired. That is, after the terminal listens that the completion button is clicked, the terminal determines that the user has currently completed inputting the input contents. Then, the input content input by the user at this time is not displayed in the first input field of the application program. Therefore, the input content input by the user through the operation of the keyboard is read from the second input field (text box), and the acquired input content in the second input field is returned to the first input field. The passing of the input back into the first input field may be accomplished based on a handle of the first input field.
In one embodiment, step S108, comprises: acquiring a handle of the first input field and input contents in the second input field; and transmitting the input content in the second input field to the first input field according to the handle of the first input field.
The handle is an identifier for identifying an object or an item, and it is understood that the first input field is identified by the handle of the first input field in the present embodiment.
Specifically, since the operation keyboard is a standard plug-in disposed in the terminal, the terminal may transfer some necessary information to the operation keyboard when calling the operation keyboard. For example, the terminal may pass a handle calling the first input field of the keypad to the keypad. That is, when the user clicks the first input field to call the manipulation keyboard, the terminal has already passed the handle of the first input field calling the manipulation keyboard to the manipulation keyboard. Therefore, when the input content in the second input field is returned to the first input field, the terminal can also obtain the handle calling the first input field of the operation keyboard. Then, the input content in the second input field is sent to the first input field in the application program through the handle, so that the input field of the application program receives the input content input by the user, and the input is completed.
It should be appreciated that because the text box is generated, the content already in the first input field is displayed in the text box via the text mapping. Therefore, when the input content in the second input field is returned to the first input field, the input content returned to the first input field can be directly replaced with the content originally existing in the first input field in order to prevent the input content from being duplicated. For example, the first input field originally includes "Chinese", and after "Chinese" is displayed to the text box, the user "inputs" by inputting the newly added content. Then the input content in the text box after the input is completed is "chinese input". Therefore, when the Chinese input is returned to the first input field, the Chinese input is directly replaced by the Chinese input, and the repeated content of the Chinese input in the first input field is avoided.
In this embodiment, the return of the input content is realized through the handle of the first input field, and the accuracy of the return of the input content is ensured.
According to the input method, the operation keyboard is called and a text box is generated when the fact that the first input field of the application program is clicked is monitored, then the text box is mapped with the first input field and serves as the second input field of the operation keyboard, the second input field and the operation keyboard are combined and displayed, input content input into the second input field through the operation keyboard is further obtained, the input content is transmitted back to the first input field mapped with the second input field, and input is completed. According to the method, when the input field is clicked to trigger input, the operation keyboard is called, the input field corresponding to the operation keyboard and the operation keyboard combination are generated and displayed, the input information is displayed through the input field combined with the operation keyboard, and the problem that the input information cannot be intuitively input due to the fact that the input field in an application program is shielded is avoided. Meanwhile, the text box is used as an input field of the operation keyboard, and the text box is a control without an input focus, so that the error of the input focus can be avoided, and accurate and quick input can be further realized.
In one embodiment, as shown in fig. 5, step S106 includes the following steps:
step S502, when it is monitored that the second input field is clicked, obtaining a coordinate value of the click.
Step S504, traversing the existing characters in the second input field, accumulating the pixel width of each traversed character, comparing the accumulated pixel width with the coordinate value, and determining the input position.
In step S506, the cursor in the second input field is moved to the input position, and the input content input by operating the keyboard is placed in front of the cursor and displayed.
Specifically, the user may change the input position of the input by clicking within the second input field when inputting. For example, the cursor in the second input field is located behind the last character, and the input character is displayed in front of the last character. And if the user needs to input the content behind the second character, the cursor can be moved to the back of the second character by clicking the position behind the second character, so that a new input position is obtained, and the newly input content can be displayed behind the second character. In order to accurately realize the movement of the cursor, when the second input field is monitored to be clicked, the coordinate value of the click is acquired. And determining the position where the cursor needs to move by acquiring the coordinate value of the position clicked by the user in the second input field.
After the coordinate value of the click is acquired, traversing the existing characters in the second input field, and accumulating the pixel width of each character. And comparing the pixel width accumulated each time with the coordinate value of the click, and determining the input position corresponding to the coordinate value through comparison. The determined input position may be understood as determining to which character the cursor is moved in front of/behind. For example, if the cumulative pixel width of the current two characters is smaller than the coordinate value and the pixel width of the first three characters is larger than the coordinate value, the coordinate-to-corresponding input position is the middle position between the second character and the third character. After the input position corresponding to the coordinate value is determined, the cursor is moved to the input position, for example, the cursor is moved to the middle of the second character and the third character. The content input by the user through the keyboard is placed in front of the cursor for display. Similarly, after the cursor is moved, the characters in front of/behind the cursor can be deleted through a delete key operated by the user, so that a partial delete function is realized.
In one embodiment, step S504 includes: traversing by taking the first character existing in the second input field as a starting point, and acquiring the pixel width of the traversed character when traversing to any character; determining an additional width from the pixel width; accumulating the pixel width of each inquired character to obtain the total pixel width; when the sum of the total pixel width and the pixel width of the cursor in the second input field is larger than or equal to the sum of the coordinate value and the additional width through comparison and determination, ending traversal; and determining the intermediate position of the former character of the last traversed character and the last traversed character as an input position.
Specifically, when traversing the pixel width of an already existing character within the second input field, starting with the first character. Each time a character is traversed, the pixel width of the traversed character is obtained. Then, the pixel width of the currently acquired character is added to the existing total pixel width. For example, the total pixel width currently available is the cumulative value of the pixel widths of the first character and the second character. And when traversing to the third character, acquiring the pixel width of the third character and accumulating the pixel width of the third character to the current total pixel width, wherein the obtained new total pixel width is the sum of the pixel widths of the first character, the second character and the third character. After each pixel width of one character is accumulated, the total pixel width is compared with the coordinate value of the click once.
However, due to the width of the light sample in the second input field and the possibility that the user clicks at a location just above a character. Therefore, determining the input position by merely comparing the integrated total pixel width and the coordinate value may have a certain error. Therefore, in order to add the width occupied by the cursor itself and to discriminate whether the click is in front of or behind the character when on the character, the sum of the accumulated total pixel width and the pixel width of the cursor is compared with the sum of the coordinate value and the additional width when compared. When the sum of the accumulated total pixel width and the pixel width of the cursor is larger than or equal to the sum of the coordinate value and the additional width, the position where the user click is found by the traversal is indicated, and the position is the front of the currently traversed character, namely the middle position of the currently traversed character and the previous character is an input position. And when the sum of the accumulated total pixel width and the pixel width of the cursor is smaller than the sum of the coordinate value and the additional width, the next character is continuously traversed. The additional width is determined by the pixel width of the traversed character, and the additional width of the embodiment is less than half of the pixel width of the currently traversed character. A half less than half the width of a character pixel is understood to be a cursor that is biased to the left (in front of the character). For example, assume that the coordinate value of the click is t _ x, and when traversing to the third character, assume that the pixel width of the third character is t _ w, the width of the cursor is t _ off, and the total pixel width currently accumulated according to the pixel widths of the first three characters is t _ all. The additional width t _ add is first calculated from the pixel width t _ w of the third character. t _ add is t _ w/2-1. Then, a comparison is made, i.e., (t _ all + t _ off) with (t _ x + t _ add). When the comparison result is that (t _ all + t _ off) is greater than or equal to (t _ x + t _ add), the position before the third character, i.e., the middle position between the third character and the second character, is the input position. And when the comparison result is that (t _ all + t _ off) is less than (t _ x + t _ add), the fourth character is continuously traversed. And after accumulating the pixel width of the fourth character, continuing to compare until a comparison condition is met. It should be understood that the additional width t _ add is adjustable according to the actual situation, and the embodiment preferably has less than half of the currently traversed character. The pixel width t _ off of the cursor is determined according to the pixel width of the cursor actually used in the text box.
In one embodiment, obtaining the pixel width of the traversed character comprises: acquiring a preset character pixel width table; and inquiring the pixel width of the traversed character according to the character pixel width table.
Wherein the character pixel width table is a list including respective different character widths configured in advance. Since the width of each character is different, the pixel width of each different character is recorded by configuring the character pixel width table.
Specifically, when a character is traversed and the width of the character needs to be acquired, the character pixel width table is called. And querying from the character pixel width table, and querying the pixel width of the character recorded in the character pixel width table so as to obtain the pixel width of the character.
In this embodiment, the input position is determined by the actual pixel width of each character in the second input field, and the accuracy of determining the input position can be improved.
In one embodiment, a method of generating a text box, comprises: acquiring text box configuration information and a cursor; generating a corresponding text box according to the text box configuration information; and displaying the cursor in the text box, and regularly displaying or hiding the cursor by using a timer.
In which a cursor is an identifier for locating an input position, since an input box generally carries a cursor by itself, an input field using an input box conventionally carries a cursor by itself. However, in the present embodiment, a text box is used as an input field for operating a keyboard, and the text box is not provided with a cursor as in a conventional input box. Therefore, in order to provide the text box and the input box with the function of cursor positioning, the text box is generated and a corresponding cursor is generated for the text money.
Specifically, when the terminal generates a text box, pre-configured text box configuration information and a cursor are acquired. The cursor may be a relatively thin character "|" or may be obtained by drawing a vertical thin line. The terminal first generates a text box according to the text box configuration information, such as the size, shape, style, etc. of the text box. Then, the acquired cursor is placed in the text box, and a timer is set so that the cursor is displayed/hidden. For example, a timer is set to cycle for a specific time (e.g., 500ms), and when the timer is over, the cursor is controlled to be displayed/hidden, so that the cursor flickers.
In the embodiment, when the text box is generated, a cursor is configured in the text box, and the cursor is made to flash by using a timer, so that when the text box is used as an input field, the input content can be inserted and partially deleted by positioning through the cursor.
It should be understood that although the steps in the flowcharts of fig. 3 and 5 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 3 and 5 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least some of the other steps or stages.
In one embodiment, as shown in fig. 6, there is provided an input device including: a calling module 602, a mapping module 604, a display module 606, and a pass-back module 608, wherein:
and the calling module 602 is used for calling the operation keyboard and generating a text box when the first input field of the application program is monitored to be clicked.
And the mapping module 604 is configured to map the text box and the first input field to serve as a second input field of the operation keyboard, and combine the second input field and the operation keyboard for display.
The display module 606 is configured to obtain input content input by operating the keyboard, and display the input content in the second input field.
The returning module 608 is configured to return the input content in the second input field to the first input field when the input is completed.
In one embodiment, the display module 606 is further configured to obtain a coordinate value of a click when it is monitored that the second input field is clicked; traversing the existing characters in the second input field, accumulating the pixel width of each traversed character, comparing the accumulated pixel width with the coordinate value, and determining the input position; and moving the cursor in the second input field to an input position, and placing the input content input by operating the keyboard in front of the cursor to be displayed.
In one embodiment, the display module 606 is further configured to start traversing with the first character existing in the second input field as a starting point, and when traversing to any character, obtain the pixel width of the traversed character; determining an additional width from the pixel width; accumulating the pixel width of each inquired character to obtain the total pixel width; when the sum of the total pixel width and the pixel width of the cursor in the second input field is larger than or equal to the sum of the coordinate value and the additional width through comparison and determination, ending traversal; and determining the intermediate position of the former character of the last traversed character and the last traversed character as an input position.
In one embodiment, the display module 606 is further configured to obtain a preset character pixel width table; and inquiring the pixel width of the traversed character according to the character pixel width table.
In one embodiment, the mapping module 604 is further configured to obtain a handle to the first input field; reading input content carried by the handle to obtain original input content in a first input field; displaying the original input content in the text box, and then using the text box as a second input field of the operation keyboard; and combining and displaying the second input field and the operation keyboard according to the preset text box display position.
In one embodiment, the return module 608 is further configured to obtain a handle of the first input field and input content in the second input field; and transmitting the input content in the second input field to the first input field according to the handle of the first input field.
In one embodiment, the invoking module 602 is further configured to obtain the textbox configuration information and the cursor; generating a corresponding text box according to the text box configuration information; and displaying the cursor in the text box, and regularly displaying or hiding the cursor by using a timer.
For specific limitations of the input device, reference may be made to the limitations of the input method above, and details are not repeated here. The various modules in the input device described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a terminal is provided, an internal structure of which may be as shown in fig. 7. The terminal comprises a processor, a memory, a communication interface, a display screen and an input device which are connected through a system bus. Wherein the processor of the terminal is configured to provide computing and control capabilities. The memory of the terminal comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the terminal is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement an input method. The display screen of the terminal can be a liquid crystal display screen or an electronic ink display screen, and the input device of the terminal can be a touch layer covered on the display screen.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
calling an operation keyboard and generating a text box when the first input field of the application program is monitored to be clicked;
mapping the text box and the first input field to be used as a second input field of the operation keyboard, and combining the second input field and the operation keyboard for displaying;
acquiring input content input through an operation keyboard, and displaying the input content in a second input field;
and when the input is finished, the input content in the second input field is transmitted back to the first input field.
In one embodiment, the processor, when executing the computer program, further performs the steps of: when the second input field is monitored to be clicked, acquiring a clicked coordinate value; traversing the existing characters in the second input field, accumulating the pixel width of each traversed character, comparing the accumulated pixel width with the coordinate value, and determining the input position; and moving the cursor in the second input field to an input position, and placing the input content input by operating the keyboard in front of the cursor to be displayed.
In one embodiment, the processor, when executing the computer program, further performs the steps of: traversing by taking the first character existing in the second input field as a starting point, and acquiring the pixel width of the traversed character when traversing to any character; determining an additional width from the pixel width; accumulating the pixel width of each inquired character to obtain the total pixel width; when the sum of the total pixel width and the pixel width of the cursor in the second input field is larger than or equal to the sum of the coordinate value and the additional width through comparison and determination, ending traversal; and determining the intermediate position of the former character of the last traversed character and the last traversed character as an input position.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring a preset character pixel width table; and inquiring the pixel width of the traversed character according to the character pixel width table.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring a handle of a first input field; reading input content carried by the handle to obtain original input content in a first input field; displaying the original input content in the text box, and then using the text box as a second input field of the operation keyboard; and combining and displaying the second input field and the operation keyboard according to the preset text box display position.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring a handle of the first input field and input contents in the second input field; and transmitting the input content in the second input field to the first input field according to the handle of the first input field.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring text box configuration information and a cursor; generating a corresponding text box according to the text box configuration information; and displaying the cursor in the text box, and regularly displaying or hiding the cursor by using a timer.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
calling an operation keyboard and generating a text box when the first input field of the application program is monitored to be clicked;
mapping the text box and the first input field to be used as a second input field of the operation keyboard, and combining the second input field and the operation keyboard for displaying;
acquiring input content input through an operation keyboard, and displaying the input content in a second input field;
and when the input is finished, the input content in the second input field is transmitted back to the first input field.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the second input field is monitored to be clicked, acquiring a clicked coordinate value; traversing the existing characters in the second input field, accumulating the pixel width of each traversed character, comparing the accumulated pixel width with the coordinate value, and determining the input position; and moving the cursor in the second input field to an input position, and placing the input content input by operating the keyboard in front of the cursor to be displayed.
In one embodiment, the computer program when executed by the processor further performs the steps of: traversing by taking the first character existing in the second input field as a starting point, and acquiring the pixel width of the traversed character when traversing to any character; determining an additional width from the pixel width; accumulating the pixel width of each inquired character to obtain the total pixel width; when the sum of the total pixel width and the pixel width of the cursor in the second input field is larger than or equal to the sum of the coordinate value and the additional width through comparison and determination, ending traversal; and determining the intermediate position of the former character of the last traversed character and the last traversed character as an input position.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a preset character pixel width table; and inquiring the pixel width of the traversed character according to the character pixel width table.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a handle of a first input field; reading input content carried by the handle to obtain original input content in a first input field; displaying the original input content in the text box, and then using the text box as a second input field of the operation keyboard; and combining and displaying the second input field and the operation keyboard according to the preset text box display position.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a handle of the first input field and input contents in the second input field; and transmitting the input content in the second input field to the first input field according to the handle of the first input field.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring text box configuration information and a cursor; generating a corresponding text box according to the text box configuration information; and displaying the cursor in the text box, and regularly displaying or hiding the cursor by using a timer.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An input method, characterized in that the method comprises:
calling an operation keyboard and generating a text box when the first input field of the application program is monitored to be clicked;
mapping the text box and the first input field to be used as a second input field of the operation keyboard, and combining the second input field and the operation keyboard for display;
acquiring input content input through the operation keyboard, and displaying the input content in the second input field;
and when the input is finished, the input content in the second input field is transmitted back to the first input field.
2. The method according to claim 1, wherein the acquiring input content input through the operation keyboard and displaying the input content in the second input field comprises:
when the second input field is monitored to be clicked, acquiring a clicked coordinate value;
traversing the existing characters in the second input field, accumulating the pixel width of each traversed character, comparing the accumulated pixel width with the coordinate value, and determining an input position;
and moving the cursor in the second input field to the input position, and placing the input content input by the operation keyboard in front of the cursor to be displayed.
3. The method of claim 2, wherein traversing characters already existing in the second input field, accumulating pixel widths of the traversed characters, comparing the accumulated pixel widths with the coordinate values, and determining an input position comprises:
starting traversal by taking a first character existing in the second input field as a starting point, and acquiring the pixel width of the traversed character when any character is traversed;
determining an additional width according to the pixel width;
accumulating the pixel width of each inquired character to obtain the total pixel width;
when the comparison determines that the sum of the total pixel width and the pixel width of the cursor in the second input field is larger than or equal to the sum of the coordinate value and the additional width, ending the traversal;
and determining the intermediate position of the former character of the last traversed character and the last traversed character as an input position.
4. The method of claim 3, wherein said obtaining a pixel width of the character traversed to comprises:
acquiring a preset character pixel width table;
and inquiring the pixel width of the traversed character according to the character pixel width table.
5. The method according to claim 1, wherein mapping the text box with the first input field to serve as a second input field of the operation keyboard, and displaying the second input field in combination with the operation keyboard comprises:
acquiring a handle of the first input field;
reading the input content carried by the handle to obtain the original input content in the first input field;
after the original input content is displayed in the text box, the text box is used as a second input field of the operation keyboard;
and combining and displaying the second input field and the operation keyboard according to a preset text box display position.
6. The method of claim 1, wherein returning the input to the first input field when the inputting is completed comprises:
acquiring a handle of the first input field and input contents in the second input field;
and according to the handle of the first input field, transmitting the input content in the second input field to the first input field.
7. The method of claim 1, wherein generating the text box comprises:
acquiring text box configuration information and a cursor;
generating a corresponding text box according to the text box configuration information;
and displaying the cursor in the text box, and regularly displaying or hiding the cursor by using a timer.
8. An input device, the device comprising:
the calling module is used for calling the operation keyboard and generating a text box when the first input field of the application program is monitored to be clicked;
the mapping module is used for mapping the text box and the first input field to serve as a second input field of the operation keyboard, and combining and displaying the second input field and the operation keyboard;
the display module is used for acquiring input content input through the operation keyboard and displaying the input content into the second input field;
and the return module is used for returning the input content in the second input field to the first input field when the input is finished.
9. A terminal device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202010841525.3A 2020-08-20 2020-08-20 Input method, input device, computer equipment and storage medium Pending CN112034993A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010841525.3A CN112034993A (en) 2020-08-20 2020-08-20 Input method, input device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010841525.3A CN112034993A (en) 2020-08-20 2020-08-20 Input method, input device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112034993A true CN112034993A (en) 2020-12-04

Family

ID=73577678

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010841525.3A Pending CN112034993A (en) 2020-08-20 2020-08-20 Input method, input device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112034993A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101294458B1 (en) * 2012-03-26 2013-08-07 주식회사 유비온 Apparatus and method of inputting text in mobile device
CN103809886A (en) * 2012-11-12 2014-05-21 腾讯科技(深圳)有限公司 Cursor positioning method and mobile terminal

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101294458B1 (en) * 2012-03-26 2013-08-07 주식회사 유비온 Apparatus and method of inputting text in mobile device
CN103809886A (en) * 2012-11-12 2014-05-21 腾讯科技(深圳)有限公司 Cursor positioning method and mobile terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
中国IT培训工程编委会: "精通Visual C#", 31 January 2002, 珠海出版社, pages: 413 - 415 *

Similar Documents

Publication Publication Date Title
US9336502B2 (en) Showing relationships between tasks in a Gantt chart
KR101934998B1 (en) Method and system for providing user interface to a plurality of applications
CN103729065A (en) System and method for mapping touch operations to entity keys
CN107678644A (en) A kind of image processing method and mobile terminal
CN103902056B (en) Dummy keyboard input method, equipment and system
CN107390991B (en) A kind of processing method and mobile terminal of screenshot
CN112099684A (en) Search display method and device and electronic equipment
CN110413922A (en) Page info display methods, device, computer equipment and storage medium
CN110489312A (en) Data correlation method and device for control trigger data acquisition
CN111651104A (en) Method and device for displaying application page and storage medium
CN113835580A (en) Application icon display method and device, electronic equipment and storage medium
CN111596911A (en) Method and device for generating control, computer equipment and storage medium
US10289388B2 (en) Process visualization toolkit
CN112698762B (en) Icon display method and device and electronic equipment
CN112948843B (en) Encryption method, encryption device, electronic equipment and medium
CN116257143A (en) Processing method and device, electronic equipment and operating system
CN112034993A (en) Input method, input device, computer equipment and storage medium
CN113325986B (en) Program control method, program control device, electronic device and readable storage medium
CN115543176A (en) Information processing method and device and electronic equipment
CN114491218A (en) Information updating method, information updating device, electronic device, and medium
CN114998102A (en) Image processing method and device and electronic equipment
CN105302466B (en) A kind of text operation method and terminal
CN114115639A (en) Interface control method and device, electronic equipment and storage medium
CN114491309A (en) Picture processing method and device
CN113901033A (en) Data migration method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination