Install or update
Re-run this any time to update in place to the latest build. Windows — open PowerShell as Administrator and paste:Attach your devices (hardware mode only)
For hardware mode, route your keyboard and mouse into the sealed VM so Rebind can capture their raw input. (In software mode, Rebind captures input via OS event hooks automatically — no device attachment needed.)- Open the Rebind UI and go to the Devices tab.
- Click Auto-Detect to find your keyboard and mouse.
- Click Attach All.
Your first script
Here is a complete script that remaps CapsLock to Escape. Open the Rebind UI, go to the Scripts tab, click Create, and paste it:Where scripts live. The Scripts tab edits realHow it reads:.lua/.luaufiles on disk, in your Rebind scripts folder:Subfolders are fine for organization, edits made in an external editor are picked up live, and
- Windows —
%APPDATA%\Rebind\scripts- macOS —
~/Library/Application Support/Rebind/scripts- Linux —
~/.local/share/Rebind/scriptsrequire()resolves modules relative to a script’s own folder.
- The
--[[ rebind: … --]]block at the top is the modeline — the script’s configuration, onerebind:line per setting. (A terse single-line-- rebind: key=valueform works too, but the block reads cleaner as scripts grow.) min_sdkis required. It’s the minimum Rebind version the script needs, and Rebind refuses to run any script whose modeline doesn’t declare it. Use a version no newer than your installed build — these examples use3.0.0; a script asking for a newer version than your build is refused until you update.name=is the script’s display name. Every other modeline key is optional — see the SDK reference for the full list.Bind.Remap(from, to)takes two key names: the key you press and the key that’s sent instead. It installs the remap for as long as the script runs.
OnDown hook directly. It fires on every key press with the key name, and returning false blocks the original key from passing through:
Bind.Remap is the shorter path for a one-to-one remap; OnDown gives you room to add conditions and logic.
Kill switch
PressLeft Ctrl + Left Alt + K at any time to immediately stop all scripts and release every held key, restoring normal keyboard and mouse behavior. (The kill switch is the left-hand modifiers specifically — right Ctrl / right Alt don’t trigger it.) Keep it in mind whenever you run a script that blocks input.