Mouse Input
Mouse Input
Section titled “Mouse Input”ClicKey records four kinds of mouse activity and lets you add each one by hand.
Overview
Section titled “Overview”In the + Add Action menu, under Keyboard & Mouse, you’ll find:
- Mouse Click – Click at a coordinate.
- Mouse Move – Move the cursor.
- Mouse Drag – Drag from A to B.
- Scroll – Trackpad / Mouse wheel input.
A recorded macro typically contains all four mixed in with Window Anchors that tell playback which window each click belongs to.
Mouse Click
Section titled “Mouse Click”A click at a screen coordinate. Records both the left and the right mouse buttons.
Options & settings – Mouse Click
Section titled “Options & settings – Mouse Click”| Option | What it does |
|---|---|
| Click type | Click, Double-Click, Triple-Click, or Down & Up. Double- and Triple-Click replay as a real macOS multi-click (see below), not as separate single clicks. |
| Button | Left or Right. |
| X | Horizontal screen coordinate. Accepts a Number expression. |
| Y | Vertical screen coordinate. Accepts a Number expression. |
| Relative to cursor position | When ticked, X and Y are an offset from wherever the pointer is when the click runs. |
| Pick | Click Pick, then click anywhere on screen – ClicKey fills in X and Y for you. |
Double-Click and Triple-Click
Section titled “Double-Click and Triple-Click”macOS multi-clicks aren’t just “several clicks in the same spot” – each press carries a click count (1, 2, 3) that apps read to decide what a click means. In a text view like Pages, TextEdit, or a browser field:
- Double-Click selects the word under the pointer.
- Triple-Click selects the whole paragraph or line.
Why three separate Click actions don’t select text. A single Click action always carries a click count of 1 – it’s a complete, standalone click by native macOS design. So three single Click events in a row won’t give the same result as a triple-click.
Double- and triple-clicks you perform while recording are stored as separate Mouse Down and Mouse Up actions. Playback sends them exactly as you clicked, so the app still sees a real multi-click – not a run of single clicks.
A click action is normally preceded by a Window Anchor so playback knows which window the coordinates belong to. Without an anchor, the click happens at absolute screen coordinates – which may land in the wrong window if your layout changes.
Mouse Move
Section titled “Mouse Move”Moves the cursor to a coordinate without clicking. The editor accepts Number expressions for Start X/Y and End X/Y. ClicKey works out both points at playback time and moves the cursor between them.
Options & settings – Mouse Move
Section titled “Options & settings – Mouse Move”| Option | What it does |
|---|---|
| Start X / Y | Where the move starts. |
| End X / Y | Where the move ends. |
| Duration (ms) | How long the move takes. Default 500. |
| Relative to cursor position | When ticked, the cursor moves the distance from Start to End, starting from wherever it currently is. |
Used for hover-triggered UI (menus that open on hover, tooltips that appear on a delay). Pair with Wait when the hover needs to dwell for a moment.
A recorded mouse move includes the intermediate positions, so playback can repeat the exact path. The editor shows it as a single row. If you change the start or end position, the recorded path is dropped and playback moves in a straight line from start to end.
Recording captures every mouse move, which can fill a macro with hundreds of Mouse Move rows. If you don’t need the exact path and only care about where the cursor ends up, you can delete the rows in between and keep only the meaningful end points – playback won’t miss them.
Mouse Drag
Section titled “Mouse Drag”A click-and-drag from one coordinate to another, holding the button between.
The editor accepts Number expressions for Start X/Y and End X/Y. ClicKey works out both points at playback time and drags between them.
Options & settings – Mouse Drag
Section titled “Options & settings – Mouse Drag”| Option | What it does |
|---|---|
| Button | Left or Right – the mouse button held down during the drag. |
| Start X / Y | Where the drag starts. |
| End X / Y | Where the drag ends. |
| Duration (ms) | How long the drag takes. Default 500. |
| Relative to cursor position | When ticked, the drag covers the distance from Start to End, starting from wherever the pointer currently is. |
A recorded drag includes the intermediate positions so playback can replicate the motion path. The editor shows it as a single Drag row; you can adjust just the start and end if you don’t care about the path.
Scroll
Section titled “Scroll”Recorded scrolls – from a trackpad, a Magic Mouse, or a mouse wheel – all become the same kind of row, measured in pixels and labelled like Scroll at (742, 415) 309 px ↑, 3 px →.
The coordinates are where the scroll is aimed. macOS delivers a scroll to whatever sits under the pointer, so the pointer decides which pane moves – a page, a sidebar, or a list inside it. Recording captures the pointer position from the moment the gesture began. Playback puts the pointer back there and aims the scroll events themselves at that point, so the pane that moves does not depend on whether the pointer has finished travelling. Without that, a run scrolls whatever the pointer happens to be over.
Options & settings – Scroll
Section titled “Options & settings – Scroll”| Option | What it does |
|---|---|
| Type | Trackpad or Mouse Wheel. Apps handle the two differently, and in some drawing, CAD, and map apps a wheel zooms where a trackpad pans. |
| At Position X / Y | Where the pointer moves before scrolling. Filled in for a recorded scroll and by this editor’s Record button. Leave both empty to scroll wherever the pointer already is. |
| Distance – Vertical | Positive scrolls up, negative scrolls down. The unit follows Type – px for Trackpad, lines for Mouse Wheel. An arrow beside the field shows the direction as you type; with an expression, it shows what a positive result would mean. Accepts a number expression with variable suggestions. |
| Distance – Horizontal | Positive scrolls right, negative scrolls left. |
| Duration (ms) | How long the motion takes. Accepts a number expression. |
Difference between Trackpad (px) and Mouse Wheel (lines)
Section titled “Difference between Trackpad (px) and Mouse Wheel (lines)”A trackpad value is the distance itself: macOS hands the app a number of pixels and the app scrolls that far.
A mouse wheel value is a number of lines, and the target app multiplies it by its own line height before scrolling. That height is the app’s choice – NSScrollView exposes it as a setting – which is why wheel scrolling grows with the font size while trackpad scrolling does not. A text editor might use one line of text, a browser around 40 pixels, and a drawing canvas something else again.
So the same number means different distances for the two types, and there is no conversion between them. They are labelled differently for exactly that reason – comparing 430 px with 430 lines is meaningless.
Neither unit predicts what you will actually see, because the app has the last word. Use Record below to capture a real scroll instead of guessing, or run the macro once and adjust the number.
Record
Section titled “Record”The Record button captures a real scroll instead of you entering the values by hand. Use it whenever you can – it’s the most reliable way.
A five-second countdown appears on screen while the sheet steps aside, giving you time to move the pointer over the area you want to scroll – scroll input goes wherever the cursor is, so this matters. Esc cancels during the countdown. After it, nothing happens until you actually scroll.
The motion is stored exactly as you performed it, including whether it came from a trackpad or a wheel, which sets Type for you. Recording ends when you move the mouse more than a small threshold, click, or press a key. Modifier keys do not end it, so Shift-scrolling for the horizontal axis still works.
A captured motion is kept verbatim, so the action replays precisely what you did. Editing any field afterwards drops it and the motion is generated from the numbers again.
Record also captures the point you scrolled over, and adding the action inserts a Window Anchor in front of it when that point sits in a different window than the last anchor above it – the same thing that happens for a hand-added Mouse Click.
Saving replaces the motion. A recorded Scroll keeps hundreds of raw events behind it (see below); once you change the values and save the sheet, those are replaced by a freshly generated motion matching your numbers. The editor makes the same trade for a recorded Mouse Drag or Mouse Move, whose path becomes a straight line once you change its start or end point. What you lose is the original pacing – whether the swipe started slowly and finished fast. The distance, direction, and type will be exactly what you entered.
Recorded scrolls replay the original motion
Section titled “Recorded scrolls replay the original motion”One trackpad swipe is not one event – macOS sends hundreds of tiny ones, each moving a pixel or two. A recorded Scroll row stores all of them and replays them one by one, at the original spacing.
Apps don’t just add up scroll distance. They treat a stream of small gesture events and one big event very differently – in browser-based apps, for example, the content can move much faster than in native apps. ClicKey replays the original events, so the app scrolls exactly as far as it did during recording.
Scrolling is grouped into rows by pauses: anything within a second of the last scroll stays in one row, a longer break becomes a Wait followed by a new row. See What Gets Captured.
How to use
Section titled “How to use”- Add the action you want from + Add Action → Keyboard & Mouse.
- Fill in the coordinates by hand, or capture them with Pick – or with Record for a scroll (recommended) – where the editor offers it.
- Save.
- For reliable playback, make sure a Window Anchor comes before the action, so clicks land in the right window.
Notes & limitations
Section titled “Notes & limitations”- All four mouse actions use absolute screen coordinates. They don’t scale with monitor changes by themselves – that’s what Window Anchors and Shift Coordinates are for.
- A coordinate shift applies whether the coordinate is a literal or an expression. Shift Coordinates adds its offset on top of whatever the field works out to. Relative mouse actions treat the resolved values as offsets from the current pointer position and are never shifted – they have no absolute position to move.
- Move and Drag expressions control the full path. Start and end expressions are resolved once per path point, so changing a variable changes the interpolated motion instead of only moving one endpoint.
- Invalid mouse expressions stop playback. An expression that doesn’t work out to a number stops the run before the mouse event is sent.
- Recording captures every system mouse move. If a macro feels noisy with Mouse Move rows, trim them in the editor – and check that the macro still works afterwards.
- Mouse Drag’s intermediate path can affect apps that interpret motion (drawing apps, gesture-aware controls). Recording captures the path; changing the start or end point turns it into a straight line on playback.
- Mouse Click vs. Mouse Down + Mouse Up. Use Click for normal taps. Use Down + Up as a pair when you need to do other things between pressing and releasing – for example, to hold the button while you move the mouse by hand in between.
- A recorded Scroll takes as long to replay as it did to record. The gesture is reproduced at its original pace, so a two-second swipe occupies two seconds of the run. Playback speed applies to it: at 2x the swipe is replayed twice as fast. Vollgas (Max Speed) speeds a gesture up to roughly twice trackpad pace and no further – past that, apps start merging the incoming events and the scroll travels a shorter distance instead of just finishing sooner. Distances match the original most closely at 1x.
- A recording is still the most faithful option. A Scroll action you create or edit gets a generated motion – correct in distance, direction, and type, but with an even pace rather than the rise and fall of a real swipe. When a scroll has to behave exactly as you performed it, record it and leave it alone.
- Scroll goes to whatever is under the pointer. macOS delivers scroll input to the view the cursor sits on, not to the focused window. A Scroll that carries an At Position aims itself there, so it doesn’t need a Mouse Move in front of it. One that has no position scrolls wherever the previous action left the cursor.
- There is no per-row playback speed control for mouse actions. Speed comes from Run Settings – see Run Settings: Speed, Loops, and Vollgas.
Related
Section titled “Related”- Keyboard Input – key presses and typed characters.
- Window Anchors – what targets a click to the right window.
- Shift Coordinates – offset all subsequent mouse coordinates without editing each one.
- Wait – pause between mouse actions (hover-triggered menus often need this).
- What Gets Captured – how recording produces mouse rows.