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. A keyboard key can draw the same way: see The draw key.
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.
The draw key
Advanced mode. The Draw key row is on the General page, in the Starting a gesture card.
The draw key is a keyboard key that works like a draw button: hold it, move the mouse, and let go. It helps on a touchpad, where holding a button while you move is awkward. It also helps in programs that use right-button drags themselves, such as CAD or 3D tools: turn off Draw buttons start gestures here for them (see App groups), and draw there with the key.
- Open General and find the Starting a gesture card.
- In Draw key ①, pick a key. None turns the draw key off.
- Apply your changes.
Rules:
- The keys you can pick are Caps Lock, Scroll Lock, Pause, Insert, the Menu key and F13 to F24. Keys you type with, and Ctrl, Shift, Alt, Win and AltGr, can't be the draw key: holding one back would break every shortcut that uses it.
- Everything on this page works the same way with the draw key: the press that starts a gesture, a click or a gesture, what is held back while you draw, and how a gesture ends. Where the page says "the press", it is the key's press.
- A tap of the draw key, without moving the mouse, reaches the window as a normal key tap, so a tap of Caps Lock still turns Caps Lock on or off. The tap takes effect when you let go of the key.
- Holding the key still for the cancel timeout gives the key press back to the window, and your release follows.
- The window that counts is the top-level window under the pointer when you press the key.
- The draw key draws the trail style chosen for all gestures (see Gesture trails).
- An action's gesture trigger can ask for Draw key, or accept Any draw button, which includes it. See The Actions page.
- A hotkey that uses the draw key runs only where the key doesn't start a gesture. The Actions page marks such a hotkey.
- Over a Remote Desktop or virtual machine window, the remote program may take the key before Input.Observer sees it.
- On a Japanese keyboard, the Caps Lock (英数) key pressed on its own goes to the input method, so it can't draw. Pick another key from the list.
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 window's app group has Draw buttons start gestures here off (draw buttons only, not the draw key) | App groups |
| 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. The classic line also waits until the stroke has moved 8 pixels from the start (Draw after moving). The trail 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.
- The wheel can run actions. A wheel tick that fits a wheel trigger runs its action at once, and from then on the press is no gesture: no trail, no hint, and letting go gives no click back.
- Another button can run actions. Before you have moved far enough to start a gesture, clicking another mouse button that fits a button chord trigger runs its action at once, with the same result for the press as a wheel trigger.
- 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 turned the wheel and a wheel trigger ran, then let go | Nothing: the press is used up | The wheel trigger's action, once for each tick, while you held the button |
| You clicked another button and a button chord trigger ran, then let go | Nothing, for either button: the press is used up | The chord trigger's action, once for each click, while you held the button |
| You held another button, then let go before moving 5 pixels, and a button chord trigger fits | Nothing for this button; the held button's own click is the window's | The chord trigger's action |
| 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 and no wheel or chord trigger ran | 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, key press or wheel tick 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.
- Once a wheel trigger has run, the cancel timeout no longer applies to that press: you can hold still between wheel ticks for as long as you like (Wheel triggers). The same goes once a button chord trigger has run (Button chord triggers).
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 wheel or button chord trigger has run, it ends the press without giving it back, and your release stays with Input.Observer too, so no context menu opens.
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 |
| Draw key (Advanced) | General, Starting a gesture | None | None, Caps Lock, Scroll Lock, Pause, Insert, Menu key, F13–F24 |
| 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.