CN113110793A - Gesture operation method and device for realizing undo and redo - Google Patents
Gesture operation method and device for realizing undo and redo Download PDFInfo
- Publication number
- CN113110793A CN113110793A CN202110533007.XA CN202110533007A CN113110793A CN 113110793 A CN113110793 A CN 113110793A CN 202110533007 A CN202110533007 A CN 202110533007A CN 113110793 A CN113110793 A CN 113110793A
- Authority
- CN
- China
- Prior art keywords
- redo
- touch screen
- sliding
- undo
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction 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/0488—Interaction 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction 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
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The application discloses a gesture operation method for achieving 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 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 undo redo activation 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
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 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 value alpha, a redo angle threshold value gamma, the sliding direction of the sliding operation and an angle beta of the 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, 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 the redo operation, once | β | is increased to be equal to γ during the sliding direction is performed, the electronic device performs the redo operation once, and at the same time, the contact point of the sliding operation on the touch screen at the moment of | β |, which is γ, is determined as the starting point a again, and the step S30 is returned to 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. 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 operation gesture of undo redo is responded, and other operation gestures which are not undo redo 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 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, and 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 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, the sliding track of the sliding operation is substantially a circular arc or a circle.
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.
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 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 calculation unit is used for determining a point pressed by the multi-finger pressing operation on the touch screen as a zero point O when the timing unit detects that the touch screen has the sliding operation within the timing period of a third time threshold, determining an initial position of the sliding operation on the touch screen as an initial 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. 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 is performed, the undo unit performs the redo operation once, and at the same time, the contact point of the sliding operation on the touch screen at the moment of | β |, which is γ, is determined again as a starting point a and is recalculated 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.
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 one 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: 10 is an activation unit, 20 is a timing unit, 30 is a calculation unit, 40 is a undo redo unit, and 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, 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: 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) with coordinates of (x 0, 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 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 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 limit value and the upper limit value, 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 ÷ s2 is between the lower limit value and the upper limit value, then 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 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 calculated, for example, according to a vector formula, and 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 a cancel operation, the electronic apparatus performs a cancel operation once | β | increases equal to α during the sliding direction, where | represents 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 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.
This step is specifically divided into two cases. The first case is that after each determination of the start point a, | β | monotonically increases with time (monotonically 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 k undo operations in total. The value range of k is a positive integer.
As another example, the sliding operation is always clockwise, the clockwise direction corresponds to the 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 values for 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 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 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.
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 4, which are 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 counterclockwise sliding around the zero point O, the electronic device performs the 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 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 randomly changed in the anticlockwise direction or the clockwise direction on the premise of not leaving the touch screen, and then 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 redo proposed by 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 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 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.
Compared with the prior art, the application has the following technical effects.
First, after the undo or redo function is triggered, one or more times of continuous undo or redo are quickly 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 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 (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;
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 operations as claimed in claim 1, wherein the multi-finger press 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 press times of the d touch subjects on the touch screen are all 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 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 realizing undo and redo operations as claimed in claim 1, wherein 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 achieving undo redo of claim 5, wherein no redo angle threshold γ is calculated, making 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 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 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 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 touch subjects of the multi-finger sliding operation leave the touch screen.
8. The method for gesture operation with undo redo of claim 1, wherein the sliding direction of the sliding operation is calculated according to a vector formula, where s is (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.
9. The gesture operation method for performing undo redo operation of 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 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.
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 a gesture operation of canceling redo according to claim 1, wherein in step S40, when the electronic device performs the canceling 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 sectors or circular arc edges of 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. 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 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 a 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 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.
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 true CN113110793A (en) | 2021-07-13 |
CN113110793B 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) |
Citations (9)
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 |
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 |
CN103616994A (en) * | 2013-12-09 | 2014-03-05 | 珠海金山办公软件有限公司 | Method and device for controlling electronic device |
WO2015037767A1 (en) * | 2013-09-16 | 2015-03-19 | Lg Electronics Inc. | Image display apparatus and method for operating the same |
US20180293766A1 (en) * | 2017-04-10 | 2018-10-11 | Prysm, Inc. | Drag to Undo/Redo a Digital Ink Canvas Using a Visible History Palette |
CN108932481A (en) * | 2006-01-30 | 2018-12-04 | 苹果公司 | The gesture operation carried out using multipoint sensing device |
CN110720087A (en) * | 2017-06-02 | 2020-01-21 | 苹果公司 | Apparatus, method and graphical user interface for annotating content |
US20200326841A1 (en) * | 2019-04-15 | 2020-10-15 | Apple Inc. | Devices, methods, and systems for performing content manipulation operations |
-
2021
- 2021-05-17 CN CN202110533007.XA patent/CN113110793B/en active Active
Patent Citations (9)
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 |
CN108932481A (en) * | 2006-01-30 | 2018-12-04 | 苹果公司 | The gesture operation carried out using multipoint sensing device |
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 |
US20180293766A1 (en) * | 2017-04-10 | 2018-10-11 | Prysm, Inc. | Drag to Undo/Redo a Digital Ink Canvas Using a Visible History Palette |
CN110720087A (en) * | 2017-06-02 | 2020-01-21 | 苹果公司 | Apparatus, method and graphical user interface for annotating content |
US20200326841A1 (en) * | 2019-04-15 | 2020-10-15 | Apple Inc. | Devices, methods, and systems for performing content manipulation operations |
Also Published As
Publication number | Publication date |
---|---|
CN113110793B (en) | 2022-07-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2476046B1 (en) | Touch input transitions | |
US20190146667A1 (en) | Information processing apparatus, and input control method and program of information processing apparatus | |
US9041660B2 (en) | Soft keyboard control | |
US8261211B2 (en) | Monitoring pointer trajectory and modifying display interface | |
CN106909304B (en) | Method and apparatus for displaying graphical user interface | |
JP6350261B2 (en) | Object operation system, object operation control program, and object operation control method | |
US20140078063A1 (en) | Gesture-initiated keyboard functions | |
US20100177121A1 (en) | Information processing apparatus, information processing method, and program | |
US20110006991A1 (en) | Image Processing for Camera Based Motion Tracking | |
US10620758B2 (en) | Glove touch detection | |
US8081170B2 (en) | Object-selecting method using a touchpad of an electronic apparatus | |
Yin et al. | CamK: Camera-based keystroke detection and localization for small mobile devices | |
CN113110793B (en) | Gesture operation method and device for realizing undo and redo | |
CN113157185B (en) | Gesture operation method and device for undo redo | |
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 | |
CN115933958A (en) | Information display method and equipment |
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 |