CN113110793B - Gesture operation method and device for realizing undo and redo - Google Patents

Gesture operation method and device for realizing undo and redo Download PDF

Info

Publication number
CN113110793B
CN113110793B CN202110533007.XA CN202110533007A CN113110793B CN 113110793 B CN113110793 B CN 113110793B CN 202110533007 A CN202110533007 A CN 202110533007A CN 113110793 B CN113110793 B CN 113110793B
Authority
CN
China
Prior art keywords
redo
undo
touch screen
sliding
touch
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
Application number
CN202110533007.XA
Other languages
Chinese (zh)
Other versions
CN113110793A (en
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.)
Shanghai Shengteng Data Technology Co ltd
Shanghai Yingwuchu Data Technology Co ltd
Shanghai Linguan Data Technology Co ltd
Shanghai Hehe Information Technology Development Co Ltd
Original Assignee
Shanghai Shengteng Data Technology Co ltd
Shanghai Yingwuchu Data Technology Co ltd
Shanghai Linguan Data Technology Co ltd
Shanghai Hehe Information Technology Development Co Ltd
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 Shanghai Shengteng Data Technology Co ltd, Shanghai Yingwuchu Data Technology Co ltd, Shanghai Linguan Data Technology Co ltd, Shanghai Hehe Information Technology Development Co Ltd filed Critical Shanghai Shengteng Data Technology Co ltd
Priority to CN202110533007.XA priority Critical patent/CN113110793B/en
Publication of CN113110793A publication Critical patent/CN113110793A/en
Application granted granted Critical
Publication of CN113110793B publication Critical patent/CN113110793B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • 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/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range

Abstract

The application discloses a gesture operation method for achieving undo and redo. And when the electronic equipment detects that the touch screen is pressed by multiple fingers, entering a state of canceling redo activation. The electronic equipment calculates a undo angle threshold value alpha, a redo angle threshold value gamma, a sliding direction of the sliding operation and an angle beta of the angle AOB in real time. After determining the starting point a each time, once | β | is increased to be equal to α or γ during a certain sliding direction, the electronic device performs a undo or redo operation, and at the same time, determines the contact point of the sliding operation on the touch screen at the moment of | β |, α or γ as the starting point a again, and recalculates. And when the electronic equipment detects that the touch main body of the sliding operation leaves the touch screen, the electronic equipment exits the redo activation canceling state. According to the method, one or more times of continuous undo or redo are quickly executed by sliding a section of arc or circle on the touch screen, so that the operation is simple, convenient and smooth.

Description

Gesture operation method and device for achieving undo and redo
Technical Field
The application relates to a method for executing undo and redo operations by gestures on electronic equipment with a touch screen.
Background
Touch screens (also called touch screens) are widely used in electronic devices such as smart phones, tablet computers, and notebook computers. Such an electronic device having a touch screen recognizes an operation gesture (gesture) of a user through a mathematical algorithm, and corresponds different gestures to perform different operations. For example, on a smart phone, a user clicks an icon on a touch screen with a finger to open an application (app) corresponding to the icon. The touch screen is operated by various gestures, so that the operation efficiency and the pleasant operation experience are high.
Revocation (undoo), also known as revocation, refers to the cancellation of the previous operation. For example, the x-th step is a cancel operation, that is, the operation of the x-1 th step is cancelled, so that the electronic device becomes a state after the x-2 th step is completed. The cancel operation can be continuously carried out, if the step x +1 or the cancel operation is carried out, the operation of the step x-2 is cancelled, and the electronic equipment is changed into the state after the step x-3 is completed.
Redo (redo), also called recovery, usually follows the undo operation, meaning that an operation that was undone by the undo operation is redone. For example, the x-th step is a cancel operation, that is, the operation of the x-1 th step is cancelled, so that the electronic device becomes a state after the x-2 th step is completed. The step x +1 is a redo operation, namely, the undo operation of the step x is cancelled, so that the electronic equipment is changed into a state after the step x-1 is completed. Successive undo operations (e.g., n times) may be followed by successive redo operations (no more than n times).
In the personal computer, the user can cancel the operation by pressing the Ctrl key and the Z key simultaneously on the keyboard, and redo the operation by pressing the Ctrl key, the Shfit key, and the Z key simultaneously on the keyboard.
On an electronic device with a touch screen, currently, corresponding operations are usually performed by using "undo" and "redo" buttons, and the operation mode is single. The button needs to be clicked for multiple times aiming at continuous or batch undo and redo operations, the time consumption is long, and the states of different stages in the undo and redo processes are difficult to compare.
Disclosure of Invention
The technical problem to be solved by the application is to provide a method for executing undo and redo operations by gestures on electronic equipment with a touch screen, so that continuous or batch undo and redo operations are greatly simplified.
In order to solve the technical problem, the application provides a gesture operation method for implementing undo and redo, which includes the following steps. Step S10: when the electronic equipment detects that the multi-finger pressing operation exists on the touch screen, the electronic equipment enters a state of canceling the redo activation. Step S20: and when the electronic equipment detects that all the touch main bodies of the multi-finger pressing operation leave the touch screen, starting timing of a third time threshold. If the electronic device detects that the touch screen has a sliding operation within the timing period of the third time threshold, canceling the timing of the third time threshold, and entering step S30; otherwise, the electronic equipment exits the undo redo activation state. Step S30: the electronic equipment records the last contact point of the multi-finger pressing operation on the touch screen as a zero point O, determines the initial position of the sliding operation on the touch screen as a starting point A, records the current contact point of the sliding operation on the touch screen as a B, and calculates a undo angle threshold alpha, a redo angle threshold gamma, a sliding direction of the sliding operation and an angle beta of an angle AOB in real time. Step S40: and the electronic equipment determines to cancel or redo the operation according to the fact that the sliding direction of the sliding operation is anticlockwise or clockwise. After determining the starting point a each time, when a certain sliding direction of the sliding operation corresponds to an undo operation, once | β | is increased to equal to α during the progress of the sliding direction, the electronic device performs an undo operation, and at the same time, determines the contact point of the sliding operation on the touch screen at the moment of | β | ═ α as the starting point a again, and returns to step S30 for recalculation; when a certain sliding direction of the sliding operation corresponds to the redo operation, once | β | is increased to equal to γ during the sliding direction, the electronic device performs one redo operation while re-determining the contact point of the sliding operation on the touch screen at the moment of | β | ═ γ as the starting point a, and returns to step S30 for re-calculation. Step S50: and when the electronic equipment detects that the touch main body of the sliding operation leaves the touch screen, the electronic equipment exits the undo redo activation state. According to the method, one or more continuous undo or redo operations are rapidly executed by approximately sliding a section of arc or circle on the touch screen, so that the operation is simple, convenient and smooth.
Further, the multi-finger pressing operation refers to an operation gesture in which the electronic device detects that d touch subjects press on the touch screen, d is a positive integer greater than or equal to 2, time difference values of the d touch subjects starting to press the touch screen are all smaller than a first time threshold, moving distances of the d touch subjects on the touch screen are all smaller than the first distance threshold, and pressing times of the d touch subjects on the touch screen are all smaller than a second time threshold. The first time threshold is used to distinguish between single-finger operations and multi-finger operations. The first distance threshold is used to distinguish between a pressing operation and a sliding operation. The second time threshold is used to distinguish between a long press operation and a short press operation.
Further, when the electronic device enters the undo redo activation state, only the undo redo operation gesture is responded, and other non-undo redo operation gestures are shielded.
Further, the sliding operation comprises a multi-finger sliding operation; the multi-finger sliding operation refers to an operation gesture that the electronic device detects that e touch main bodies are pressed on the touch screen, e is a positive integer greater than or equal to 2, the pressed time difference values of the e touch main bodies are smaller than a first time threshold, and the moving distance of any one touch main body on the touch screen is larger than a first distance threshold under the condition that the e touch main bodies are not separated from the touch screen. The fourth time threshold is used to distinguish between single-finger operations and multi-finger operations.
Further, the revocation angle threshold α is determined according to the total number of previous operation steps s1 in combination with the upper limit value and the lower limit value; the total previous operation step number s1 is the total step number of operations executed by the electronic device from the last of the operation of the electronic device, the completion of the last undo operation, or the completion of the last redo operation; if 360 ÷ s1 is less than the lower limit, then the lower limit is taken by the undo angle threshold α; if 360 ÷ s1 is greater than the upper limit value, the revocation angle threshold α takes the upper limit value; if 360 ÷ s1 is between the lower limit value and the upper limit value, the revocation angle threshold α is 360 ÷ s 1.
Further, the redo angle threshold γ is not calculated and is made equal to the undo angle threshold α. Or the redo angle threshold gamma is determined according to the total continuous revocation steps s2 and by combining the upper limit value and the lower limit value; the total number of consecutive revocation steps s2 refers to the total number of steps of consecutive revocation operations that the electronic device has recently performed; if 360 ÷ s2 is smaller than the lower limit value, the redo angle threshold γ takes the lower limit value; if 360 ÷ s2 is greater than the upper limit value, the redo angle threshold γ takes the upper limit value; if 360 ÷ s2 is between the lower limit value and the upper limit value, then the redo angle threshold γ is 360 ÷ s 2.
Further, if the sliding operation is a multi-finger sliding operation, in step S30, the starting point a represents an initial contact position between the earliest touch subject sliding on the touch screen and the touch screen among the touch subjects of the multi-finger sliding operation; the current contact point B represents a current contact position of the touch subject sliding on the touch screen at the earliest time among the plurality of touch subjects of the multi-finger sliding operation and the touch screen. In step S40, the newly determined starting point a represents a contact position of the earliest touch object sliding on the touch screen among the touch objects in the multi-finger sliding operation with the touch screen at a time of | β | ═ α or a time of | β | ═ γ. In the step S50, the fact that the touch subject of the sliding operation leaves the touch screen means that all touch subjects of the multi-finger sliding operation leave the touch screen.
Further, the sliding direction of the sliding operation is calculated according to a vector formula, where s is (x 1-x 0) × (y 2-y 0) - (x 2-x 0) × (y 1-y 0); if s > 0 indicates that the sliding operation is in a counterclockwise direction; if s < 0 indicates that the sliding operation is clockwise.
Further, in the step S40, after each determination of the starting point a, if | β | monotonically increases with time, indicating that the sliding direction of the sliding operation does not change during this time, there is only one sliding direction; if the | beta | contains turning points which increase and then decrease along with the time, the sliding direction is changed in the middle of the sliding operation in the period of time, the number of the turning points is the number of times of changing the sliding direction by the sliding operation, and the sliding direction is more than or equal to two. This means that the present application allows the operation gesture to change direction halfway, and the direction can be changed arbitrarily one or more times; different directions correspond to performing different operations after certain conditions are met.
Preferably, the sliding track of the sliding operation is substantially a circular arc or a circle.
Further, in the step S40, when the electronic device performs a cancel operation, a circular or circular shape is displayed on a touch screen of the electronic device, and the circular or circular shape is divided into S1 sectors or circular arc edges of the sectors; when the electronic device performs the undo operation, the circle displayed on the touch screen is reduced by one sector, or the circular ring displayed on the touch screen is reduced by one circular arc edge. In the step S40, when the electronic device performs the redo operation, a circular or circular shape is displayed on the touch screen of the electronic device, and the circular shape is divided into S1 or S2 fan-shaped or fan-shaped arc edges; when the electronic device performs the redo operation, a sector is added to the circle displayed on the touch screen, or a sector arc edge is added to the circular ring shape displayed on the touch screen.
Corresponding to the gesture operation method for realizing undo and redo, the application also provides a gesture operation device for realizing undo and redo, which comprises an activation unit, a timing unit, a calculation unit, an undo and redo unit and a deactivation unit. The activation unit is used for entering a state of canceling redo activation when detecting that the touch screen of the electronic equipment is pressed by multiple fingers. The timing unit is used for starting timing of a third time threshold when all the touch main bodies of the multi-finger pressing operation leave the touch screen; and if the timing unit detects that the touch screen has the sliding operation within the timing period of the third time threshold, canceling the timing of the third time threshold. The calculation unit is used for determining a point pressed by the multi-finger pressing operation on the touch screen at last as a zero point O, determining an initial position of the sliding operation on the touch screen as a starting point A, recording a current contact point of the sliding operation on the touch screen as B, and calculating a undo angle threshold alpha, a redo angle threshold gamma, a sliding direction of the sliding operation and an angle beta of an angle AOB in real time when the timing unit detects that the sliding operation is performed on the touch screen within the timing period of a third time threshold. The undo and redo unit is used for determining to undo or redo the operation according to the fact that the sliding direction of the sliding operation is anticlockwise or clockwise; after each determination of the starting point A, when a certain sliding direction of the sliding operation corresponds to an undo operation, once | β | is increased to be equal to α during the progress of the sliding direction, the undo unit performs an undo operation, and at the same time, the contact point of the sliding operation on the touch screen at the time when | β | ═ α is determined as the starting point A again and is recalculated by the calculating unit; when a certain sliding direction of the sliding operation corresponds to the redo operation, once | β | is increased to be equal to γ during the sliding direction, the undo unit performs one redo operation, and at the same time, the contact point of the sliding operation on the touch screen at the moment of | β | ═ γ is determined as the starting point a again and is recalculated by the calculating unit. The deactivation unit is used for exiting the redo activation cancellation state when the touch main body of the sliding operation is detected to leave the touch screen.
The method has the technical effect that one or more continuous undo or redo operations are realized by adopting the operation gesture of sliding arc or circle (approximate). The operation gesture is convenient and fast, operation time is saved, the operation process is simplified, redo can be continuously undone for multiple times in one process, and the change process of the whole undo redo can be observed.
Drawings
Fig. 1 is a schematic flowchart of a gesture operation method for implementing undo redo proposed in the present application.
Fig. 2 is a schematic diagram of a specific example of step S10.
Fig. 3 and 4 are schematic diagrams of one specific example of step S40.
Fig. 5 is a schematic structural diagram of a gesture operation device for implementing undo redo proposed by the present application.
The reference numbers in the figures illustrate that: 10 is an activation unit, 20 is a timing unit, 30 is a calculation unit, 40 is a undo unit, 50 is a deactivation unit.
Detailed Description
Referring to fig. 1, the gesture operation method for implementing undo redo provided by the present application includes the following steps.
Step S10: when the electronic equipment with the touch screen detects that the multi-finger pressing operation is carried out on the touch screen, the electronic equipment enters a redo activation canceling state. Otherwise, the electronic device does not enter the undo redo activation state.
The multi-finger pressing operation refers to an operation gesture that the electronic device detects that d touch subjects press the touch screen, d is a positive integer greater than or equal to 2, time difference values of the d touch subjects starting to press the touch screen are all smaller than a first time threshold, moving distances of the d touch subjects on the touch screen are all smaller than a first distance threshold, and pressing times of the d touch subjects on the touch screen are all smaller than a second time threshold (that is, time of each touch subject from pressing to leaving the touch screen is within a second time threshold). Such as a user's finger, a stylus pen (stylus pen), etc. The first time threshold is, for example, 20 milliseconds. The less than first time threshold may instead be less than or equal to the first time threshold. The first time threshold is used to distinguish between single-finger operations and multi-finger operations. The first distance threshold is for example 8 pixels. The less than first distance threshold may instead be less than or equal to the first distance threshold. The first distance threshold is used to distinguish between a pressing operation and a sliding operation. The second time threshold is, for example, 300 milliseconds. The less than second time threshold may instead be less than or equal to the second time threshold. The second time threshold is used for distinguishing a long press operation from a short press operation.
Preferably, when the electronic device enters the undo redo activation state, other non-undo redo operation gestures are shielded only in response to the undo redo operation gesture. The operation gesture for canceling redo is a slide operation described in step S20.
Step S20: and starting timing of a third time threshold when the electronic equipment with the touch screen detects that all touch main bodies of the multi-finger pressing operation leave the touch screen. The third time threshold is, for example, 1000 milliseconds. And the timing of the third time threshold is calculated by the time when the last touch main body leaving the touch screen leaves the touch screen in the d touch main bodies of the multi-finger pressing operation.
If the electronic device with the touch screen detects that the touch screen has the sliding operation within the timing period of the third time threshold, the timing of the third time threshold is cancelled, and the process proceeds to step S30.
And if the electronic equipment with the touch screen does not detect that the sliding operation is performed on the touch screen within the timing period of the third time threshold, the electronic equipment exits the undo redo activation state.
The sliding operation includes a multi-finger sliding operation. The multi-finger sliding operation refers to an operation gesture that the electronic device detects that e touch main bodies press on the touch screen, e is a positive integer greater than or equal to 2, the pressing time difference values of the e touch main bodies are smaller than a first time threshold, and the moving distance of any one touch main body on the touch screen is larger than a first distance threshold under the condition that the e touch main bodies are not separated from the touch screen. The less than first time threshold may instead be less than or equal to the first time threshold. The greater than first distance threshold may instead be greater than or equal to the first distance threshold, but the equal to first distance threshold may be assigned to only one of the pressing operation or the sliding operation.
Step S30: the electronic equipment with the touch screen records the last contact point of the multi-finger pressing operation on the touch screen as a zero point O (capital English letter Europe) and coordinates of the zero point O (x 0 and y 0); determining the initial position of the sliding operation on the touch screen as an initial point A, wherein the coordinates are (x1, y 1); and recording the current contact point of the sliding operation on the touch screen as B, and the coordinates are (x2, y 2). The electronic equipment also calculates a undo angle threshold value alpha, a redo angle threshold value gamma and the sliding direction of the sliding operation in real time, and also calculates an angle beta of the AOB in real time through the cosine law.
As an example, the revocation angle threshold α is determined, for example, from the total number of previous operation steps s1 in combination with the upper and lower limit values. The total previous operation step number s1 is the total number of steps from the start of the operation of the electronic device, or the last time the undo operation is completed, or the last redo operation is completed, to the operation performed by the electronic device. If 360 ÷ s1 is less than the lower limit value, then the lower limit value is taken by the undo angle threshold α. The lower limit value is, for example, 5 degrees. If 360 ÷ s1 is greater than the upper limit value, the revocation angle threshold α takes the upper limit value. The upper limit value is, for example, 30 degrees. If 360 ÷ s1 is between the lower and upper limit values, the revocation angle threshold α is 360 ÷ s 1.
As an example, the redo angle threshold γ is not calculated, let redo angle threshold γ be equal to undo angle threshold α.
As another example, the redo angle threshold γ is determined, for example, based on the total number of consecutive revocation steps s2 in combination with the upper and lower limit values. The total number of consecutive revocation steps s2 refers to the total number of steps of consecutive revocation operations that the electronic device has recently performed. If 360 ÷ s2 is less than the lower limit, then the redo angle threshold γ takes the lower limit. The lower limit value is, for example, 5 degrees. If 360 ÷ s2 is greater than the upper limit value, then the redo angle threshold γ takes the upper limit value. The upper limit value is, for example, 30 degrees. If 360/s 2 is between the lower and upper limits, the redo angle threshold γ is 360/s 2.
The zero point O represents a position where the last touch subject out of the plurality of touch subjects pressed by the multi-finger leaves the touch screen. If the sliding operation is a multi-finger sliding operation, the starting point A represents the initial contact position of the touch main body which slides on the touch screen at the earliest time and the touch screen in a plurality of touch main bodies of the multi-finger sliding operation; the current contact point B represents a current contact position between the touch subject that slides on the touch screen at the earliest time and the touch screen among the plurality of touch subjects in the multi-finger sliding operation.
The sliding direction of the sliding operation is calculated, for example, according to a vector formula, where s is (x 1-x 0) × (y 2-y 0) - (x 2-x 0) × (y 1-y 0). If s > 0 indicates that the sliding operation is in a counterclockwise direction; if s < 0 indicates that the sliding operation is clockwise.
Step S40: and the electronic equipment with the touch screen determines to cancel or redo the operation according to the anticlockwise or clockwise sliding direction of the sliding operation. For example, a counter-clockwise direction corresponds to an undo operation and a clockwise direction corresponds to a redo operation; or the correspondence relationship becomes opposite.
After each determination of the starting point a, the sliding direction of the sliding operation may be one, or may be any combination of two sliding directions (counterclockwise and clockwise). When a certain sliding direction of the sliding operation corresponds to an undo operation, the electronic device performs an undo operation once | β | increases to equal α during the sliding direction, where | represents taking an absolute value. Meanwhile, the electronic device re-determines the contact point of the sliding operation on the touch screen at the moment of | β | ═ α as the starting point a, and returns to step S30. When a certain sliding direction of the sliding operation corresponds to a redo operation, the electronic apparatus performs a redo operation once | β | increases to equal γ during the sliding direction progress. Meanwhile, the electronic device determines the contact point of the sliding operation on the touch screen as the starting point a again when the | β | ═ γ is reached, and the process returns to step 30.
This step is specifically divided into two cases. The first case is that after each determination of the starting point a, | β | monotonically increases with time (monicalory increasing), indicating that the sliding direction of the sliding operation does not change during this time, and there is only one sliding direction. The second situation is that after each determination of the starting point a, | β | contains turning points that increase and decrease with time, indicating that the sliding operation changes the sliding direction midway in this period, the number of turning points is the number of times the sliding operation changes the sliding direction, and the sliding direction is greater than or equal to two.
If the sliding operation is a multi-finger sliding operation, the re-determined starting point a represents a contact position of the earliest touch subject sliding on the touch screen among the plurality of touch subjects of the multi-finger sliding operation with the touch screen at a time when | β | ═ α (in the case of performing an undo operation) or a time when | β | ═ γ (in the case of performing a redo operation).
Ideally, the sliding track of the sliding operation in the present application is substantially a circular arc or a circle, and the absolute value | β | of the angle β may be less than, equal to, or greater than 360 degrees.
For example, the sliding operation is always counterclockwise, the counterclockwise direction corresponds to a revocation operation, k × α ≦ β | < (k + 1) × α, and the electronic device performs the revocation operation once every time | β | ≦ α is detected while newly determining the start point a. The electronic device performs a total of k undo operations. The value range of k is a positive integer.
For another example, the sliding operation is always clockwise, the clockwise direction corresponds to a redo operation, p × γ ≦ β ≦ p +1 × γ, and the electronic device performs the redo operation once every time | β ≦ γ is detected, and at the same time, the start point a is determined again. The electronic device performs a total of p redo operations. The range of p is a positive integer.
For another example, if the sliding operation is performed in the first counterclockwise direction and then in the second clockwise direction, the counterclockwise direction corresponds to the undo operation, and the clockwise direction corresponds to the redo operation, the electronic device performs the undo operation once every time | β | ═ α is detected in the interval where the sliding operation is in the counterclockwise direction, and at the same time, the starting point a is determined again. In the interval in which the sliding operation is in the clockwise direction, the electronic equipment executes the redo operation once when the | beta | ═ gamma is detected, and simultaneously determines the starting point A again.
Preferably, in step S40, when the electronic device performs a cancel operation, a circular or circular shape is displayed on a touch screen of the electronic device, and the circular or circular shape is divided into S1 sectors or circular arc edges of the sectors. When the electronic device performs the undo operation, the circle displayed on the touch screen is reduced by one sector, or the circular ring displayed on the touch screen is reduced by one circular arc edge. The reduction is displayed by means of, for example, a change in shape, a change in color, or the like.
Preferably, in step S40, when the electronic device performs the redo operation, a circular or circular shape is displayed on the touch screen of the electronic device, and the circular or circular shape is divided into S1 (when the redo angle threshold γ is equal to the undo angle threshold α) or S2 (when the redo angle threshold γ is calculated) sectors or circular arc edges of the sectors. When the electronic device performs the redo operation once, a sector is added to the circle displayed on the touch screen, or a sector arc edge is added to the circular ring displayed on the touch screen. The additions are displayed, for example, by means of shape changes, color changes, etc.
Step S50: and when the electronic equipment with the touch screen detects that the touch main body of the sliding operation leaves the touch screen, the electronic equipment exits the redo activation canceling state. If the sliding operation is multi-finger sliding operation, the triggering condition of the step means that all touch main bodies of the multi-finger sliding operation leave the touch screen.
Referring to fig. 2, this is a specific example of the step S10. When the electronic device detects that the touch screen has a double-finger pressing operation (pressing and lifting), the electronic device enters a redo activation canceling state, and a circular icon comprising an arrow from bottom to left is displayed on the touch screen.
Please refer to fig. 3 and fig. 4, which is a specific example of the step S40. For example, a counterclockwise swipe corresponds to an undo operation and a clockwise swipe corresponds to a redo operation. Referring to fig. 3, when the two-finger sliding operation is a counterclockwise sliding around the zero point O, the electronic device performs an undo operation. The circular icon on the touch screen includes arrows from bottom to left indicating the undo operation, and the circular icon is divided into 10 sectors, for example, to indicate the total number of times that consecutive undo operations can be performed, and the angle of each sector is 36 degrees. The circular icon is originally dark in color, and has a fan shape changed to light every time an undo operation is performed, and indicates the number of times that consecutive undo operations have been performed (light areas) and the remaining number of times that consecutive undo operations can be performed (dark areas) by color change. Referring to fig. 4, when the two-finger sliding operation is counterclockwise sliding around the zero point O, the electronic device performs a redo operation. The circular icon on the touch screen includes arrows from bottom to right indicating redo operations, and the circular icon is divided into 10 sectors, for example, to indicate the total number of times that consecutive undo operations can be performed, and the angle of each sector is 36 degrees. The original part of the circular icon is light color, which represents the times of continuous redo operation; the remaining part is dark, indicating the remaining number of times a continuous undo operation can be performed. The circular icon has a light sector changed to a dark color each time a redo operation is performed, and indicates by color change the number of times that successive redo operations have been performed (the area changed from light to dark color) and the remaining number of times that successive redo operations can be performed (the remaining light area). The sliding gesture of the user can be randomly changed in the counterclockwise direction or the clockwise direction on the premise of not leaving the touch screen, and the electronic equipment correspondingly executes undo or redo operation; the arrow pointing direction in the circular icon, and the dark and light area distribution in the circular icon will change, clearly informing the user which stage in the undo redo process the user is currently at.
Referring to fig. 5, the gesture operation apparatus for implementing undo and redo provided by the present application includes an activation unit 10, a timing unit 20, a calculation unit 30, an undo and redo unit 40, and a deactivation unit 50.
The activation unit 10 is configured to enter a redo activation cancellation state when detecting that a multi-finger press operation is performed on a touch screen of the electronic device.
The timing unit 20 is configured to start timing of a third time threshold when all touch subjects of the multi-finger pressing operation leave the touch screen. If the timing unit 20 detects that there is a sliding operation on the touch screen within the timing period of the third time threshold, the timing of the third time threshold is cancelled.
The calculating unit 30 is configured to, when the timing unit 20 detects that there is a sliding operation on the touch screen within the timing period of the third time threshold, determine a point, which is pressed last on the touch screen by the multi-finger pressing operation, as a zero point O (capital english letter ohm), determine an initial position of the sliding operation on the touch screen as a starting point a, and record a current contact point of the sliding operation on the touch screen as B, and further calculate a undo angle threshold α, a redo angle threshold γ, a sliding direction of the sliding operation, and an angle β of the angle AOB in real time.
The undo/redo unit 40 is configured to perform an undo/redo operation according to a counterclockwise or clockwise decision of the sliding direction of the sliding operation. After each determination of the starting point a, when a certain sliding direction of the sliding operation corresponds to an undo operation, the undo redo unit 40 performs an undo operation once | β | is increased to equal to α during the progress of the sliding direction, and at the same time, determines the contact point of the sliding operation on the touch screen at the time of | β | α as the starting point a again, and recalculates it by the calculation unit 30. When a certain sliding direction of the sliding operation corresponds to a redo operation, once | β | is increased to be equal to γ during the sliding direction is performed, the undo redo unit 40 performs a redo operation while the contact point of the sliding operation on the touch screen at the time when | β |, is determined as the start point a again and is recalculated by the calculation unit 30.
The deactivation unit 50 is configured to exit from the redo activation cancellation state when it is detected that the touch main body of the sliding operation leaves the touch screen. The deactivation unit 50 is further configured to exit from the redo activation deactivated state when the timing unit 20 does not detect a sliding operation on the touch screen within the timing period of the third time threshold.
Compared with the prior art, the application has the following technical effects.
First, after the undo and redo function is triggered, one or more times of continuous undo and redo are rapidly executed by sliding a section of arc or circle on the touch screen. In the process, the operation gesture is a continuous action, the operation can be stopped at any time, continued at any time and switched between undo and redo at any time, the whole operation process is quick and continuous, and the change process of the whole undo and redo can be observed.
Secondly, the batch and continuous redo canceling function can be quickly realized through the operation gesture. Compared with the method for clicking the fixed button, the technical scheme obviously saves the operation time, is convenient and quick to operate the gesture, simplifies the operation flow, and can enable the original intermittent operation to become consistent and quick.
The above are merely preferred embodiments of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (12)

1. A gesture operation method for realizing undo redo is characterized by comprising the following steps;
step S10: when the electronic equipment detects that the multi-finger pressing operation exists on the touch screen, the electronic equipment enters a redo activation canceling state;
step S20: when the electronic equipment detects that all the touch main bodies of the multi-finger pressing operation leave the touch screen, starting timing of a third time threshold; if the electronic device detects that the touch screen has a sliding operation within the timing period of the third time threshold, canceling the timing of the third time threshold, and entering step S30; otherwise, the electronic equipment exits the undo redo activation state;
step S30: the electronic equipment records the last contact point of the multi-finger pressing operation on the touch screen as a zero point O, determines the initial position of the sliding operation on the touch screen as a starting point A, records the current contact point of the sliding operation on the touch screen as a B, and calculates a undo angle threshold value alpha, a redo angle threshold value gamma, the sliding direction of the sliding operation and an angle beta of an angle AOB in real time; the withdrawal angle threshold alpha is determined according to the total previous operation step number s1 and by combining the upper limit value and the lower limit value; the redo angle threshold gamma is equal to the undo angle threshold alpha, or the redo angle threshold gamma is determined according to the total continuous undo steps s2 in combination with the upper limit value and the lower limit value;
step S40: the electronic equipment determines to cancel or redo the operation according to the fact that the sliding direction of the sliding operation is anticlockwise or clockwise; after determining the starting point a each time, when a certain sliding direction of the sliding operation corresponds to an undo operation, the electronic device performs an undo operation once | β | is increased to be equal to α during the progress of the sliding direction, and simultaneously re-determines the contact point of the sliding operation on the touch screen as the starting point a at the moment of | β | ═ α, and returns to step S30 for re-calculation; when a certain sliding direction of the sliding operation corresponds to a redo operation, once | β | is increased to be equal to γ during the sliding direction, the electronic device performs a redo operation while the contact point of the sliding operation on the touch screen at the moment of | β | ═ γ is determined as the starting point a again, and returns to step S30 for recalculation;
step S50: and when the electronic equipment detects that the touch main body of the sliding operation leaves the touch screen, the electronic equipment exits the undo redo activation state.
2. The gesture operation method for achieving undo and redo of claim 1, wherein the multi-finger press operation is an operation gesture in which the electronic device detects that d touch subjects press on the touch screen, d is a positive integer greater than or equal to 2, and the time difference value of the d touch subjects starting to press the touch screen is smaller than a first time threshold, and the moving distances of the d touch subjects on the touch screen are smaller than a first distance threshold, and the press times of the d touch subjects on the touch screen are smaller than a second time threshold.
3. The gesture operation method for achieving undo redo as claimed in claim 1, wherein when the electronic device enters an undo redo activation state, only the operation gesture of undo is responded to, and other operation gestures that are not undo are masked.
4. The method of claim 1, wherein the sliding operation comprises a multi-finger sliding operation; the multi-finger sliding operation refers to an operation gesture that the electronic device detects that e touch main bodies press on the touch screen, e is a positive integer greater than or equal to 2, the pressing time difference values of the e touch main bodies are smaller than a first time threshold, and the moving distance of any one touch main body on the touch screen is larger than a first distance threshold under the condition that the e touch main bodies are not separated from the touch screen.
5. The gesture operation method for realizing undo redo of claim 1, wherein the total previous operation steps s1 is the total steps from the beginning of the operation of the electronic device, the last operation executed after the completion of the undo operation or the last redo operation to the operation executed by the current electronic device; if 360 ÷ s1 is less than the lower limit value, the lower limit value is withdrawn from the angle threshold value α; if 360 ÷ s1 is greater than the upper limit value, the revocation angle threshold α takes the upper limit value; if 360 ÷ s1 is between the lower and upper limit values, the revocation angle threshold α is 360 ÷ s 1.
6. The gesture operation method for achieving undo and redo of claim 5, wherein the total number of consecutive undo steps s2 is the total number of steps of the most recently performed consecutive undo operations of the electronic device; if 360 ÷ s2 is smaller than the lower limit value, the redo angle threshold γ takes the lower limit value; if 360 ÷ s2 is greater than the upper limit value, the redo angle threshold γ takes the upper limit value; if 360 ÷ s2 is between the lower limit value and the upper limit value, then the redo angle threshold γ is 360 ÷ s 2.
7. The method according to claim 4, wherein if the sliding operation is a multi-finger sliding operation, in step S30, the starting point A represents an initial contact position between the earliest touch subject sliding on the touch screen and the touch screen among the touch subjects of the multi-finger sliding operation; the current contact point B represents the current contact position of the touch control main body sliding on the touch control screen and the touch control screen at the earliest time in a plurality of touch control main bodies of the multi-finger sliding operation;
in step S40, the newly determined starting point a represents a contact position of the earliest touch object sliding on the touch screen among the multiple touch objects in the multi-finger sliding operation with the touch screen at a time of | β | ═ α or a time of | β | ═ γ;
in the step S50, the fact that the touch subject of the sliding operation leaves the touch screen means that all the touch subjects of the multi-finger sliding operation leave the touch screen.
8. The method for gesture operation with undo redo activation of claim 1 wherein the sliding direction of the sliding operation is calculated according to the vector formula, s ═ x 1-x 0 x (y 2-y 0) - (x 2-x 0) x (y 1-y 0); if s > 0 indicates that the sliding operation is in a counterclockwise direction; if s < 0 indicates that the sliding operation is clockwise; where (x 0, y0) is the coordinate of zero point O, (x1, y 1) is the coordinate of start point a, and (x2, y 2) is the coordinate of current contact point B.
9. The method for performing gesture operations of undo task according to claim 1, wherein in step S40, after each determination of the starting point a, if | β | monotonically increases with time, indicating that the sliding direction of the sliding operation has not changed during this period, there is only one sliding direction; if the | beta | contains turning points which increase and decrease along with the time, the sliding direction is changed in the middle of the sliding operation in the period of time, the number of the turning points is the number of times of changing the sliding direction by the sliding operation, and the sliding direction is more than or equal to two.
10. The gesture operation method for realizing undo redo of claim 1, wherein the sliding track of the sliding operation is substantially a circular arc or a circle.
11. The method for implementing undo and redo gesture operation of claim 6, wherein in step S40, when the electronic device performs undo operation, a circle or circular ring shape is displayed on the touch screen of the electronic device, and the circle or circular ring shape is divided into S1 circular arc edges in a sector or a fan shape; when the electronic device executes the cancel operation once, the circle displayed on the touch screen is reduced by one sector, or the circular ring shape displayed on the touch screen is reduced by one sector arc edge;
in step S40, when the electronic device performs the redo operation, displaying a circular or circular shape on the touch screen of the electronic device, equally dividing the redo angle threshold γ into S1 fan-shaped or fan-shaped arc edges if the redo angle threshold γ is equal to the undo angle threshold α, and equally dividing the redo angle threshold γ into S2 fan-shaped or fan-shaped arc edges if the redo angle threshold γ is determined according to the total number of consecutive undo steps S2 in combination with the upper limit value and the lower limit value; when the electronic device performs the redo operation, a sector is added to the circle displayed on the touch screen, or a sector arc edge is added to the circular ring shape displayed on the touch screen.
12. A gesture operation device for realizing undo and redo is characterized by comprising an activation unit, a timing unit, a calculation unit, an undo and redo unit and a deactivation unit;
the activation unit is used for entering a redo activation canceling state when multi-finger pressing operation on a touch screen of the electronic equipment is detected;
the timing unit is used for starting timing of a third time threshold when all the touch main bodies of the multi-finger pressing operation leave the touch screen; if the timing unit detects that the touch screen has the sliding operation within the timing period of the third time threshold, timing of the third time threshold is cancelled;
the calculation unit is used for determining a point pressed by the multi-finger pressing operation on the touch screen at last as a zero point O, determining an initial position of the sliding operation on the touch screen as a starting point A, recording a current contact point of the sliding operation on the touch screen as a point B, and calculating a undo angle threshold alpha, a redo angle threshold gamma, a sliding direction of the sliding operation and an angle beta of an angle AOB in real time when the timing unit detects that the sliding operation is performed on the touch screen within the timing period of a third time threshold; the withdrawal angle threshold alpha is determined according to the total previous operation steps s1 and by combining the upper limit value and the lower limit value; the redo angle threshold gamma is equal to the undo angle threshold alpha, or the redo angle threshold gamma is determined according to the total continuous undo steps s2 in combination with the upper limit value and the lower limit value;
the undo and redo unit is used for determining to undo or redo the operation according to the fact that the sliding direction of the sliding operation is anticlockwise or clockwise; after determining the starting point A each time, when a certain sliding direction of the sliding operation corresponds to an undo operation, once | β | is increased to be equal to α during the progress of the sliding direction, the undo redo unit performs an undo operation while re-determining a contact point of the sliding operation on the touch screen at a time when | β |, α, as the starting point A, and re-calculating by the calculation unit; when a certain sliding direction of the sliding operation corresponds to a redo operation, once | β | is increased to be equal to γ during the sliding direction, the undo unit performs the redo operation once, and simultaneously determines the contact point of the sliding operation on the touch screen at the moment of | β |, which is equal to γ, as a starting point a again for recalculation by the calculation unit;
the deactivation unit is used for exiting the redo activation cancellation state when the touch main body of the sliding operation is detected to leave the touch screen.
CN202110533007.XA 2021-05-17 2021-05-17 Gesture operation method and device for realizing undo and redo Active CN113110793B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110533007.XA CN113110793B (en) 2021-05-17 2021-05-17 Gesture operation method and device for realizing undo and redo

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110533007.XA CN113110793B (en) 2021-05-17 2021-05-17 Gesture operation method and device for realizing undo and redo

Publications (2)

Publication Number Publication Date
CN113110793A CN113110793A (en) 2021-07-13
CN113110793B true CN113110793B (en) 2022-07-15

Family

ID=76722331

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110533007.XA Active CN113110793B (en) 2021-05-17 2021-05-17 Gesture operation method and device for realizing undo and redo

Country Status (1)

Country Link
CN (1) CN113110793B (en)

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070177804A1 (en) * 2006-01-30 2007-08-02 Apple Computer, Inc. Multi-touch gesture dictionary
US7030861B1 (en) * 2001-02-10 2006-04-18 Wayne Carl Westerman System and method for packing multi-touch gestures onto a hand
US20100313158A1 (en) * 2009-06-08 2010-12-09 Lg Electronics Inc. Method for editing data in mobile terminal and mobile terminal using the same
CN103116466A (en) * 2013-03-04 2013-05-22 珠海金山办公软件有限公司 Touch screen device and method and system used for carrying out withdrawing operation or restoring operation in touch screen device
WO2015037767A1 (en) * 2013-09-16 2015-03-19 Lg Electronics Inc. Image display apparatus and method for operating the same
CN103616994A (en) * 2013-12-09 2014-03-05 珠海金山办公软件有限公司 Method and device for controlling electronic device
US10229518B2 (en) * 2017-04-10 2019-03-12 Prysm, Inc. Drag to undo/redo a digital ink canvas using a visible history palette
WO2018222247A1 (en) * 2017-06-02 2018-12-06 Apple Inc. Device, method, and graphical user interface for annotating content
US11822780B2 (en) * 2019-04-15 2023-11-21 Apple Inc. Devices, methods, and systems for performing content manipulation operations

Also Published As

Publication number Publication date
CN113110793A (en) 2021-07-13

Similar Documents

Publication Publication Date Title
US10444989B2 (en) Information processing apparatus, and input control method and program of information processing apparatus
EP2476046B1 (en) Touch input transitions
US9041660B2 (en) Soft keyboard control
US8261211B2 (en) Monitoring pointer trajectory and modifying display interface
CN106909305B (en) Method and apparatus for displaying graphical user interface
JP6350261B2 (en) Object operation system, object operation control program, and object operation control method
EP3037927B1 (en) Information processing apparatus and information processing method
US20140078063A1 (en) Gesture-initiated keyboard functions
US8081170B2 (en) Object-selecting method using a touchpad of an electronic apparatus
US10620758B2 (en) Glove touch detection
CN113110793B (en) Gesture operation method and device for realizing undo and redo
CN113157185B (en) Gesture operation method and device for undo redo
TWI405104B (en) Method of turning over three-dimensional graphic object by use of touch sensitive input device
US20150062047A1 (en) Information processor, control method and program
CN104679312A (en) Electronic device as well as touch system and touch method of electronic device
CN113110792B (en) Gesture operation method and device for realizing copy and paste
CN115878010A (en) Operation interaction method and device, electronic equipment and computer-readable storage 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
GR01 Patent grant
GR01 Patent grant