CN102750035B - The determination method and apparatus of display position of cursor - Google Patents
The determination method and apparatus of display position of cursor Download PDFInfo
- Publication number
- CN102750035B CN102750035B CN201210205364.4A CN201210205364A CN102750035B CN 102750035 B CN102750035 B CN 102750035B CN 201210205364 A CN201210205364 A CN 201210205364A CN 102750035 B CN102750035 B CN 102750035B
- Authority
- CN
- China
- Prior art keywords
- cursor
- click location
- moving direction
- click
- touching medium
- 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.)
- Active
Links
Landscapes
- User Interface Of Digital Computer (AREA)
- Position Input By Displaying (AREA)
Abstract
The invention discloses a kind of determination method and apparatus of display position of cursor, in the above-mentioned methods, when touching medium is more than the first preset duration with the contact duration of the first click location on mobile terminal screen in editable region, the second click location of the first click location and touching medium in editable region is obtained;The first click location and the second click location according to getting determine the moving direction of cursor;Cursor is moved to according to moving direction by position to be shown.According to technical scheme provided by the invention, quick response is realized, automatically moves cursor, editor position is accurately positioned, reduces the maloperation of user, improve the speed of word input.
Description
Technical field
The present invention relates to the communications field, in particular to a kind of determination method and apparatus of display position of cursor.
Background technology
At present, all touch screen such as the mobile phone in correlation technique, tablet personal computer formula mobile terminal device is respectively provided with word input
Function.User can utilize word input function editor document, short message, memorandum etc., meet user profile transmission, text
The demand of word processing.But user using above-mentioned mobile terminal editor document when, can occur often word input error or
Omit the phenomenon of word.Therefore, user needs to delete which part word or inserts word among the text inputted.
Aforesaid operations are required to click on screen repositioning cursor position with finger, but due to the mobile terminal screen being commonly used
The size of size is limited, and finger is difficult to the character area in disposable accurate place needing to delete or inserting, and easily produces mistake
Operation.
The content of the invention
The invention provides a kind of determination method and apparatus of display position of cursor, at least to solve cursor in correlation technique
Locating accuracy is low, easily produces the problem of maloperation.
According to an aspect of the invention, there is provided a kind of determination method of display position of cursor.
Included according to the determination method of the display position of cursor of the present invention:When touching medium on mobile terminal screen with that can compile
When the contact duration of the first click location in volume region is more than the first preset duration, obtains the first click location and touch Jie
Second click location of the matter in editable region;The first click location and the second click location according to getting determine cursor
Moving direction;Cursor is moved to according to moving direction by position to be shown.
Preferably, determine that the moving direction of cursor includes according to the first click location and the second click location that get:
The coordinate of the first click location and the coordinate of the second click location are obtained respectively;According to the coordinate of the first click location got
Calculated with the coordinate of the second click location from the first click location to the vector shift of the second click location with clicking on position with first
It is set to the angle of the forward reference axle of the origin of coordinates;Angle according to calculating determines the moving direction of cursor.
Preferably, the moving direction for determining cursor according to the angle calculated includes one below:If 2k π-π/4<α≤
During 2k π+π/4, it is determined that the moving direction of cursor is to the right;If 2k π+π/4<During π of α≤2k π+3/4, it is determined that the movement of cursor
Direction is upward;If π/4 of 2k π+3<During π of α≤2k π+5/4, it is determined that the moving direction of cursor is to the left;If π/4 of 2k π+5<α≤
During π of 2k π+7/4, it is determined that the moving direction of cursor is downward, wherein, k is arbitrary integer, and π is 180 degree, and α is angle.
Preferably, cursor is moved into position to be shown according to moving direction includes:Whether detection touching medium leaves
Second click location;If it is, cursor is moved from the first click location along moving direction according to default travel frequency;Inspection
Survey whether touching medium leaves the first click location;If it is, stop mobile cursor.
Preferably, cursor is moved into position to be shown according to moving direction includes:Whether detection touching medium leaves
First click location and/or the second click location;If it is, according to default travel frequency by cursor from the first click location
Moved along moving direction;The clicking operation of touching medium is responded, stops mobile cursor.
Preferably, cursor is moved into position to be shown according to moving direction includes:Whether detection touching medium leaves
First click location;If it is, judging whether touching medium is more than the second preset duration with the contact duration of the second click location;
If it is, cursor is moved from the first click location along moving direction according to default travel frequency;Detecting touching medium is
It is no to leave the second click location;If it is, stop mobile cursor.
According to another aspect of the present invention, there is provided a kind of determining device of display position of cursor.
Included according to the determining device of the display position of cursor of the present invention:Acquisition module, for when touching medium and movement
When the contact duration of the first click location on terminal screen in editable region is more than the first preset duration, obtains first and click on
The second click location of position and touching medium in editable region;Determining module, for according to first point got
Hit position and the second click location determines the moving direction of cursor;Execution module, for being moved to cursor according to moving direction
Position to be shown.
Preferably, determining module includes:Acquiring unit, coordinate and second for obtaining the first click location respectively are clicked on
The coordinate of position;Computing unit, based on according to the coordinate of the first click location and the coordinate of the second click location got
Calculate from the first click location to the vector shift of the second click location and the forward reference using the first click location as the origin of coordinates
The angle of axle;Determining unit, for determining the moving direction of cursor according to the angle calculated.
Preferably, determining unit, in 2k π-π/4<During α≤2k π+π/4, it is determined that the moving direction of cursor is to the right;
Or in 2k π+π/4<During π of α≤2k π+3/4, it is determined that the moving direction of cursor is upward;Or in π/4 of 2k π+3<α≤2kπ+
During 5 π/4, it is determined that the moving direction of cursor is to the left;Or in π/4 of 2k π+5<During π of α≤2k π+7/4, it is determined that the shifting of cursor
Dynamic direction is downward, wherein, k is arbitrary integer, and π is 180 degree, and α is angle.
Preferably, execution module includes:First detection unit, for detecting whether touching medium leaves the second click position
Put;First mobile unit, for when the output of the first detection unit is is, clicking on cursor from first according to default travel frequency
Rise and moved along moving direction in position;Second detection unit, for detecting whether touching medium leaves the first click location;At first
Unit is managed, for when the output of the second detection unit is is, stopping mobile cursor.
Preferably, execution module also includes:3rd detection unit, for detecting whether touching medium leaves the first click position
Put and/or the second click location;Second mobile unit, for when the output of the 3rd detection unit is is, according to default mobile frequency
Rate moves cursor from the first click location along moving direction;Second processing unit, the click for responding touching medium are grasped
Make, stop mobile cursor.
Preferably, execution module also includes:4th detection unit, for detecting whether touching medium leaves the first click position
Put;Judging unit, for when the output of the 4th detection unit is is, judging contact duration of the touching medium with the second click location
Whether the second preset duration is more than;3rd mobile unit, for when judging unit output is is, being incited somebody to action according to default travel frequency
Cursor moves from the first click location along moving direction;5th detection unit, for detecting whether touching medium leaves second
Click location;3rd processing unit, for when the output of the 5th detection unit is is, stopping mobile cursor.
By the present invention, using multipoint-touch-technology, under text editing state, touching medium is obtained on the touchscreen
The first click location in text edit area, and using first click location as the initial position for choosing cursor, wherein, touch
Touch medium and be more than the first preset duration with the contact duration of the first click location.In addition, it is also necessary to obtain touching medium and touching
The second click location in text edit area on screen.Second click location can be clicked on centered on the first click location
All directions outside first click location, the moving direction of cursor is determined by the first click location and the second click location, directly
To the position for being moved to user and wishing editor, solve in correlation technique that cursor locating accuracy is low, easily produce maloperation
Problem, and then quick response is realized, cursor is automatically moved, editor position is accurately positioned, reduces the maloperation of user, improve
The speed of word input.
Brief description of the drawings
Accompanying drawing described herein is used for providing a further understanding of the present invention, forms the part of the application, this hair
Bright schematic description and description is used to explain the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the flow chart of the determination method of display position of cursor according to embodiments of the present invention;
Fig. 2 is the schematic diagram of the determination method of display position of cursor according to the preferred embodiment of the invention;
Fig. 3 is the structured flowchart of the determining device of display position of cursor according to embodiments of the present invention;
Fig. 4 is the structured flowchart according to the determining device of the display position of cursor of the preferred embodiment of the present invention one;
Fig. 5 is the structured flowchart according to the determining device of the display position of cursor of the preferred embodiment of the present invention two;
Fig. 6 is the structured flowchart according to the determining device of the display position of cursor of the preferred embodiment of the present invention three;And
Fig. 7 is the schematic diagram of the determining device of display position of cursor according to the preferred embodiment of the invention.
Embodiment
Describe the present invention in detail below with reference to accompanying drawing and in conjunction with the embodiments.It should be noted that do not conflicting
In the case of, the feature in embodiment and embodiment in the application can be mutually combined.
Fig. 1 is the flow chart of the determination method of display position of cursor according to embodiments of the present invention.As shown in figure 1, the party
Method can include following processing step:
Step S102:When touching medium contact with the first click location on mobile terminal screen in editable region
When length is more than the first preset duration, the second click position of the first click location and touching medium in editable region is obtained
Put;
Step S104:The first click location and the second click location according to getting determine the moving direction of cursor;
Step S106:Cursor is moved to according to moving direction by position to be shown.
In correlation technique, cursor locating accuracy is low, easily produces maloperation.Using method as shown in Figure 1, using more
Point touch technology, under text editing state, obtain the first click in the text edit area of touching medium on the touchscreen
Position, and the initial position for choosing cursor is used as using first click location(Such as:Click on the attached of the word to be edited
Closely), wherein, touching medium is more than the first preset duration with the contact duration of the first click location(Such as:3s).In addition, also need
Obtain the second click location in the text edit area of touching medium on the touchscreen.Second click location is clicked on first
Centered on position, all directions outside the first click location can be clicked on(Such as:Upper and lower, left and right), position is clicked on by first
The moving direction that cursor is determined with the second click location is put, until being moved to the position that user wishes editor, solves related skill
Cursor locating accuracy is low in art, easily produces the problem of maloperation, and then realizes quick response, automatically moves cursor, accurate
It is determined that position is edited in position, reduce the maloperation of user, improve the speed of word input.
Preferably, in step S104, cursor is determined according to the first click location and the second click location that get
Moving direction can include following operation:
Step S1:The coordinate of the first click location and the coordinate of the second click location are obtained respectively;
Step S2:Calculated according to the coordinate of the first click location got and the coordinate of the second click location from first point
Hit vector shift of the position to the second click location and the angle using the first click location as the forward reference axle of the origin of coordinates;
Step S3:Angle according to calculating determines the moving direction of cursor.
It is in the preferred embodiment assumed that the coordinate of the first click location is A(X1, y1), the coordinate of the second click location is B
(X2, y2), can calculate vector shift AB=(X2-x1, y2-y1).AB can be calculated and with A by trigonometric function formula
Point is the angle α of the horizontal positive axis of origin, such as:Using formula α=arctan((y2-y1)/(x2-x1)).Certainly, may be used also
To be used as the origin of coordinates using A(0,0), then vector shift AB=(X2, y2).Now, above-mentioned formula can be reduced to α=
arctan(y2/x2).
During being preferable to carry out, in above-mentioned steps S3, the moving direction for determining cursor according to the angle calculated can
With including one below:
(1)If 2k π-π/4<During α≤2k π+π/4, it is determined that the moving direction of cursor is to the right;
(2)If 2k π+π/4<During π of α≤2k π+3/4, it is determined that the moving direction of cursor is upward;
(3)If π/4 of 2k π+3<During π of α≤2k π+5/4, it is determined that the moving direction of cursor is to the left;
(4)If π/4 of 2k π+5<During π of α≤2k π+7/4, it is determined that the moving direction of cursor is downward,
Wherein, k is arbitrary integer, and π is 180 degree, and α is angle.
In a preferred embodiment, click location can be used as the origin of coordinates, spent respectively along -45 from origin, 45 degree, 135
Degree, 225 degree send ray, and each quadrant is divided.If 2k π-π/4<During α≤2k π+π/4, illustrate that glide direction is more leaned on
Nearly horizontal positive axis, the then moving direction that can determine next step are to move right;If 2k π+π/4<During π of α≤2k π+3/4,
Illustrate glide direction closer to longitudinal positive axis, then the moving direction that can determine next step is to move up;If the π of 2k π+3/
4<During π of α≤2k π+5/4, illustrate glide direction closer to laterally negative semiaxis, it is determined that the moving direction of cursor is to the left;If 2k π
+5π/4<During π of α≤2k π+7/4, illustrate glide direction closer to the negative semiaxis in longitudinal direction, it is determined that the moving direction of cursor is downward.
In a preferred embodiment, Fig. 2 is showing for the determination method of display position of cursor according to the preferred embodiment of the invention
It is intended to.As shown in Fig. 2 under text editing state, following three kinds of modes can be used to determine the moving direction of cursor:
Mode one, assume that A is the first click location in touch display screen, its coordinate is(X1, y1), mobile terminal will(X1,
y1)As the initial position of cursor, in touch display screen display highlighting position at A, i.e. alphabetical the D and E of text the third line it
Between.Touching medium keeps pinning state in the first click location, the right side of the second click location the first click location on the touchscreen
At the B in direction, i.e. touch display screen, its coordinate is(X2, y2).By calculating arctan((y2-y1)/(x2-x1))Sweared
Measure displacement AB and the angle of x-axis positive direction.Because the angle is positioned at positive 45 degree and minus between 45 degree, hence, it can be determined that cursor
Moving direction be right direction.
Mode two, assume that A is the first click location in touch display screen, its coordinate is(X1, y1), mobile terminal will(X1,
y1)As the initial position of cursor, in touch display screen display highlighting position at A, i.e. alphabetical the D and E of text the third line it
Between.Touching medium leaves the first click location, and second point is clicked on outside the first click location on the touchscreen and hits position holding
State is pinned, i.e., at the B of touch display screen, its coordinate is(X2, y2).By calculating arctan((y2-y1)/(x2-x1))
To vector shift AB and the angle of x-axis positive direction.Because the angle is positioned at positive 45 degree and minus between 45 degree, hence, it can be determined that
The moving direction of cursor is right direction.
Mode three, assume that A is the first click location in touch display screen, its coordinate is(X1, y1), mobile terminal will(X1,
y1)As the initial position of cursor, in touch display screen display highlighting position at A, i.e. alphabetical the D and E of text the third line it
Between.After click second point hits position outside the first click location of touching medium on the touchscreen, touching medium leaves touch display
Screen, i.e., leave simultaneously at the A shown in Fig. 2 and at B, wherein, the coordinate of B points is(X2, y2).By calculating arctan((y2-
y1)/(x2-x1))Obtain vector shift AB and x-axis positive direction angle.Because the angle is positioned at positive 45 degree and minus between 45 degree,
Hence, it can be determined that the moving direction of cursor is right direction.
Preferably, in step s 106, according to moving direction by cursor be moved to position to be shown can include it is following
Step:
Step S4:Whether detection touching medium leaves the second click location;
Step S5:If it is, cursor is moved from the first click location along moving direction according to default travel frequency;
Step S6:Whether detection touching medium leaves the first click location;
Step S7:If it is, stop mobile cursor.
In a preferred embodiment, as shown in Fig. 2 user can leave touching medium the second click location, according to above-mentioned
Moving direction of the cursor having determined in touch display screen be at A move right.Cursor is according to default mobile frequency
The continuous character motion one by one to the right of rate, in the preferred embodiment, user wishes to edit the third line letter H.When cursor is moved to
User wishes between position the third line letter G and H of editor that is, at the C of touch display screen, user can leave touching medium
First click location, cursor are stopped at C immediately, and its coordinate is(X3, y1).Now, user can continue to input word.
Similarly, as shown in Fig. 2 if the user desired that editor the first row letter n, the second point that first can be clicked on according to user
Hit position(Such as:At D)Judge which model the angle that the positive axis of the vector shift and x-axis formed from A points to D points is formed falls at
In enclosing.Find that the angle is positioned at positive 45 degree and minus between 45 degree by calculating, then can determine that cursor will first move right.Touch
Medium leaves the second click location, and when cursor is moved between J and K, touching medium leaves the first click location.Then touch and be situated between
Particle hits cursor present position, and now cursor position can be used as the first click location.Second clicked on further according to user
Click location(Such as:At D)Judge the folder that the vector shift of point formation and the positive axis of x-axis are formed from cursor position to D
Corner is in the range of which.Find that the angle is positioned at positive 45 degree and positive between 135 degree by calculating, then can determine that cursor will be to
Upper movement.Touching medium leaves the second click location, and when cursor is moved between m and n, touching medium leaves the first click position
Put.Cursor stops between m and n immediately, and user can continue to input word.
Preferably, in step s 106, according to moving direction by cursor be moved to position to be shown can include it is following
Operation:
Step S4:Whether detection touching medium leaves the first click location and/or the second click location;
Step S5:If it is, cursor is moved from the first click location along moving direction according to default travel frequency;
Step S6:The clicking operation of touching medium is responded, stops mobile cursor.
In a preferred embodiment, touching medium can leave the first click location and the second click location simultaneously, such as Fig. 2 institutes
Showing, A points and B points can be left simultaneously, now, according to above-mentioned analysis, it may be determined that the moving direction of cursor is right direction, because
This, cursor moves cursor from the first click location also according to default travel frequency along moving direction.When cursor is moved to
User needs the word edited(Such as:C points)When, the clicking operation of response user optional position on the touchscreen, stop movement,
User can continue to input word.
Preferably, in step s 106, cursor being moved into position to be shown according to moving direction can include:
Step S7:Whether detection touching medium leaves the first click location;
Step S8:If it is, when judging touching medium and whether default more than the second contact duration of the second click location
It is long;
Step S9:If it is, cursor is moved from the first click location along moving direction according to default travel frequency;
Step S10:Whether detection touching medium leaves the second click location;
Step S11:If it is, stop mobile cursor.
In a preferred embodiment, touching medium can first leave the first click location, then click on the second click location again
And long-press state is kept, B points are clicked on again and keep long-press state as shown in Fig. 2 A points can first be left, now, according to above-mentioned point
Analysis, it may be determined that the moving direction of cursor is right direction, and therefore, cursor is also according to default travel frequency by cursor from first point
Position is hit to move along moving direction.The word edited is needed when cursor is moved to user(Such as:C points)When, touching medium from
B points are opened, cursor stops movement, and user can be in C point editor's words.
Fig. 3 is the structured flowchart of the determining device of display position of cursor according to embodiments of the present invention.As shown in figure 3, should
The determining device of display position of cursor can include:Acquisition module 10, for when touching medium on mobile terminal screen with that can compile
When the contact duration of the first click location in volume region is more than the first preset duration, obtains the first click location and touch Jie
Second click location of the matter in editable region;Determining module 20, for according to the first click location and second got
Click location determines the moving direction of cursor;Execution module 30, for cursor to be moved to position to be shown according to moving direction
Put.
Using device as shown in Figure 3, solve in correlation technique that cursor locating accuracy is low, easily produce maloperation
Problem, and then quick response is realized, cursor is automatically moved, editor position is accurately positioned, reduces the maloperation of user, improve
The speed of word input.
Preferably, as shown in figure 4, determining module 20 can include:Acquiring unit 200, for obtaining the first click respectively
The coordinate of the coordinate of position and the second click location;Computing unit 202, for the coordinate according to the first click location got
Calculated with the coordinate of the second click location from the first click location to the vector shift of the second click location with clicking on position with first
It is set to the angle of the forward reference axle of the origin of coordinates;Determining unit 204, for determining the movement of cursor according to the angle calculated
Direction.
During being preferable to carry out, above-mentioned determining unit 204, in 2k π-π/4<During α≤2k π+π/4, it is determined that light
Target moving direction is to the right;Or in 2k π+π/4<During π of α≤2k π+3/4, it is determined that the moving direction of cursor is upward;Or
In π/4 of 2k π+3<During π of α≤2k π+5/4, it is determined that the moving direction of cursor is to the left;Or in π/4 of 2k π+5<α≤2kπ+7π/4
When, it is determined that the moving direction of cursor is downward, wherein, k is arbitrary integer, and π is 180 degree, and α is angle.
Preferably, as shown in figure 4, above-mentioned execution module 30 can include:First detection unit 300, touched for detecting
Whether medium leaves the second click location;First mobile unit 302, for the first detection unit output for be when, according to pre-
If travel frequency moves cursor from the first click location along moving direction;Second detection unit 304, it is situated between for detecting to touch
Whether matter leaves the first click location;First processing units 306, for when the output of the second detection unit is is, stopping movement
Cursor.
Preferably, as shown in figure 5, above-mentioned execution module 30 can also include:3rd detection unit 308, it is tactile for detecting
Touch whether medium leaves the first click location and/or the second click location;Second mobile unit 310, for single in the 3rd detection
Member output is when being, moves cursor from the first click location according to default travel frequency along moving direction;Second processing list
Member 312, for responding the clicking operation of touching medium, stop mobile cursor.
Preferably, as shown in fig. 6, above-mentioned execution module 30 can also include:4th detection unit 314, for detecting
State whether touching medium leaves first click location;Judging unit 316, for being yes in the 4th detection unit output
When, judge whether the touching medium is more than the second preset duration with the contact duration of second click location;3rd movement
Unit 318, for when judging unit output is is, clicking on the cursor from described first according to default travel frequency
Rise and moved along the moving direction in position;5th detection unit 320, for detecting whether the touching medium leaves described second
Click location;3rd processing unit 322, for when the 5th detection unit output is is, stopping the mobile cursor.
Above-mentioned preferred embodiment is further described with reference to the preferred embodiment shown in Fig. 7.
Fig. 7 is the schematic diagram of the determining device of display position of cursor according to the preferred embodiment of the invention.As shown in fig. 7,
The preferred embodiment can include location identification module, microprocessor module and touch display screen, wherein, location identification module
(Equivalent to above-mentioned acquisition module), it connects microprocessor module and touch display screen respectively, for identifying touching medium aobvious
The position coordinates touched in display screen, and the location coordinate information is sent to microprocessor module;Touch display screen, its connection position
Identification module and microprocessor module are put, for touching the position clicked on display highlighting.Microprocessor module(Equivalent to above-mentioned
Determining module and execution module)The process chip of mobile terminal can be used, it, which is distinguished link position identification module and touched, shows
Screen, the location coordinate information that receiving position identification module is sent, and determine cursor according to the multiple location coordinate informations received
Mobile direction and position.
In a preferred embodiment, as shown in Fig. 2 under text editing state, the A of touching medium point touching display screen
Place, location identification module is by the coordinate position of A points(X1, y1)Microprocessor module is reported, microprocessor module will(X1, y1)
As the initial position of cursor, display highlighting position is at A in touch display screen, i.e., between the alphabetical D and E of text the third line.
First click location keeps pinning state, and the second click location falls the right direction of the first click location on the touchscreen.Second point
Position is hit at the B of touch display screen, location identification module is by the coordinate position of B points(X2, y2)Report microprocessor.Micro- place
Manage device and calculate arctan((y2-y1)/(x2-x1))Obtain vector shift AB and x-axis positive direction angle.Because the angle is located at
Positive 45 degree and minus between 45 degree, hence, it can be determined that the moving direction of cursor is right direction.Cursor is according to default travel frequency
Continuously character motion one by one to the right, in the preferred embodiment, user wishes to edit the third line letter H.When cursor is moved to use
Family is wished between position the third line letter G and H of editor, i.e., at the C of touch display screen, user can leave touching medium the
One click location, cursor are stopped at C immediately, and its coordinate is(X3, y1).Now, user can continue to input word.
In a preferred embodiment, as shown in Fig. 2 under text editing state, the A of touching medium point touching display screen
Place, location identification module is by the coordinate position of A points(X1, y1)Microprocessor module is reported, microprocessor module will(X1, y1)
As the initial position of cursor, display highlighting position is at A in touch display screen, i.e., between the alphabetical D and E of text the third line.
First click location keeps pinning state, and clicks on second point outside the first click location on the touchscreen and hit position.Second clicks on
Position is at the B of touch display screen, and location identification module is by the coordinate position of B points(X2, y2)Report microprocessor.Then,
Touching medium leaves touch display screen, and microprocessor calculates arctan((y2-y1)/(x2-x1))Obtain vector shift AB and x-axis
The angle of positive direction.Because the angle is positioned at positive 45 degree and minus between 45 degree, hence, it can be determined that the moving direction of cursor for
Right direction.Cursor is according to the continuous character motion one by one to the right of default travel frequency, and in the preferred embodiment, user wishes to edit
The third line letter H.Between cursor is moved to position the third line letter G and H that user wishes editor, i.e. the C of touch display screen
Place, user can be stopped at C immediately with optional position on point touching display screen, cursor, and its coordinate is(X3, y1).Now, use
Family can continue to input word.
In a preferred embodiment, as shown in Fig. 2 under text editing state, the A of touching medium point touching display screen
Place, location identification module is by the coordinate position of A points(X1, y1)Microprocessor module is reported, microprocessor module will(X1, y1)
As the initial position of cursor, display highlighting position is at A in touch display screen, i.e., between the alphabetical D and E of text the third line.
Touching medium leaves the first click location and second point is clicked on outside the first click location and hits position and keep long-press state.Second
Click location is at the B of touch display screen, and location identification module is by the coordinate position of B points(X2, y2)Report microprocessor.It is micro-
Processor calculates arctan((y2-y1)/(x2-x1))Obtain vector shift AB and x-axis positive direction angle.Due to the angle position
It is in positive 45 degree and minus between 45 degree, hence, it can be determined that the moving direction of cursor is right direction.Cursor is according to default mobile frequency
The continuous character motion one by one to the right of rate, in the preferred embodiment, user wishes to edit the third line letter H.When cursor is moved to
User wishes between position the third line letter G and H of editor that is, at the C of touch display screen, user can leave touching medium
Second click location, cursor are stopped at C immediately, and its coordinate is(X3, y1).Now, user can continue to input word.
As can be seen from the above description, following technique effect is above embodiments enabled(It should be noted that these
Effect is the effect that some preferred embodiments can reach):Quick response is realized, automatically moves cursor, is accurately positioned editor
Position, reduce the maloperation of user, improve the speed of word input.
Obviously, those skilled in the art should be understood that above-mentioned each module of the invention or each step can be with general
Computing device realize that they can be concentrated on single computing device, or be distributed in multiple computing devices and formed
Network on, alternatively, they can be realized with the program code that computing device can perform, it is thus possible to they are stored
Performed in the storage device by computing device, and in some cases, can be with different from shown in order execution herein
The step of going out or describing, they are either fabricated to each integrated circuit modules respectively or by multiple modules in them or
Step is fabricated to single integrated circuit module to realize.So, the present invention is not restricted to any specific hardware and software combination.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention, for the skill of this area
For art personnel, the present invention can have various modifications and variations.Within the spirit and principles of the invention, that is made any repaiies
Change, equivalent substitution, improvement etc., should be included in the scope of the protection.
Claims (10)
1. a kind of determination method of display position of cursor, it is characterised in that including:
When touching medium and the contact duration of the first click location on mobile terminal screen in editable region are pre- more than first
If during duration, obtain the second click position of first click location and the touching medium in the editable region
Put;
First click location and second click location according to getting determine the moving direction of cursor;
Cursor is moved to according to the moving direction by position to be shown;
Wherein, the moving direction of the cursor is determined according to first click location and second click location that get
Including:The coordinate of first click location and the coordinate of second click location are obtained respectively;According to getting
The coordinate of first click location and the coordinate of second click location are calculated from first click location to the second point
Hit the vector shift of position and the angle using first click location as the forward reference axle of the origin of coordinates;According to what is calculated
The angle determines the moving direction of the cursor.
2. according to the method for claim 1, it is characterised in that the angle according to calculating determines the shifting of the cursor
Dynamic direction includes one below:
If 2k π-π/4<During α≤2k π+π/4, it is determined that the moving direction of the cursor is to the right;
If 2k π+π/4<During π of α≤2k π+3/4, it is determined that the moving direction of the cursor is upward;
If π/4 of 2k π+3<During π of α≤2k π+5/4, it is determined that the moving direction of the cursor is to the left;
If π/4 of 2k π+5<During π of α≤2k π+7/4, it is determined that the moving direction of the cursor is downward,
Wherein, k is arbitrary integer, and π is 180 degree, and α is the angle.
3. method according to any one of claim 1 to 2, it is characterised in that according to the moving direction by the light
Mark, which is moved to the position to be shown, to be included:
Detect whether the touching medium leaves second click location;
If it is, according to default travel frequency by the cursor from first click location along the moving direction move
It is dynamic;
Detect whether the touching medium leaves first click location;
If it is, stop the mobile cursor.
4. method according to any one of claim 1 to 2, it is characterised in that according to the moving direction by the light
Mark, which is moved to the position to be shown, to be included:
Detect whether the touching medium leaves first click location and/or second click location;
If it is, according to default travel frequency by the cursor from first click location along the moving direction move
It is dynamic;
The clicking operation of the touching medium is responded, stops the mobile cursor.
5. method according to any one of claim 1 to 2, it is characterised in that according to the moving direction by the light
Mark, which is moved to the position to be shown, to be included:
Detect whether the touching medium leaves first click location;
If it is, judging whether the touching medium is more than the second preset duration with the contact duration of second click location;
If it is, according to default travel frequency by the cursor from first click location along the moving direction move
It is dynamic;
Detect whether the touching medium leaves second click location;
If it is, stop the mobile cursor.
A kind of 6. determining device of display position of cursor, it is characterised in that including:
Acquisition module, for when touching medium contact with the first click location on mobile terminal screen in editable region
When length is more than the first preset duration, first click location and the touching medium are obtained in the editable region
Second click location;
Determining module, for determining the movement of cursor according to first click location and second click location that get
Direction;
Execution module, for cursor to be moved to position to be shown according to the moving direction;
Wherein, the determining module includes:Acquiring unit, for obtaining the coordinate and described of first click location respectively
The coordinate of two click locations;Computing unit, for the coordinate according to first click location got and the second point
The coordinate for hitting position is calculated from first click location to the vector shift of second click location and with described first point
Hit the angle for the forward reference axle that position is the origin of coordinates;Determining unit, described in being determined according to the angle calculated
The moving direction of cursor.
7. device according to claim 6, it is characterised in that the determining unit, in 2k π-π/4<α≤2kπ+π/
When 4, it is determined that the moving direction of the cursor is to the right;Or in 2k π+π/4<During π of α≤2k π+3/4, it is determined that the cursor
Moving direction it is upward;Or in π/4 of 2k π+3<During π of α≤2k π+5/4, it is determined that the moving direction of the cursor is to the left;Or
Person, in π/4 of 2k π+5<During π of α≤2k π+7/4, it is determined that the moving direction of the cursor is downward, wherein, k is arbitrary integer, and π is
180 degree, α are the angle.
8. the device according to any one of claim 6 to 7, it is characterised in that the execution module includes:
First detection unit, for detecting whether the touching medium leaves second click location;
First mobile unit, for when first detection unit output is is, according to default travel frequency by the cursor
Moved from first click location along the moving direction;
Second detection unit, for detecting whether the touching medium leaves first click location;
First processing units, for when second detection unit output is is, stopping the mobile cursor.
9. the device according to any one of claim 6 to 7, it is characterised in that the execution module also includes:
3rd detection unit, for detecting whether the touching medium leaves first click location and/or the second point
Hit position;
Second mobile unit, for when the 3rd detection unit output is is, according to default travel frequency by the cursor
Moved from first click location along the moving direction;
Second processing unit, for responding the clicking operation of the touching medium, stop the mobile cursor.
10. the device according to any one of claim 6 to 7, it is characterised in that the execution module also includes:
4th detection unit, for detecting whether the touching medium leaves first click location;
Judging unit, for when the 4th detection unit output is is, judging that the touching medium is clicked on described second
Whether the contact duration of position is more than the second preset duration;
3rd mobile unit, for when judging unit output is is, according to default travel frequency by the cursor from institute
The first click location is stated to move along the moving direction;
5th detection unit, for detecting whether the touching medium leaves second click location;
3rd processing unit, for when the 5th detection unit output is is, stopping the mobile cursor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210205364.4A CN102750035B (en) | 2012-06-20 | 2012-06-20 | The determination method and apparatus of display position of cursor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210205364.4A CN102750035B (en) | 2012-06-20 | 2012-06-20 | The determination method and apparatus of display position of cursor |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102750035A CN102750035A (en) | 2012-10-24 |
CN102750035B true CN102750035B (en) | 2017-12-05 |
Family
ID=47030279
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210205364.4A Active CN102750035B (en) | 2012-06-20 | 2012-06-20 | The determination method and apparatus of display position of cursor |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102750035B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102799358B (en) * | 2012-06-20 | 2017-08-08 | 南京中兴软件有限责任公司 | The determination method and device of display position of cursor |
CN104063162B (en) * | 2013-03-20 | 2018-04-27 | 腾讯科技(深圳)有限公司 | The method and device of entering handwritten information |
CN103268184A (en) * | 2013-05-17 | 2013-08-28 | 广东欧珀移动通信有限公司 | Method and device for moving text cursor |
CN103777959A (en) * | 2014-02-17 | 2014-05-07 | 李海源 | Use method of virtual mouse |
CN105677169A (en) * | 2014-11-19 | 2016-06-15 | 阿里巴巴集团控股有限公司 | Method and device for enabling mouse pointer to automatically follow cursor |
CN107368230A (en) * | 2016-05-13 | 2017-11-21 | 中兴通讯股份有限公司 | A kind of method and apparatus of interface element movement |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102171635A (en) * | 2008-10-07 | 2011-08-31 | 捷讯研究有限公司 | Portable electronic device and method of controlling same |
CN102193734A (en) * | 2010-03-19 | 2011-09-21 | 进益研究公司 | Portable electronic device and method of controlling same |
CN102654821A (en) * | 2011-03-04 | 2012-09-05 | 腾讯科技(深圳)有限公司 | Method and device for locating text cursor |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100813062B1 (en) * | 2006-05-03 | 2008-03-14 | 엘지전자 주식회사 | Portable Terminal And Method Of Displaying Text Using Same |
-
2012
- 2012-06-20 CN CN201210205364.4A patent/CN102750035B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102171635A (en) * | 2008-10-07 | 2011-08-31 | 捷讯研究有限公司 | Portable electronic device and method of controlling same |
CN102193734A (en) * | 2010-03-19 | 2011-09-21 | 进益研究公司 | Portable electronic device and method of controlling same |
CN102654821A (en) * | 2011-03-04 | 2012-09-05 | 腾讯科技(深圳)有限公司 | Method and device for locating text cursor |
Also Published As
Publication number | Publication date |
---|---|
CN102750035A (en) | 2012-10-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102750035B (en) | The determination method and apparatus of display position of cursor | |
US9612675B2 (en) | Emulating pressure sensitivity on multi-touch devices | |
US8009146B2 (en) | Method, apparatus and computer program product for facilitating data entry via a touchscreen | |
US20130215018A1 (en) | Touch position locating method, text selecting method, device, and electronic equipment | |
CN103064627B (en) | A kind of application management method and device | |
US8629837B2 (en) | Method and device for controlling information display output and input device | |
EP2770423A2 (en) | Method and apparatus for operating object in user device | |
US20090309847A1 (en) | Apparatus and method for providing multi-touch interface capability | |
KR20110139688A (en) | Dual module portable devices | |
CN104020948B (en) | A kind of method and device that cursor position is determined in touch-screen | |
CN103294401A (en) | Icon processing method and device for electronic instrument with touch screen | |
CN102402369A (en) | Electronic equipment and method for moving operation prompt identifier thereof | |
CN103019588A (en) | Touch positioning method, device and terminal | |
CN103492981A (en) | Touch screen selection | |
CN103869947A (en) | Method for controlling electronic device and electronic device | |
CN104991696A (en) | Information processing method and electronic equipment | |
CN104536661A (en) | Terminal screen shot method | |
CN108279848B (en) | Display method and electronic equipment | |
CN107577404B (en) | Information processing method and device and electronic equipment | |
CN103761045A (en) | Zoom touch control method and device of mobile terminal | |
WO2015081863A1 (en) | Information input method, device and terminal | |
CN109254672A (en) | Control method of cursor and cursor control system | |
CN106020471A (en) | Operation method of mobile terminal and mobile terminal | |
CN104423657B (en) | The method and electronic equipment of information processing | |
CN104536564A (en) | Terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |