Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Quickstart

Rebind is a programmable input platform. Your keyboard and mouse pass through a small runtime, every event runs through your code, and the result is sent on as standard input. The runtime is Luau (a fast, typed Lua) on a Rust core, dispatching hooks at up to 8,000 Hz.

You can start free, with no hardware. Install, run a script in software mode, and have a working remap in a few minutes. This page gets you there.

Install or update

Re-run this any time to update in place to the latest build.

Windows — open PowerShell as Administrator and paste:

irm https://rebind.gg/install.ps1 | iex

macOS / Linux — open Terminal and paste:

curl -fsSL https://rebind.gg/install.sh | sh

Attach your devices

For Rebind to transform your input, route your keyboard and mouse through it — the same step in software mode and with hardware.

  1. Open the Rebind UI and go to the Devices tab.
  2. Click Auto-Detect to find your keyboard and mouse.
  3. Click Attach All.

Your input now passes through Rebind before reaching the system. Detach any time to restore normal operation.

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:

--[[
  rebind: min_sdk=3.0.0
  rebind: name=CapsLock to Escape
--]]

Bind.Remap("CapsLock", "Escape")

Click Save, then Run. Press CapsLock — your system receives Escape.

Where scripts live. The Scripts tab edits real .lua / .luau files on disk, in your Rebind scripts folder:

  • Windows%APPDATA%\Rebind\scripts
  • macOS~/Library/Application Support/Rebind/scripts
  • Linux~/.local/share/Rebind/scripts

Subfolders are fine for organization, edits made in an external editor are picked up live, and require() resolves modules relative to a script’s own folder.

How it reads:

  • The --[[ rebind: … --]] block at the top is the modeline — the script’s configuration, one rebind: line per setting. (A terse single-line -- rebind: key=value form works too, but the block reads cleaner as scripts grow.)
  • min_sdk is required. It’s the minimum Rebind version the script needs, and the relay refuses to run any script whose modeline doesn’t declare it. Use a version no newer than your installed build — these examples use 3.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.

If you prefer to act on the keypress yourself rather than declare a remap, handle the OnDown hook directly. It fires on every key press with the key name, and returning false blocks the original key from passing through:

--[[
  rebind: min_sdk=3.0.0
  rebind: name=CapsLock to Escape
--]]

function OnDown(key)
  if key == "CapsLock" then
    HID.Down("Escape")
    HID.Up("Escape")
    return false
  end
  return true
end

Bind.Remap is the shorter path for a one-to-one remap; OnDown gives you room to add conditions and logic.

Kill switch

Press Left 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.