# GestureCalc Gesture Codes

This page is walkthrough of character codes described in the GestureCalc paper. Do you want to try the app? Contact me to get it on TestFlight.

### Gesture Primitives

We developed a set of gesture primitives to use in constructing the gesture set. Each character in our gesture set is composed of one or two of these gesture primitives.

We have directional swipes: up, down, left, and right. That's where the finger touches down, drags across the screen in a certain direction, then lifts up. We have taps. That's where the finger briefly touches down in one spot and immediately lifts up. And we have the long taps. That's where the finger touches down in one spot, waits 0.5 seconds for haptic feedback, then lifts up.

Each category of gesture can be performed with one, two, or three fingers simultaneously.

### Fragments

Five individual strokes are the fragments that we will combine together in different ways to form the digits 0-9. The fragment representing 0 is a one-finger downward swipe, the fragment for 1 is a one-finger tap, the fragment for 2 is a two-finger tap, the fragment for 3 is a three-finger tap, and the fragment for 6 is a one-finger upward swipe. Remember, these are just fragments. We're going to combine 1 or 2 of them together to form the character code for each digit.

### Digits

We have three groups of digits. The first group is basics, which consist of one stroke each. These are the same as the fragments for 0, 1, and 2. The second group is the Three Group. These all start with the fragment for three. The third group is the Six group. These all start with the fragment for 6.

First are the Basic digits, that's 0, 1, and 2, which are each one single stroke. The digit 0 is a 1-finger downward swipe. The digit 1 is a 1-finger tap. The digit 2 is a 2-finger tap.

The Three Group includes digits 3, 4, 5, and 6. They each start with the fragment for 3. The digit 3 combines the fragment for 3 with the fragment for 0. That is, is a 3-finger tap followed by a 1-finger downward swipe. You can think of this as "3 + 0". The digit 4 combines the fragment for 3 with the fragment for 1. That is, a 3-finger tap then a 1-finger tap. You can think of this as "3 + 1". 5 is a 3-finger tap then a 2-finger tap. 6 is a 3-finger tap then a 3-finger tap.

The Six Group consists of digits 6 through 9. They each start with the fragment for 6. The digit 6 combines the fragment for 6 with the fragment for 0. That is, a 1-finger upward swipe followed by a 1-finger downward swipe. You can think of this as "6 + 0". The digit 7 combines the fragment for 6 with the fragment for 1. That is, a 1-finger upward swipe then a 1-finger tap. You can think of this as "6 + 1". 8 is a 1-finger upward swipe then a 2-finger tap, like "6 + 2". 9 is a 1-finger upward swipe then a 3-finger tap.

### Operators

The operators each use one gesture primitive. We have two sets of operators: the ones that use the up/down metaphor and the ones that use the left/right metaphor.

We'll start with the "up is more, down is less" metaphor. Addition is a two-finger upward swipe. Subtraction is a two-finger downward swipe. Multiplication and division follow this same pattern, but with three fingers instead of 2.

Next are operators using the "right is forward, left is backward" metaphor. Delete is a 1-finger backward swipe from right to left. It's 1 finger because it deletes 1 character. Clear is a 2-finger backward swipe from right to left. 2 fingers delete all the character. Equals is a 2-finger forward swipe from left to right.

Finally, we have decimal point. Decimal point doesn't seem to fit into a metaphorical pattern with any of the other characters, so it uses a gesture primitive not found in any of the character codes. Decimal point is a one-finger long tap.