Skip to main content

The gesture library

The Gestures page holds every shape Input.Observer knows. The library is shared: one "Swipe left" serves every app group, and each group's actions decide what it does there.

A gesture is a name plus one or more examples: strokes you drew and saved. A drawn stroke is compared with the examples, never with the name. A gesture with no examples can never match.

The page​

Input.ObserverSimpleAdvanced
AUTOMATION
Actions
Text expansion
Snippets
Sandbox
App groups
Ignore groups
Gestures
SETUP
General
Appearance
Security
Help
About
Gestures
6 · shared by every app group, bound to actions per group
Train…
ShapesSettings
AllBoundUnused
Swipe left
Swipe left
Duplicate gesture
Delete
Draw to test
Draw the shape below to see how well it scores against this gesture's examples.
Save as an example
Clear
Examples
Used by
Back · in Browsers
  • The Shapes tab shows the gallery on the left and the selected gesture on the right. The Settings tab holds the Gesture matching card; see How a stroke is matched.
  • All / Bound / Unused ② filters the gallery: Bound shows gestures at least one action uses, Unused the rest. The search box filters by name.
  • Each gallery card shows the shape (the average of its examples; the red dot is where it ends), its name, how many examples it has and how many actions use it. Point at a card to watch it being drawn.

Adding a gesture​

Train… ① opens the Gesture training window. While it is open, gestures don't run their actions: every stroke you draw is captured for training instead.

  1. Select Train… ①.
  2. Draw the shape anywhere on screen with one of your draw buttons (chosen under Draw buttons on the General page), over any window. Ignore groups and exclusion zones don't apply while training.
  3. The window shows your stroke and the Closest gestures: the five gestures in the library it scores highest against, with their scores. A score at or above the match threshold is marked matches.
  4. Choose one:
    • Save as an example of the selected gesture, to teach an existing gesture another way it is drawn.
    • Type a name in New gesture name and select Save as new gesture.
    • Discard, to throw the stroke away.
  5. Draw the next stroke, or Close the window. Closing it turns training off.

The suggested choice follows the Training suggest threshold (80 by default): when the closest gesture scores at or above it, saving as an example of that gesture is the default button; below it, saving as a new gesture is. Enter in the name box always saves a new gesture.

You can also create a gesture where you need it: the gesture chooser in the action editor has a New… button, and Quick create… has Draw a new shape (see the quick start). Both ask you to draw the shape three times.

tip

Save three to five examples of each gesture, drawn the way you really draw it: a little faster, slower, bigger and smaller. More examples that agree make matching more reliable. Examples that disagree make the gesture match more strokes, including ones you meant as something else.

Testing and refining a gesture​

Select a gesture in the gallery to work on it:

  1. In Draw to test ④, draw the shape with the left mouse button. A stroke shorter than 12 pixels in both directions is ignored.
  2. Read the score in the corner: green means at or above the match threshold, amber below it. The sentence under the canvas says what the score means:
    • below the match threshold: the engine would not take this stroke as this gesture;
    • above the match threshold but below the training suggest threshold: it matches, and saving it would widen what counts as this gesture;
    • above the training suggest threshold: worth keeping as another example.
  3. Read the line under it, which compares the stroke with every other gesture in the library:
    • "n points ahead of other": a clear lead of 5 points or more;
    • "Only n points ahead of other": a slightly different stroke could match the other gesture;
    • "other scores n points higher": this stroke would match the other gesture instead.
  4. Save as an example adds the stroke to Examples ⑤. Clear empties the canvas.
  5. To remove an example that misleads matching, select its ✕ in Examples ⑤.

The score here uses the same calculation, threshold and Example scoring as the engine. The comparison line ranks the stroke against the whole library; when you draw over a real window, only the shapes that window's app group uses compete (see How a stroke is matched).

Runs other actions appears only when it has something to report: for an app group where this shape is not bound to anything, a stroke like it scores closest to another shape and runs that shape's action. The App groups page offers the fix; see How a stroke is matched.

Used by ⑥ lists every action with a trigger on this gesture, and its app group. Select a row to open that action. A Conflict badge marks an action whose trigger on this gesture competes with another action's trigger in the same app group, so only one of them can ever run there; point at the badge to see which one wins.

note

Advanced mode. Similar shapes lists the three other gestures that score highest against this gesture's own examples, with their scores. It measures how alike two shapes are, not whether a real stroke will be mistaken: for that, draw the stroke in Draw to test or in the training window.

Renaming, duplicating and deleting​

In the name card ③:

  • Rename by editing the name; it is saved when you leave the box or press Enter. An empty name is refused. Names need not be unique. Actions refer to the gesture itself, not its name, so renaming breaks nothing, but a script that reads the gesture's name (ContextGetGestureName) sees the new one.
  • Duplicate gesture makes a new gesture with copies of the same examples and a new name. No action uses the copy.
  • Delete is refused while any action has a trigger on the gesture: a message lists those actions. Give them another gesture, or remove those triggers, first.

Changes take effect when you apply them. See The configuration window.