Skip to main content
Some recipes use Clipboard and per-app window targeting; see Platforms for per-OS availability. Each recipe is a complete script. Copy it into a new script in the Rebind app and adjust the config.

Text expansion

Type a short abbreviation, then press a trigger key to expand it into full text. HID.Typewriter types the expansion character by character, while HID.Type submits the string in one call. For long or multi-line blocks, paste through the clipboard where the platform supports it.
Tuning. Add entries to snippets, then add any punctuation their abbreviations need to shifted or punctuation. Raise the HID.Typewriter character delay (the 15) if an app drops characters. For long blocks, use Clipboard.Set and the target platform’s paste shortcut instead.

Per-app shortcuts

A modeline scopes a script to one or more applications by window title (window=) or executable (process=). The same physical key means one thing in your editor and nothing elsewhere. No profile switching is required, and the script’s input hooks stay inactive when no target matches.
Tuning. Repeat keys on one line to cover several apps: process=Code.exe process=Cursor.exe. For larger sets, use process_regex="^(Code|Cursor)\.exe$". Add exclude_window=Settings when one window in a matching app should remain untouched. Regex and exclusion keys require min_sdk=3.4.1 or newer. Full modeline semantics are in the SDK reference.

Clipboard transform

Read the clipboard, transform it in Luau, and paste the result. This example trims and lowercases the selection, but any string operation works: strip formatting, wrap in quotes, convert case, run a regex.
Tuning. Replace the cleaned line with your own transform. The Sleep(50) gives the foreground app time to populate the clipboard after the copy; raise it if the read comes back stale.

Multi-step macro

Replay a fixed sequence of keystrokes on demand. Run plus Sleep controls the requested delay between steps; actual wake-up is tick-granular. task:Cancel() aborts a long sequence mid-flight.
Tuning. Edit the body of the Run block to define your sequence. Each Sleep is in milliseconds. Tighten the delays for speed, widen them if a step fires before the previous one lands. To capture a sequence live instead of hand-writing it, see the macro recorder below.

Record and replay a macro

Capture a live sequence of keystrokes and mouse moves, then play it back with the recorded delays. Macro.Record starts capturing, Macro.Finish returns the recorded macro, and Macro.Play replays it at a selected speed.
Tuning. speed scales playback: 100 uses the recorded delays, 200 halves them. Pass { ignore_mouse = true } to Macro.Record to record keystrokes only. Macro.Stream(macro) moves supported playback to the device; it does not make host-recorded timing exact. The recorded action format and the macro transforms (Math.Scale, Math.Resample) are in the SDK reference.

Scroll to zoom

Hold a modifier and scroll to zoom in browsers, editors, and image viewers: the standard Ctrl + scroll gesture, bound to any key you prefer.
Tuning. Change modifier to any key. To slow the zoom, scale delta before passing it to HID.Scroll (for example, HID.Scroll(delta // 2)). Returning false swallows the original scroll so only the zoom fires.

Set your mouse output rate

Capture raw mouse movement, accumulate its deltas, and request a maximum flush rate. mouse_block=true hands OnMove control of every event (this requires a Rebind device), and OnTick decides when to flush accumulated motion. Tick and host scheduling can delay a flush.
Tuning. rate is the requested maximum flush rate in Hz. Lower it to coalesce more movement. The script preserves the sum of deltas it receives, but integer transport limits and delayed ticks can still affect the observed path and cadence. tick_rate is an engine cadence, not an exact output clock. See the scripting guide.

Mouse acceleration

Add a speed-dependent acceleration curve to any mouse: slow movements stay close to 1:1 for precision, fast flicks get multiplied so you cross the screen with less travel. mouse_block=true hands OnMove every raw event (requires a Rebind device), so the script rescales each delta and re-emits it with HID.Move. Curve, threshold, and ceiling are all live in the config panel.
Tuning. curve controls how aggressively the multiplier ramps once a movement passes threshold: Linear is gentle, Exponential is sharp. multiplier caps the fastest flicks; sensitivity scales everything, slow moves included. Anything under threshold px stays at base sensitivity for pixel-precise aiming, and the bound key toggles the whole effect on the fly.