Summary of the invention
The object of the present invention is to provide a kind of character input method and character input system, to improve the literal input efficiency.
The invention provides a kind of character input method, comprise the steps: to generate the candidate literal, will from the candidate literal that generates, shield by selected literal according to input; Preserve the contextual information of going up the literal of screen; Detect the information of pressing backspace key; The contextual information of going up the literal of screen according to preserving generates candidate character once more; To from the candidate character that generates once more, shield again by selected literal.
Preferably, above-mentioned character input method also comprises: after the contextual information of the literal of screen, detect and whether switch input pattern by cursor on preserving, if then handle according to normal button input.
Preferably, above-mentioned character input method also comprises: after the contextual information of the literal of screen, detect and whether press non-backspace key on preserving, if then handle according to normal button input.
Preferably, above-mentioned character input method also comprises: detect after the information of pressing backspace key the literal of going up screen of selected this input error.
Preferably, above-mentioned character input method also comprises: when the literal that will select from the candidate character that generates once more shields again, cover the literal of going up screen of this input error.
The present invention also provides a kind of character input system, comprises candidate character generation module and last panel module, and wherein the candidate character generation module is used for generating the candidate literal according to input, and last panel module is used for and will shields from the selected literal of candidate literal that generates; In addition, above-mentioned character input system also comprises preserves module and detection module, wherein, preserves module and is used to preserve the contextual information of going up the literal of screen; Detection module is used to detect the information of pressing backspace key; The candidate character generation module also is used for generating candidate character once more according to the contextual information of preserving of going up the literal of screen; Last panel module also is used for and will shields again from the selected literal of candidate character that generates once more.
Preferably, above-mentioned detection module also is used for after the contextual information of the literal of screen on preserving module preservation, detects and whether switches input pattern by cursor.
Preferably, above-mentioned detection module also is used for detecting and whether pressing non-backspace key after the contextual information of the literal of screen on preserving.
Preferably, above-mentioned character input system also comprises literal selection module, is used to detect after the information of pressing backspace key the literal of going up screen of selected this input error.
Preferably, above-mentioned character input system also comprises overlay module, is used for covering the literal of going up screen of this input error when last panel module will shield again from the selected literal of candidate character that generates once more.
Compare with existing character input method and writing system, character input method that the embodiment of the invention provided and character input system are by preserving the contextual information of going up the literal of screen, and after detecting the information of pressing backspace key, return to and be about to select the scene of shielding on the literal, do not meet the literal of going up screen of expection before the corrigendum, improved input efficiency.
Embodiment
Below in conjunction with the drawings and specific embodiments technical solution of the present invention is described in further detail, can be implemented so that those skilled in the art can better understand the present invention also, but illustrated embodiment is not as a limitation of the invention.
Literal of the present invention can be character string or the single character that comprises punctuate, it for example can be single Chinese character, or the word of forming by a plurality of Chinese character, the domain names that can also be single English alphabet, English word, form by English alphabet and punctuation mark, or the network address of forming by arabic numeral and punctuation mark.Certainly, literal of the present invention also comprises other form, and the present invention does not limit to literal definition.
Fig. 1 is the process flow diagram of a kind of embodiment of character input method of the present invention.
In the present embodiment, in the process of input characters, owing to the literal of falsely dropping literal or the literal misspelling is caused going up screen does not meet expection, if do not carry out other operation, and directly press the defined backspace key of the present invention, can return to and be about to select the scene of shielding on the literal, not meet the literal of going up screen of expection before the corrigendum.The scene that to shield on the selected literal is meant that the user import and finishes on the candidate window that Input Method Editor provided, and the state the during literal that begins to select on the candidate window to be imported.Particularly, the character input method in the present embodiment comprises the steps:
Step S101 generates the candidate literal according to input, will shield by selected literal from the candidate literal that generates.
Step S102 preserves the contextual information (Context) of going up the literal of screen.Particularly, by pressing space bar or after the candidate window is selected literal, character input method of the present invention will be preserved the contextual information that literal comprised of this last screen, and this contextual information is included in information and the last information of shielding literal that candidate window is imported.Such as, when the literal of going up screen was Chinese, this contextual information was included in the phonetic of being imported in the candidate window, and the number that goes up the Chinese character of screen; When the literal of going up screen is English alphabet, English word, domain names, or during network address, this contextual information is included in English alphabet and the punctuate of being imported in the candidate window, and goes up the English alphabet of screen and the number of punctuate.
Step S103 detects the information of pressing backspace key.Backspace key in the present embodiment can be single key, also can be Macintosh, such as the combination that can be Ctrl and PageUp key, or the combination of Ctrl and Backspace key.Memory for convenience, present embodiment is preferably the combination of Ctrl and Backspace key, because Ctrl is to use more function key, and the Backspace key is generally used for cursor is moved or deletes backward the previous character at cursor place.Certainly, the array mode of backspace key also can define voluntarily, and only otherwise get final product with other shortcut key collision, the present invention does not do qualification to this.
Step S104, the contextual information of going up the literal of screen according to preserving generates candidate character once more.Particularly, after pressing backspace key, generate candidate character once more, be about to select the scene of shielding on the literal thereby return to by the contextual information of going up the literal of screen that will preserve among the step S101.In character input method of the present invention, pass to the input method kernel by the contextual information that will go up the literal of screen as parameter, generate candidate character once more and be presented in the candidate window by the input method kernel, this process is the equal of to carry out identical input once more, and obtain identical candidate character, but speed is faster than the speed of input once more.
Step S105 will shield by selected literal from the candidate character that generates once more again.
Below the application process of character input method of the present invention will be described by concrete example:
Such as, the user thought input " I am very honest " four words originally, so imported in the interface of input method in Fig. 2 (a) " cheng ' shi ", it expects that the literal that will go up screen was " honesty " originally, but mistake has been imported " space bar " or has been selected 1, make the literal of going up screen become and be that " city ", input results are " I am the city very " among Fig. 2 (b).After finding that going up the literal that shields does not meet expection, can directly press the combination of Ctrl and Backspace key, return to the scene that among Fig. 2 (c) shielded on the selected literal, after selection 2 among Fig. 2 (c), but input results can be corrected as " I am very honest " among Fig. 2 (d).
For another example, the user thought input " www.baihe.com " this network address originally, so imported " www.bai " in the interface of input method in Fig. 3 (a), " www.baidu.com " appearred in the candidate window after this moment, input method was mated automatically, " www.baigoogledu.com " and " www.baihe.com " these three network address, it expects that the literal that will go up screen was " www.baihe.com " originally, but mistake has been imported " space bar " or has been selected 1, make the literal of going up screen become and be that " www.baidu.com ", input results are " www.baidu.com " among Fig. 3 (b).After finding that going up the literal that shields does not meet expection, can directly press the combination of Ctrl and Backspace key, return to the scene that being about among Fig. 3 (c) shielded on the selected literal, when in Fig. 3 (c), selecting after 2, but input results can be corrected as " www.baihe.com " among Fig. 3 (d).
Therefore, compare with existing character input method, the character input method that present embodiment provided is by preserving the contextual information of going up the literal of screen, and after detecting the information of pressing backspace key, return to and be about to select the scene of shielding on the literal, do not meet the literal of going up screen of expection before the corrigendum, improved input efficiency.
Fig. 4 is the process flow diagram of the another kind of embodiment of character input method of the present invention.
In the present embodiment, in process at input characters, owing to the literal of falsely dropping literal or the literal misspelling is caused going up screen does not meet expection, and carried out after the switching input pattern operation with cursor, press the defined backspace key of the present invention again, disturb for fear of normal use produced because the strategy of the selection literal between the different input patterns is different this moment, and then present embodiment will not carry out rollback operation.Particularly, the character input method in the present embodiment comprises the steps:
Step S401 generates the candidate literal according to input, will shield by selected literal from the candidate literal that generates.
Step S402 preserves the contextual information of going up the literal of screen.
Step S403 detects and whether switches input pattern by cursor.If switch input pattern by cursor, then enter step S404; Otherwise, enter step S405.In the present embodiment, switching input pattern can be to switch input method or switch input language, such as switching to five-stroke input method from spelling input method, perhaps switches to English input method from Chinese character coding input method in spelling input method.
Step S404 handles according to normal button input.In the present embodiment, be meant that according to normal button input processing the information of direct detection user input and the information of importing according to the user show the candidate literal on the candidate window, and do not generate candidate character once more according to the upward contextual information of preserving of the literal of screen.
Step S405 detects and whether presses backspace key.If press backspace key, then enter step S406; Otherwise, enter step S404.
Step S406, the literal of going up screen of selected this input error.It in the present embodiment the literal of going up screen by selected this input error of simulating keyboard message.Such as, during the pairing keyboard message of " www.baihe.com " in wanting simulation drawing 3, can be after the combination of pressing Ctrl and Backspace key, at first the keyboard message of shift key is pressed in simulation, simulate 13 times (11 English alphabets and 2 times punctuate) again and press the keyboard message of Backspace key, the keyboard message that shift key is unclamped in simulation at last; Then above-mentioned keyboard message is sent to operating system, the final literal of going up screen of realizing selected this input error.
Step S407, the contextual information of going up the literal of screen according to preserving generates candidate character once more.
Step S408 when the literal that will select shields again, covers the literal of going up screen of this input error from the candidate character that generates once more.
In addition, after switching input pattern,, and directly press backspace key, also can carry out rollback operation if do not carry out other input operation by cursor.Simultaneously, in the present embodiment, step S406 is an optional step, after pressing backspace key, can not select the literal of going up screen of this input error automatically, equally also can improve the input efficiency of existing input method.
Therefore, compare with the character input method among Fig. 1, whether the character input method that present embodiment provided not only can carry out the operation of switching input pattern with cursor by detecting, and has avoided normal use is produced interference; But also can select the literal of going up screen of this input error, with further raising input efficiency.
Fig. 5 is the process flow diagram of another embodiment of character input method of the present invention.
In the present embodiment, in process at input characters, owing to the literal of falsely dropping literal or the literal misspelling is caused going up screen does not meet expection, and press non-backspace key, press the defined backspace key of the present invention again, disturb for fear of normal use is produced this moment, and then present embodiment will not carry out rollback operation.Particularly, the character input method in the present embodiment comprises the steps:
Step S501 generates the candidate literal according to input, will shield by selected literal from the candidate literal that generates.
Step S502 preserves the contextual information of going up the literal of screen.
Step S503 detects and whether presses non-backspace key.If press non-backspace key, then enter step S504; Otherwise, enter step S505.In the present embodiment, non-backspace key is meant other key except defined backspace key, such as when having defined being combined as after the backspace key of Ctrl and Backspace key, then except the combination of Ctrl, Ctrl and Backspace key, other is non-backspace key.The reason that Ctrl is not defined as non-backspace key herein is, generally is to press Ctrl earlier to press the Backspace key again, finally could realize rollback, if therefore Ctrl is defined as non-Macintosh can cause erroneous judgement.Simultaneously, can detect whether press non-backspace key by the state flag bit corresponding with non-backspace key is set.Such as, the original value that state flag bit can be set earlier is " 0 ", and after pressing non-backspace key, the value of state flag bit becomes " 1 ", and when the value that detects state flag bit becomes " 1 " by " 0 ", i.e. non-backspace key is pressed in explanation.In addition, also can be set to other arabic numeral or English alphabet by state flag bit, the present invention does not do qualification to this.
Step S504 handles according to normal button input.In the present embodiment, be meant that according to normal button input processing the information of direct detection user input and the information of importing according to the user show the candidate literal on the candidate window, and do not generate candidate character once more according to the upward contextual information of preserving of the literal of screen.
Step S505 detects and whether presses backspace key.If press backspace key, then enter step S506; Otherwise, enter step S504.
Step S506, the literal of going up screen of selected this input error.In the present embodiment, when the non-backspace key of pressing is that Backspace key or Delete key etc. are when having the key of delete function, can cause the selected literal of step S506 inequality, therefore need in step S503, detect whether press non-backspace key in advance with the literal that need carry out rollback operation.
Step S507, the contextual information of going up the literal of screen according to preserving generates candidate character once more.
Step S508 when the literal that will select shields again, covers the literal of going up screen of this input error from the candidate character that generates once more.
Equally, in the present embodiment, step S506 also is an optional step, after pressing backspace key, can not select the literal of going up screen of this input error automatically, equally also can improve the input efficiency of existing input method.
Therefore, compare with the character input method among Fig. 1, the character input method that present embodiment provided not only can be avoided normal use is produced interference by detecting whether supress non-backspace key; But also can select the literal of going up screen of this input error, and the literal of this input error is covered, and need not manually delete, with further raising input efficiency.
Fig. 6 is the module map of a kind of embodiment of character input system of the present invention.
In the present embodiment, in process at input characters, owing to the literal of falsely dropping literal or the literal misspelling is caused going up screen does not meet expection, if do not carry out other operation, and directly press the defined backspace key of the present invention, can return to and be about to select the scene of shielding on the literal, not meet the literal of going up screen of expection before the corrigendum.Particularly, the character input system 60 in the present embodiment comprises and preserves module 601, detection module 602, candidate character generation module 603 and last panel module 604.Preserve module 601 and be used to preserve the contextual information of going up the literal of screen.Detection module 602 is used to detect the information of pressing backspace key.Candidate character generation module 603 is used for generating the candidate literal according to input, and according to the contextual information of preserving of going up the literal of screen, generates candidate character once more.Last panel module 604 is used for and will shields from the selected literal of candidate literal that generates, and the candidate literal of this generation comprises candidate literal that generates first and the candidate literal that generates once more.
The present invention also provides the character input method system 60 of another embodiment, and in this embodiment, detection module 602 also is used for detecting and whether switching input pattern by cursor after the contextual information of the literal of screen on preserving module 601 preservations.After detecting,, then do not carry out rollback operation if press backspace key again by cursor switching input pattern.Like this can be in the process of input characters, owing to the literal of falsely dropping literal or the literal misspelling is caused going up screen does not meet expection, and carried out after the switching input pattern operation with cursor, press the defined backspace key of the present invention again, avoided normal use being produced disturbing because the strategy of the selection literal between the different input patterns is different.
The present invention also provides the character input method system 60 of another embodiment, and in this embodiment, detection module 602 also is used for detecting and whether pressing non-backspace key after the contextual information of the literal of screen on preserving.After detecting the information of pressing non-backspace key,, then do not carry out rollback operation if press backspace key again.Can in the process of input characters,, and press after the non-backspace key like this, press backspace key again, and normal use is produced interference owing to the literal of falsely dropping literal or the literal misspelling is caused going up screen does not meet expection.
Fig. 7 is the module map of another embodiment of character input system of the present invention.
Compare with the character input method system 60 of the foregoing description, in this embodiment, character input method system 70 also comprises literal selection module 605 and overlay module 606.Literal selects module 605 to be used to detect after the information of pressing backspace key, the literal of going up screen of selected this input error.Overlay module 606 is used for covering the literal of going up screen of this input error when last panel module 604 will shield again from the selected literal of candidate character that generates once more.Can select the literal of going up screen of module 605 selected these input errors like this by literal, cover by the literal of overlay module 606 then, and need not manually delete, with further raising input efficiency with this input error.
Below only be the preferred embodiments of the present invention; be not so limit claim of the present invention; every equivalent structure or equivalent flow process conversion that utilizes instructions of the present invention and accompanying drawing content to be done; or directly or indirectly be used in other relevant technical fields, all in like manner be included in the scope of patent protection of the present invention.