Skip to main content

Drawing a gesture

You draw a gesture by holding a draw button, moving the mouse, and letting go. Input.Observer holds back the press while you draw. When you let go, it either runs an action, or hands the press back to the window as if Input.Observer weren't there.

Draw buttons​

The right button is the only draw button at first. You can add or remove buttons on the General page:

Input.ObserverSimpleAdvanced
AUTOMATION
Actions
Text expansion
Snippets
Sandbox
App groups
Ignore groups
Gestures
SETUP
General
Appearance
Security
Help
About
General
Starting a gesture
Draw buttons
Mouse buttons that start gesture capture. Including the left button is unusual but valid, e.g. for pen or tablet input with no separate secondary button.
Left buttonRight buttonMiddle buttonSide button 1Side button 2
Ignored modifier keys
Holding any of these keys when you press the gesture button skips gesture capture for that press.
CtrlShiftAlt
  1. Open General and find the Starting a gesture card.
  2. In Draw buttons ①, select every button that should draw. Select a selected button again to turn it off.
  3. Apply your changes.

Rules:

  • Any of Left button, Right button, Middle button, Side button 1 and Side button 2 can draw, and several can draw at once. Each one starts its own gesture.
  • With no draw button selected, mouse gestures are off entirely. Hotkeys and text expansion keep working.
  • An action's gesture trigger can ask for one draw button, or accept Any draw button. A trigger that names a button you turned off here never matches. See The Actions page.
  • The left button is unusual. Every left-button drag of 5 pixels or more over a window where gestures work becomes a gesture, so selecting text, dragging files and moving windows stop working there. It is useful for pen and tablet input, which has no second button.
  • Swapped mouse buttons. When Windows has the primary and secondary buttons switched, the names follow Windows: Right button is the button that opens context menus, which is the physical left button.
  • Each draw button can draw its own trail style. See Gesture trails.

When a press starts a gesture​

Pressing a draw button starts a gesture capture unless one of these is true. In each case the press goes to the window untouched, with no delay:

The press passes through when…Where it is set
Input.Observer is turned off, or paused while a window is focusedThe tray icon, App groups
A key in Ignored modifier keys ② is held (Ctrl unless you change it)Ignored modifier keys
The window is in an ignore groupIgnore groups
No app group, and no Global group, has gestures working for the windowScope and fallback rules
The press is inside an exclusion zoneExclusion zones
The previous gesture's trail is still being erased (the built-in trail only, for a split second)Gesture trails
A script asked to let the next gesture through (EngineDisableNextGesture)Builtins

The window that counts is the top-level window under the pointer at the moment you press. A gesture drawn from a text box inside a browser counts as drawn over the browser window. Moving onto another window while you draw changes nothing.

A click or a gesture​

A press is not a gesture until the pointer has moved far enough from where you pressed:

  • Minimum gesture movement is 5 pixels, measured in a straight line from the press point.
  • Released before that: it was a click. Input.Observer sends the press and the release to the window at the press point, so a right-click still opens the context menu.
  • Moved that far: it is a gesture from then on, even if you move back to the start point.
note

Advanced mode. Minimum gesture movement (0 to 200 pixels) is on the General page's Starting a gesture card. At 0, the slightest movement makes a gesture.

While you draw​

  • The trail appears once the stroke is a gesture and has moved 8 pixels from the start. It is drawn over every monitor, so a stroke can cross from one monitor to another. See Gesture trails.
  • The hint names the action that would run if you let go now. It appears once the stroke has lasted 150 milliseconds or moved 24 pixels, follows every change, and disappears whenever the stroke so far matches nothing. What the hint shows is exactly what runs when you let go. See Hints and messages.
  • Keys and other buttons are held back. Until you let go, keystrokes, mouse wheel turns and other mouse buttons reach no window. Pressing Ctrl, Shift, Alt or Win, another mouse button, or turning the wheel counts as a modifier for the gesture (see Modifiers and timing); other keys are simply dropped. Releasing Ctrl, Shift, Alt or Win always reaches the window. The stop-all-actions hotkey still works.
  • Keys held before you pressed. If you let go of such a key while drawing, its release is held back too. Release keys let go during a gesture (on by default, Advanced mode, General page, Fine-tuning card) sends that release once the gesture ends, so the window doesn't think the key is still down.

Ending a gesture​

What happensWhat the window under the pointer getsWhat runs
You let go before moving 5 pixelsThe click, at the press pointNothing
You let go after drawing, and the stroke matches an actionNothing: the press is used upThe action
You let go after drawing, and nothing matchesNothing: the press is used upThe Nothing matched global event, if you set one up
You hold still for the cancel timeoutThe press, at the press point, then the pointer at its current position; your own release followsNothing
The gesture reaches the maximum gesture durationThe press, if the button is still downNothing

In every case where the capture was started, the Draw button released global event runs when you let go, if you set one up, except after a cancel timeout or the maximum duration. See Global events.

Cancel timeout​

The cancel timeout gives the press back to the window when you hold still:

  • Cancel timeout is 500 milliseconds by default (General, Ending a gesture). Turn it off to let a capture stay open until you let go. Its range is 0 to 10,000 milliseconds; at 0, every capture is cancelled as soon as it starts.
  • Any mouse movement or key press during the gesture restarts it, so it only counts time you spend holding still. Pausing that long in the middle of a stroke ends the gesture and hands the press back: the window then sees an ordinary drag with that button.
  • A cancelled gesture runs nothing.
note

Advanced mode. Drawing extends the cancel timeout (on by default) is the switch behind the restart rule. Turned off, the whole gesture must be finished within the cancel timeout, counted from the press, even while you keep drawing. An app group can override the cancel timeout for its own windows with its Cancel timeout card (0 to 60,000 milliseconds); see App groups.

Maximum gesture duration (10,000 milliseconds by default, 0 for no limit) ends any gesture that is still open after that long, counted from the press, whatever you are doing. It exists for a release that never reaches Input.Observer, for example because you let go on the Ctrl+Alt+Del screen.

After a match​

When a stroke matches an action:

  1. Activate the window under the gesture (on by default, General, When a gesture matches) brings the window you pressed over to the front, so anything the action types goes there.
  2. The action runs, with any Before and After actions around it. See Before and after actions.

Settings on this page​

SettingPage and cardDefaultRange
Draw buttonsGeneral, Starting a gestureRight buttonAny combination, or none
Ignored modifier keysGeneral, Starting a gestureCtrlCtrl, Shift, Alt
Minimum gesture movement (Advanced)General, Starting a gesture5 px0–200 px
Wheel modifier window (Advanced)General, Starting a gesture500 ms0–10,000 ms
Cancel timeoutGeneral, Ending a gesture500 msOff, or 0–10,000 ms
Drawing extends the cancel timeout (Advanced)General, Ending a gestureOn
Maximum gesture duration (Advanced)General, Ending a gesture10,000 ms0 (no limit)–600,000 ms
Activate the window under the gestureGeneral, When a gesture matchesOn
Release keys let go during a gesture (Advanced)General, Fine-tuningOn

Wheel modifier window is explained in Modifiers and timing.