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:
- Open General and find the Starting a gesture card.
- In Draw buttons ①, select every button that should draw. Select a selected button again to turn it off.
- 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 focused | The 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 group | Ignore groups |
| No app group, and no Global group, has gestures working for the window | Scope and fallback rules |
| The press is inside an exclusion zone | Exclusion 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.
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 happens | What the window under the pointer gets | What runs |
|---|---|---|
| You let go before moving 5 pixels | The click, at the press point | Nothing |
| You let go after drawing, and the stroke matches an action | Nothing: the press is used up | The action |
| You let go after drawing, and nothing matches | Nothing: the press is used up | The Nothing matched global event, if you set one up |
| You hold still for the cancel timeout | The press, at the press point, then the pointer at its current position; your own release follows | Nothing |
| The gesture reaches the maximum gesture duration | The press, if the button is still down | Nothing |
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.
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:
- 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.
- The action runs, with any Before and After actions around it. See Before and after actions.
Settings on this page
| Setting | Page and card | Default | Range |
|---|---|---|---|
| Draw buttons | General, Starting a gesture | Right button | Any combination, or none |
| Ignored modifier keys | General, Starting a gesture | Ctrl | Ctrl, Shift, Alt |
| Minimum gesture movement (Advanced) | General, Starting a gesture | 5 px | 0–200 px |
| Wheel modifier window (Advanced) | General, Starting a gesture | 500 ms | 0–10,000 ms |
| Cancel timeout | General, Ending a gesture | 500 ms | Off, or 0–10,000 ms |
| Drawing extends the cancel timeout (Advanced) | General, Ending a gesture | On | |
| Maximum gesture duration (Advanced) | General, Ending a gesture | 10,000 ms | 0 (no limit)–600,000 ms |
| Activate the window under the gesture | General, When a gesture matches | On | |
| Release keys let go during a gesture (Advanced) | General, Fine-tuning | On |
Wheel modifier window is explained in Modifiers and timing.