CN113157185A - Gesture operation method and device for undo redo - Google Patents

Gesture operation method and device for undo redo Download PDF

Info

Publication number
CN113157185A
CN113157185A CN202110533106.8A CN202110533106A CN113157185A CN 113157185 A CN113157185 A CN 113157185A CN 202110533106 A CN202110533106 A CN 202110533106A CN 113157185 A CN113157185 A CN 113157185A
Authority
CN
China
Prior art keywords
redo
sliding
touch screen
undo
sliding operation
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.)
Granted
Application number
CN202110533106.8A
Other languages
Chinese (zh)
Other versions
CN113157185B (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 CN202110533106.8A priority Critical patent/CN113157185B/en
Publication of CN113157185A publication Critical patent/CN113157185A/en
Application granted granted Critical
Publication of CN113157185B publication Critical patent/CN113157185B/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/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
    • 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

Abstract

The application discloses a gesture operation method for undo redo. And 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. The electronic equipment calculates the values of a undo angle threshold alpha, a redo angle threshold gamma, the sliding direction of the sliding operation and x 2-x 1 in real time. After determining the starting point A each time, once | x 2-x 1| is increased to be equal to alpha or gamma during the process of a certain sliding direction, the electronic device performs one undo or redo, and simultaneously, the contact point of the sliding operation on the touch screen at the moment of | x 2-x 1|, alpha or gamma is determined as the starting point A again for recalculation. 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 sliding one section of straight line segment on the touch screen, so that the operation is simple, convenient and smooth.

Description

Gesture operation method and device for undo 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 with 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, and an application (app) corresponding to the icon is opened. 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 is changed to a state after the x-2-th step is completed. The cancellation operation can be continuously performed, if the step x +1 or the cancellation operation is performed, the operation of the step x-2 is cancelled, and the electronic device is changed into a 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 is changed to 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 above technical problem, the present application provides a gesture operation method for undo redo (embodiment one), including 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: 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 determines the initial position of the sliding operation on the touch screen as an initial point A, and the abscissa is marked as x 1; recording the current contact point of the sliding operation on the touch screen as B, and recording the abscissa as x 2; and calculating the values of the undo distance threshold alpha, the redo distance threshold gamma, the sliding direction of the sliding operation and x 2-x 1 in real time. Step S40: the electronic equipment determines to cancel or redo the operation according to the sliding direction of the sliding operation to the left or the right; after determining the starting point a each time, when a certain sliding direction of the sliding operation corresponds to the undo operation, once | x 2-x 1| is increased to be equal to α during the progress of the sliding direction, the electronic device performs the undo operation once, and simultaneously re-determines the contact point of the sliding operation on the touch screen as the starting point a at the moment | x 2-x 1|, and returns to step S30 for re-calculation; when a certain sliding direction of the sliding operation corresponds to the redo operation, once | x 2-x 1| is increased to be equal to γ during the sliding direction, the electronic device performs one redo operation, and simultaneously, the contact point of the sliding operation on the touch screen is determined as the starting point a again when | x 2-x 1|, γ, and the step returns to the step S30 for recalculation. Step S50: and when the electronic equipment detects that the touch main body of the sliding operation on the touch screen leaves the touch screen, the electronic equipment exits the redo activation canceling state. In the first embodiment of the method, one or more continuous undo or redo operations are rapidly performed by sliding one section of transverse or oblique straight line segment 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.
Preferably, 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 previous total operation step number s1 is the total step number of the operation executed by the electronic device from the beginning of the operation of the electronic device, or the last time of the undo operation or the last time of the redo operation to the current time; 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 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. In step S40, the newly determined starting point a represents a contact position of the earliest touch subject sliding on the touch screen among the touch subjects in the multi-finger sliding operation with the touch screen at a time of | x 2-x 1| ═ α or a time of | x 2-x 1| ═ γ. 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, in the step S30, the sliding direction of the sliding operation is determined according to x 2-x 1 calculation; if x 2-x 1 > 0 indicates that the sliding operation is to the right, including the case with a component to the right; if x 2-x 1 < 0 indicates that the sliding operation is to the left, including the case with a component to the left.
Further, in the step S40, after each determination of the starting point a, if | x 2-x 1| 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 | x 2-x 1| contains turning points which increase and then decrease with time, indicating that the sliding operation changes the sliding direction midway in the 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 indicates that the present application allows the operation gesture to change direction halfway, and can change direction arbitrarily one or more times; different directions correspond to performing different operations after certain conditions are met.
Preferably, in the step S30 and the step S40, the sliding trajectory of the sliding operation is substantially a transverse straight line segment. In practice, the sliding trajectory of the sliding operation is also feasible if it is a diagonal straight line segment.
Further, in step S40, when the electronic device performs the undo operation, a circle or a circular ring is displayed on the touch screen of the electronic device, and the circle or the circular ring is divided into 360 ÷ S1 sectors or sector-shaped circular arc edges; 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 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 360 ÷ S1 circular or 360 ÷ S2 circular arc edges in a sector or sector shape; 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.
Optionally, the step S30 is changed to a step S35, and the step S40 is changed to a step S45, which is a second embodiment of the gesture operation method for undo redo proposed by the present application. Step S35: the electronic equipment determines the initial position of the sliding operation on the touch screen as an initial point A, and the ordinate is marked as y 1; recording the current contact point of the sliding operation on the touch screen as B, and recording the ordinate as y 2; the undo distance threshold α, the redo distance threshold γ, the swipe direction of the swipe operation, and the values of y 2-y 1 are also calculated in real time. Step S45: the electronic equipment determines to cancel or redo the operation according to the upward or downward sliding direction of the sliding operation; after determining the starting point a each time, when a certain sliding direction of the sliding operation corresponds to the undo operation, once | y 2-y 1| increases to be equal to α during the sliding direction, the electronic device performs the undo operation once, and simultaneously re-determines the contact point of the sliding operation on the touch screen as the starting point a at the moment of | y 2-y 1|, and returns to step S35 for re-calculation; when a certain sliding direction of the sliding operation corresponds to the redo operation, once | y 2-y 1| is increased to be equal to γ during the sliding direction, the electronic device performs one redo operation, and simultaneously, the contact point of the sliding operation on the touch screen is determined as the starting point a again when | y 2-y 1|, γ, and the step returns to the step S35 for recalculation. According to the embodiment of the method, one or more times of continuous undo or redo are quickly executed by sliding one section of vertical or oblique straight line segment on the touch screen, so that the operation is simple, convenient and smooth.
Further, in the step S35, the sliding direction of the sliding operation is computationally determined according to y 2-y 1; if y 2-y 1 > 0 indicates that the sliding operation is upward, including the case with an upward component; if y 2-y 1 < 0 indicates that the sliding operation is down, including the case with a downward component.
Preferably, in the step S35 and the step S45, the sliding trajectory of the sliding operation is substantially a vertical straight line segment. In practice, the sliding trajectory of the sliding operation is also feasible if it is a diagonal straight line segment.
Corresponding to the first embodiment of the gesture operation method for undo redo, the application also provides a gesture operation device for undo redo, which comprises an activation unit, a timing unit, a first calculation unit, a first undo redo unit and a deactivation unit. The activation unit is used for entering a state of canceling redo activation when detecting that the multi-finger pressing operation exists on the touch screen of the electronic equipment. 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 first calculating unit is used for determining the initial position of the sliding operation on the touch screen as an initial point A when the timing unit detects that the sliding operation exists on the touch screen within the timing period of a third time threshold, and the abscissa is marked as x 1; recording the current contact point of the sliding operation on the touch screen as B, and recording the abscissa as x 2; and calculating values of a withdrawal angle threshold value alpha, a redo angle threshold value gamma, the sliding direction of the sliding operation and x 2-x 1 in real time. The undo and redo unit I is used for determining to undo or redo the operation according to the fact that the sliding direction of the sliding operation is leftward or rightward; after determining the starting point A each time, when a certain sliding direction of the sliding operation corresponds to an undo operation, once | x 2-x 1| is increased to be equal to alpha during the sliding direction, the undo unit performs the undo operation once, and simultaneously determines the contact point of the sliding operation on the touch screen at the moment of | x 2-x 1|, as the starting point A again and recalculates the contact point by the calculation unit once; when a certain sliding direction of the sliding operation corresponds to the redo operation, once | x 2-x 1| is increased to be equal to γ during the sliding direction, the redo canceling unit executes the redo operation once, and simultaneously, the computing unit recalculates the contact point of the sliding operation on the touch screen as the starting point a when | x 2-x 1|, is equal to γ. 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.
Optionally, the first computing unit is changed to a second computing unit, and the first undo unit is changed to a second undo unit, which is an embodiment two of the gesture operation device for undoing redo provided by the present application, and corresponds to the embodiment two of the gesture operation method for undoing redo. The second calculating unit is configured to determine, when the timing unit detects that there is a sliding operation on the touch screen within a timing period of a third time threshold, an initial position of the sliding operation on the touch screen as an initial point a, and a vertical coordinate of the initial position is y 1; recording the current contact point of the sliding operation on the touch screen as B, and recording the ordinate as y 2; and calculating values of a withdrawal angle threshold alpha, a redo angle threshold gamma, the sliding direction of the sliding operation and y 2-y 1 in real time. The undo and redo unit II is used for determining to undo or redo the operation according to the upward or downward sliding direction of the sliding operation; after determining the starting point A each time, when a certain sliding direction of the sliding operation corresponds to an undo operation, once | y 2-y 1| is increased to be equal to α during the sliding direction, the undo unit II performs an undo operation, and simultaneously determines the contact point of the sliding operation on the touch screen at the moment of | y 2-y 1|, as the starting point A, and recalculates the contact point by the calculating unit II; when a certain sliding direction of the sliding operation corresponds to the redo operation, once | y 2-y 1| is increased to be equal to γ during the sliding direction, the redo unit II performs the redo operation once, and simultaneously, the computing unit II re-determines the contact point of the sliding operation on the touch screen as the starting point A at the moment of | y 2-y 1|, which is γ, and re-computes the contact point.
The method has the technical effect that one or more continuous undo or redo operations are realized by adopting the operation gesture of the sliding straight line segment (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 flowchart illustrating a first embodiment of a gesture operation method for undo redo according to the present application.
Fig. 2 is a flowchart illustrating a second embodiment of a gesture operation method for undo redo according to the present application.
Fig. 3 is a schematic diagram of one specific example of step S10.
Fig. 4 and 5 are schematic diagrams of one specific example of step S40.
Fig. 6 is a schematic structural diagram of a first embodiment of a gesture operation device for undo redo according to the present application.
Fig. 7 is a schematic structural diagram of a second embodiment of a gesture operation device for undo redo according to the present application.
The reference numbers in the figures illustrate: 10 is an activation unit, 20 is a timing unit, 30 is a calculation unit I, 35 is a calculation unit II, 40 is a undo redo unit I, 45 is an undo redo unit II, and 50 is a deactivation unit 50.
Detailed Description
Referring to fig. 1, an embodiment of a gesture operation method for undo redo according to 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 means 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 (namely, the time from pressing to leaving the touch screen of each touch subject is within the 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, only the undo redo operation gesture is responded, and other non-undo redo operation gestures are shielded. 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 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 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: determining the initial position of the sliding operation on the touch screen as a starting point A by the electronic equipment with the touch screen, and recording the abscissa as x 1; and recording the current contact point of the sliding operation on the touch screen as B and the abscissa as x 2. The electronic device also calculates the undo distance threshold α, the redo distance threshold γ, the sliding direction of the sliding operation, and the values of x 2-x 1 in real time.
As an example, the revocation distance threshold α is determined, for example, based on the screen width w in combination with the upper limit value and the lower limit value of the total number of steps s1 of the previous operation. The unit of the screen width w is, for example, a pixel. The previous total operation step number s1 is the total step number of the operation performed by the electronic device from the beginning of the operation of the electronic device, or the last time the undo operation is completed, or the last of the redo operations is completed. If w/s 1 is less than the lower limit, the distance threshold α is removed from the lower limit. The lower limit value is, for example, 10 pixels. If w/s 1 is greater than the upper limit value, the revocation distance threshold α takes the upper limit value. The upper limit value is, for example, 50 pixels. If w ÷ s1 is between the lower limit value and the upper limit value, the revocation distance threshold α is w ÷ s 1.
As an example, the redo distance threshold γ is not calculated, let redo distance threshold γ be equal to undo distance threshold α.
As another example, the redo distance threshold γ is determined based on the screen width w and the total number of consecutive undo steps s2 in combination with the upper and lower limit values, for example. The unit of the screen width w is, for example, a pixel. 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 w ÷ s2 is less than the lower limit, then the redo distance threshold γ takes the lower limit. The lower limit value is, for example, 10 pixels. If w ÷ s2 is greater than the upper limit value, the redo distance threshold γ takes the upper limit value. The upper limit value is, for example, 50 pixels. If w ÷ s2 is between the lower limit value and the upper limit value, then the redo distance threshold γ is w ÷ s 2.
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 earliest in a plurality of touch main bodies of the multi-finger sliding operation and the touch screen; 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 determined by calculation according to x 2-x 1, for example. If x 2-x 1 > 0 indicates that the sliding operation is to the right (including the case with a component to the right); if x 2-x 1 < 0 indicates that the sliding operation is to the left (including the case with a component to the left).
Step S40: and the electronic equipment with the touch screen determines to cancel or redo the operation leftwards or rightwards according to the sliding direction of the sliding operation. For example, left corresponds to undo operation, right corresponds to 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 (left and right). When a certain sliding direction of the sliding operation corresponds to a cancel operation, the electronic device performs a cancel operation once | x 2-x 1| increases to equal α, where | represents an absolute value, during the progress of the sliding direction. Meanwhile, the electronic device re-determines the contact point of the sliding operation on the touch screen as the starting point a at the moment of | x 2-x 1| ═ α, and then returns to step S30. When a certain sliding direction of the sliding operation corresponds to a redo operation, the electronic device performs a redo operation once | x 2-x 1| increases to equal γ during the progress of the sliding direction. Meanwhile, the electronic device re-determines the contact point of the sliding operation on the touch screen at the moment of | x 2-x 1| ═ γ as the starting point a, and returns to step S30.
This step is specifically divided into two cases. The first case is that after each determination of the start point a, | x 2-x 1| monotonically increases with time (monotonically increasing), indicating that the sliding direction of the sliding operation does not change during this time, and that there is only one sliding direction. The second case is that after each determination of the starting point a, | x 2-x 1| contains turning points that increase and then 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 locus of the sliding operation of the first embodiment is substantially a horizontal straight line segment. The absolute value | x 2-x 1| of x 2-x 1 is less than or equal to the width of a touch screen of the electronic device.
For example, the sliding operation is always to the left, which corresponds to the undo operation, k × α ≦ x 2-x 1| < (k + 1) × α, then the electronic device performs the undo operation once every time | x 2-x 1| < (k + 1) × α) is detected, while the start point a is re-determined. The electronic device performs k undo operations in total. The value range of k is a positive integer.
As another example, the sliding operation is always rightward, which corresponds to a redo operation, p × γ ≦ x 2-x 1| < (p + 1) × γ, and the electronic device performs the redo operation once every time | x 2-x 1| < (p + 1) × γ) is detected, while the start point a is determined anew. The electronic device performs a total of p redo operations. The range of values for p is a positive integer.
As another example, if the sliding operation is performed first to the left and then to the right, the left corresponds to an undo operation, and the right corresponds to a redo operation, the electronic device performs an undo operation every time | x 2-x 1| - α is detected in the interval in which the sliding operation is to the left, and at the same time, the starting point a is determined again. In the interval that the sliding operation is rightward, the electronic equipment executes the redo operation once when detecting | x 2-x 1| gamma, and simultaneously determines the starting point A again.
Preferably, in step S40, when the electronic device performs the undo operation, a circle or a circular ring is displayed on the touch screen of the electronic device, and the circle or the circular ring is divided into 360 ÷ S1 sectors or circular arc edges. 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 ring shape is displayed on the touch screen of the electronic device, and the circular or circular ring shape is divided into 360 ÷ S1 (in the case that the redo angle threshold γ is equal to the undo angle threshold α) or 360 ÷ S2 (in the case that the redo angle threshold γ is calculated) sectors or circular arc edges of the sectors. 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. The additions are displayed, for example, by means of shape changes, color changes, and the like.
Step S50: and when the electronic equipment with the touch screen detects that the touch main body of the sliding operation on the touch screen leaves the touch screen, the electronic equipment exits the redo activation canceling state. If the sliding operation is a multi-finger sliding operation, the triggering condition of the step means that all touch subjects of the multi-finger sliding operation leave the touch screen.
Please refer to fig. 2, which shows a second embodiment of the gesture operation method for undo redo according to the present application. Compared with the first embodiment shown in fig. 1, the second embodiment changes step S30 to step S35, changes step S40 to step S45, and remains unchanged.
Step S35: the electronic equipment with the touch screen determines the initial position of the sliding operation on the touch screen as a starting point A, and the ordinate is recorded as y 1; and recording the current contact point of the sliding operation on the touch screen as B and recording the ordinate as y 2. The electronic device also calculates values of the undo distance threshold α, the redo distance threshold γ, the swipe direction of the swipe operation, and y 2-y 1 in real time.
As an example, the revocation distance threshold α is determined, for example, based on the screen height h in combination with the upper limit value and the lower limit value of the total number of steps s1 of the previous operation. The unit of the screen height h is, for example, a pixel. If h/s 1 is less than the lower limit, the distance threshold α is removed from the lower limit. The lower limit value is, for example, 10 pixels. If h/s 1 is greater than the upper limit, the revocation distance threshold α takes the upper limit. The upper limit value is, for example, 50 pixels. If h/s 1 is between the lower and upper limit values, the revocation distance threshold α is h/s 1.
As an example, the redo distance threshold γ is not calculated, let redo distance threshold γ be equal to undo distance threshold α.
As another example, the redo distance threshold γ is determined based on the screen height h and the total number of consecutive undo steps s2 in combination with the upper and lower limit values, for example. The unit of the screen height h is, for example, a pixel. If h/s 2 is less than the lower limit, the redo distance threshold γ takes the lower limit. The lower limit value is, for example, 10 pixels. If h/s 2 is greater than the upper limit, the redo distance threshold γ takes the upper limit. The upper limit value is, for example, 50 pixels. If h/s 2 is between the lower limit and the upper limit, the redo distance threshold γ is h/s 2.
The sliding direction of the sliding operation is determined by calculation according to y 2-y 1, for example. If y 2-y 1 > 0 indicates that the sliding operation is upward (including the case with an upward component); if y 2-y 1 < 0 indicates that the sliding operation is down (including the case with a downward component).
Step S45: and the electronic equipment with the touch screen determines to cancel or redo the operation according to the upward or downward sliding direction of the sliding operation. For example, up corresponds to undo operation and down corresponds to 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 (upward and downward). When a certain sliding direction of the sliding operation corresponds to a cancel operation, the electronic device performs a cancel operation once | y 2-y 1| increases to equal α, where | represents an absolute value, during the progress of the sliding direction. Meanwhile, the electronic device re-determines the contact point of the sliding operation on the touch screen as the starting point a at the moment of | y 2-y 1| ═ α, and then returns to step S35. When a certain sliding direction of the sliding operation corresponds to a redo operation, the electronic device performs a redo operation once | y 2-y 1| increases to equal γ during the progress of the sliding direction. Meanwhile, the electronic device re-determines the contact point of the sliding operation on the touch screen at the moment of | y 2-y 1| ═ γ as the starting point a, and returns to step S35.
Ideally, the sliding locus of the sliding operation of the second embodiment is substantially a vertical straight line segment. The absolute value y 2-y 1 of y 2-y 1 is less than or equal to the height of the touch screen of the electronic device.
Any of the first or second embodiments described above may be employed if the sliding trajectory of the sliding operation is an oblique straight line segment or has an arbitrary shape.
Referring to fig. 3, 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. 4 and 5, which are a specific example of the step S40. For example, a leftward swipe corresponds to an undo operation, and a rightward swipe corresponds to a redo operation. Referring to fig. 4, when the two-finger sliding operation is leftward sliding, 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. 5, when the two-finger sliding operation is a rightward sliding operation, 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 portion is dark, indicating the remaining number of times a successive undo operation can be performed. Each time a redo operation is performed, the circular icon has a light sector that changes to a dark color, indicating by color change the number of times that successive redo operations have been performed (the area 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 arbitrarily changed between left and right without 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. 6, an embodiment of the gesture operation device for undo redo proposed in the present application includes an activation unit 10, a timing unit 20, a calculation unit 30, an undo 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 first calculating unit 30 is configured to determine, 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, a starting position of the sliding operation on the touch screen as a starting point a, and an abscissa is marked as x 1; recording the current contact point of the sliding operation on the touch screen as B, and recording the abscissa as x 2; and calculating values of a withdrawal angle threshold value alpha, a redo angle threshold value gamma, the sliding direction of the sliding operation and x 2-x 1 in real time.
The undo and redo unit one 40 is configured to determine to undo or redo the operation according to whether the sliding direction of the sliding operation is left or right. After each determination of the starting point a, when a certain sliding direction of the sliding operation corresponds to a undo operation, once | x 2-x 1| is increased to be equal to α during the progress of the sliding direction, the undo unit one 40 performs an undo operation while the contact point of the sliding operation on the touch screen at the moment of | x 2-x 1|, which is α, is re-determined as the starting point a and is re-calculated by the calculation unit one 30. When a certain sliding direction of the sliding operation corresponds to the redo operation, once | x 2-x 1| is increased to be equal to γ during the sliding direction, the undo unit one 40 performs the redo operation once, and at the same time, the contact point of the sliding operation on the touch screen is re-determined as the starting point a at the moment | x 2-x 1|, which is γ, and is re-calculated by the calculating unit one 30.
The deactivation unit 50 is configured to exit from the redo activation deactivated 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.
Referring to fig. 7, the embodiment of the gesture operation device for undo redo proposed by the present application includes an activation unit 10, a timing unit 20, a second calculation unit 35, a second undo unit 45, and a deactivation unit 50. Compared with the first embodiment shown in fig. 6, the second embodiment changes the first computing unit 30 into the second computing unit 35, and changes the first undo redo unit 40 into the second undo redo unit 45, and the rest is unchanged.
The second calculating unit 35 is configured to determine, 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, a starting position of the sliding operation on the touch screen as a starting point a, and a vertical coordinate of the starting point a is recorded as y 1; recording the current contact point of the sliding operation on the touch screen as B, and recording the ordinate as y 2; and calculating values of a withdrawal angle threshold alpha, a redo angle threshold gamma, the sliding direction of the sliding operation and y 2-y 1 in real time.
The second undo/redo unit 45 is configured to perform an undo/redo operation according to whether the sliding direction of the sliding operation is upward or downward. After each determination of the starting point a, when a certain sliding direction of the sliding operation corresponds to the undo operation, once | y 2-y 1| is increased to be equal to α during the progress of the sliding direction, the undo unit two 45 performs the undo operation once, and at the same time, determines the contact point of the sliding operation on the touch screen at the moment of | y 2-y 1|, as the starting point a again, and recalculates the contact point a by the calculation unit two 35. When a certain sliding direction of the sliding operation corresponds to the redo operation, once | y 2-y 1| is increased to be equal to γ during the sliding direction, the second undo unit 45 performs one redo operation, and at the same time, the contact point of the sliding operation on the touch screen is determined as the starting point a again when | y 2-y 1|, is γ, and is recalculated by the second calculating unit 35.
Compared with the prior art, the application has the following technical effects.
First, the present application performs one or more consecutive undo or redo operations quickly by sliding a distance (preferably a straight line segment) across the touch screen after triggering the undo or redo function. 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 method and the device can rapidly achieve batch and continuous undo functions through operation gestures. 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 (16)

1. A gesture operation method for 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 determines the initial position of the sliding operation on the touch screen as an initial point A, and the abscissa is marked as x 1; recording the current contact point of the sliding operation on the touch screen as B, and recording the abscissa as x 2; calculating a withdrawal distance threshold value alpha, a redo distance threshold value gamma, the sliding direction of the sliding operation and the values of x 2-x 1 in real time;
step S40: the electronic equipment determines to cancel or redo the operation according to the sliding direction of the sliding operation to the left or the right; after determining the starting point a each time, when a certain sliding direction of the sliding operation corresponds to the undo operation, once | x 2-x 1| is increased to be equal to α during the progress of the sliding direction, the electronic device performs the undo operation once, and simultaneously re-determines the contact point of the sliding operation on the touch screen as the starting point a at the moment | x 2-x 1|, and returns to step S30 for re-calculation; when a certain sliding direction of the sliding operation corresponds to the redo operation, once | x 2-x 1| is increased to be equal to γ during the sliding direction, the electronic device executes the redo operation once, and simultaneously, the contact point of the sliding operation on the touch screen is determined as the starting point a again when | x 2-x 1|, is γ, and the step returns to the step S30 for recalculation;
step S50: and when the electronic equipment detects that the touch main body of the sliding operation on the touch screen leaves the touch screen, the electronic equipment exits the redo activation canceling state.
2. The gesture operation method for canceling redo according to claim 1, wherein 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, and the time difference values of the d touch subjects starting to press the touch screen are all smaller than a first time threshold, and the moving distances of the d touch subjects on the touch screen are all smaller than a first distance threshold, and the pressing times of the d touch subjects on the touch screen are all smaller than a second time threshold.
3. The gesture operation method for undo redo of claim 1, characterized in that when the electronic device enters an undo redo activation state, other non-undo operation gestures are masked only in response to the undo redo operation gesture.
4. The method of gesture operation for undo redo of claim 1, wherein the swipe operation comprises a multi-finger swipe 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.
5. The gesture operation method for undo redo of claim 1, characterized in that the undo angle threshold α is determined according to the total number of previous operation steps s1 in combination with the upper and lower limit values; the previous total operation step number s1 is the total step number of the operation executed by the electronic device from the beginning of the operation of the electronic device, or the last time of the undo operation or the last time of the redo operation to the current time; 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.
6. The gesture operation method for undo redo of claim 5, characterized in that no redo angle threshold γ is calculated, let redo angle threshold γ equal to 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.
7. The gesture operation method for undoing redo 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 plurality of touch subjects in 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 at the earliest time and the touch control screen in the multiple 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 subject sliding on the touch screen among the multiple touch subjects in the multi-finger sliding operation with the touch screen at a time of | x 2-x 1| ═ α or a time of | x 2-x 1| ═ γ;
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.
8. The gesture operation method for undo redo of claim 1, wherein in step S30, the sliding direction of the sliding operation is determined by calculation based on x 2-x 1; if x 2-x 1 > 0 indicates that the sliding operation is to the right, including the case with a component to the right; if x 2-x 1 < 0 indicates that the sliding operation is to the left, including the case with a component to the left.
9. The gesture operation method for undo redo of claim 1, wherein in step S40, after each determination of the starting point a, if | x 2-x 1| monotonically increases with time, indicating that the sliding direction of the sliding operation has not changed during this time, there is only one sliding direction; if | x 2-x 1| contains turning points which increase and then decrease with time, indicating that the sliding operation changes the sliding direction midway in the 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 undo redo of claim 1, wherein in step S30 and step S40, the sliding trajectory of the sliding operation is substantially a transverse straight line segment.
11. The gesture operation method for canceling redo according to claim 1, wherein in step S40, when the electronic device performs the canceling operation, a circle or a circular ring is displayed on the touch screen of the electronic device, and the circle or the circular ring is divided into 360 ÷ S1 sectors or circular arc edges of the sectors; 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, a circular or circular shape is displayed on the touch screen of the electronic device, and the circular or circular shape is divided into 360 ÷ S1 circular or 360 ÷ S2 circular arc edges in a sector or sector shape; 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. The gesture operation method for undo redo of claim 1, wherein the step S30 is changed to step S35, and the step S40 is changed to step S45;
step S35: the electronic equipment determines the initial position of the sliding operation on the touch screen as an initial point A, and the ordinate is marked as y 1; recording the current contact point of the sliding operation on the touch screen as B, and recording the ordinate as y 2; calculating the values of a withdrawal distance threshold value alpha, a redo distance threshold value gamma, the sliding direction of the sliding operation and y 2-y 1 in real time;
step S45: the electronic equipment determines to cancel or redo the operation according to the upward or downward sliding direction of the sliding operation; after determining the starting point a each time, when a certain sliding direction of the sliding operation corresponds to the undo operation, once | y 2-y 1| increases to be equal to α during the sliding direction, the electronic device performs the undo operation once, and simultaneously re-determines the contact point of the sliding operation on the touch screen as the starting point a at the moment of | y 2-y 1|, and returns to step S35 for re-calculation; when a certain sliding direction of the sliding operation corresponds to the redo operation, once | y 2-y 1| is increased to be equal to γ during the sliding direction, the electronic device performs one redo operation, and simultaneously, the contact point of the sliding operation on the touch screen is determined as the starting point a again when | y 2-y 1|, γ, and the step returns to the step S35 for recalculation.
13. The method of gesture operation for undo redo of claim 12, wherein in step S35, the sliding direction of the sliding operation is determined by calculation based on y 2-y 1; if y 2-y 1 > 0 indicates that the sliding operation is upward, including the case with an upward component; if y 2-y 1 < 0 indicates that the sliding operation is down, including the case with a downward component.
14. The gesture operation method for undoing redo according to claim 13, wherein in steps S35 and S45, a sliding trajectory of the sliding operation is substantially a vertical straight line segment.
15. A gesture operation device for canceling redo is characterized by comprising an activation unit, a timing unit, a first calculation unit, a first canceling 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 first calculating unit is used for determining the initial position of the sliding operation on the touch screen as an initial point A when the timing unit detects that the sliding operation exists on the touch screen within the timing period of a third time threshold, and the abscissa is marked as x 1; recording the current contact point of the sliding operation on the touch screen as B, and recording the abscissa as x 2; calculating a undo angle threshold value alpha, a redo angle threshold value gamma, the sliding direction of the sliding operation and the values of x 2-x 1 in real time;
the undo and redo unit I is used for determining to undo or redo the operation according to the fact that the sliding direction of the sliding operation is leftward or rightward; after determining the starting point A each time, when a certain sliding direction of the sliding operation corresponds to an undo operation, once | x 2-x 1| is increased to be equal to alpha during the sliding direction, the undo unit performs the undo operation once, and simultaneously determines the contact point of the sliding operation on the touch screen at the moment of | x 2-x 1|, as the starting point A again and recalculates the contact point by the calculation unit once; when a certain sliding direction of the sliding operation corresponds to a redo operation, once | x 2-x 1| is increased to be equal to gamma during the sliding direction, the redo removing unit executes the redo operation once, and simultaneously, the computing unit recalculates the contact point of the sliding operation on the touch screen as a starting point A when | x 2-x 1|, is equal to gamma;
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.
16. The gesture operation device for undo redo of claim 15, wherein the first computing unit is changed to a second computing unit, and the first undo redo unit is changed to a second undo redo unit;
the second calculating unit is configured to determine, when the timing unit detects that there is a sliding operation on the touch screen within a timing period of a third time threshold, an initial position of the sliding operation on the touch screen as an initial point a, and a vertical coordinate of the initial position is y 1; recording the current contact point of the sliding operation on the touch screen as B, and recording the ordinate as y 2; calculating values of a withdrawal angle threshold value alpha, a redo angle threshold value gamma, the sliding direction of the sliding operation and y 2-y 1 in real time;
the undo and redo unit II is used for determining to undo or redo the operation according to the upward or downward sliding direction of the sliding operation; after determining the starting point A each time, when a certain sliding direction of the sliding operation corresponds to an undo operation, once | y 2-y 1| is increased to be equal to α during the sliding direction, the undo unit II performs an undo operation, and simultaneously determines the contact point of the sliding operation on the touch screen at the moment of | y 2-y 1|, as the starting point A, and recalculates the contact point by the calculating unit II; when a certain sliding direction of the sliding operation corresponds to the redo operation, once | y 2-y 1| is increased to be equal to γ during the sliding direction, the redo unit II performs the redo operation once, and simultaneously, the computing unit II re-determines the contact point of the sliding operation on the touch screen as the starting point A at the moment of | y 2-y 1|, which is γ, and re-computes the contact point.
CN202110533106.8A 2021-05-17 2021-05-17 Gesture operation method and device for undo redo Active CN113157185B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110533106.8A CN113157185B (en) 2021-05-17 2021-05-17 Gesture operation method and device for undo redo

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110533106.8A CN113157185B (en) 2021-05-17 2021-05-17 Gesture operation method and device for undo redo

Publications (2)

Publication Number Publication Date
CN113157185A true CN113157185A (en) 2021-07-23
CN113157185B CN113157185B (en) 2022-07-15

Family

ID=76876282

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110533106.8A Active CN113157185B (en) 2021-05-17 2021-05-17 Gesture operation method and device for undo redo

Country Status (1)

Country Link
CN (1) CN113157185B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7030861B1 (en) * 2001-02-10 2006-04-18 Wayne Carl Westerman System and method for packing multi-touch gestures onto a hand
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
CN103616994A (en) * 2013-12-09 2014-03-05 珠海金山办公软件有限公司 Method and device for controlling electronic device
US20150019960A1 (en) * 2013-07-10 2015-01-15 Konica Minolta, Inc. Document Editing Apparatus, Non-Transitory Computer-Readable Recording Medium and Document Editing Method
WO2015037767A1 (en) * 2013-09-16 2015-03-19 Lg Electronics Inc. Image display apparatus and method for operating the same
US20170046060A1 (en) * 2015-08-10 2017-02-16 Apple Inc. Devices, Methods, and Graphical User Interfaces for Manipulating User Interfaces with Physical Gestures
US20180293766A1 (en) * 2017-04-10 2018-10-11 Prysm, Inc. Drag to Undo/Redo a Digital Ink Canvas Using a Visible History Palette
CN108762648A (en) * 2018-04-28 2018-11-06 维沃移动通信有限公司 Screen operator control method and mobile terminal
CN108984096A (en) * 2018-07-04 2018-12-11 Oppo广东移动通信有限公司 touch operation method, device, storage medium and electronic equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7030861B1 (en) * 2001-02-10 2006-04-18 Wayne Carl Westerman System and method for packing multi-touch gestures onto a hand
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
US20150019960A1 (en) * 2013-07-10 2015-01-15 Konica Minolta, Inc. Document Editing Apparatus, Non-Transitory Computer-Readable Recording Medium and Document Editing Method
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
US20170046060A1 (en) * 2015-08-10 2017-02-16 Apple Inc. Devices, Methods, and Graphical User Interfaces for Manipulating User Interfaces with Physical Gestures
US20180293766A1 (en) * 2017-04-10 2018-10-11 Prysm, Inc. Drag to Undo/Redo a Digital Ink Canvas Using a Visible History Palette
CN108762648A (en) * 2018-04-28 2018-11-06 维沃移动通信有限公司 Screen operator control method and mobile terminal
CN108984096A (en) * 2018-07-04 2018-12-11 Oppo广东移动通信有限公司 touch operation method, device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN113157185B (en) 2022-07-15

Similar Documents

Publication Publication Date Title
US11294503B2 (en) Sensor baseline offset adjustment for a subset of sensor output values
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
CN106909305B (en) Method and apparatus for displaying graphical user interface
US8261211B2 (en) Monitoring pointer trajectory and modifying display interface
JP6350261B2 (en) Object operation system, object operation control program, and object operation control method
EP3037927B1 (en) Information processing apparatus and information processing method
WO2011013431A1 (en) Display control device, display control method, and computer program
US8081170B2 (en) Object-selecting method using a touchpad of an electronic apparatus
US10620758B2 (en) Glove touch detection
JP2011134273A (en) Information processor, information processing method, and program
CN113157185B (en) Gesture operation method and device for undo redo
CN113110793B (en) Gesture operation method and device for realizing undo and redo
CN106406717A (en) Screen adjustment method and 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