Keyboard Hardware Download Rebind

Guides / Scripting

Keyboard macros you can type-check, diff, and hot reload

Rebind scripts are Luau files. Your editor gets types for the whole SDK, rebind check validates a script offline, and rebind run reloads it every time you save.

By the team behind Rebind Sponsored by Rebind
Updated October 2026 / 5 min read

The short answer

Rebind is a free app for Windows and macOS. Your remaps, chords, per-app layers, and shell commands are Luau scripts: plain text files you keep in git.

Download Rebind free Opens the download page. Windows 10 or 11, or macOS 13 or later on Apple Silicon.

1One file, one macro

This is a complete script. Save it as dev-keys.luau, set REPO to one of your repositories, and start it with rebind run dev-keys.luau.

-- rebind: min_sdk=3.9.0 name=dev-keys version=1.0.0 permissions=exec

local REPO = (rb.env.home() or "") .. "/code/my-repo" -- your repository

-- Right Alt (Right Option on a Mac) becomes Escape
rb.bind.remap("RAlt", "Escape")

-- F5 logs git status for REPO without leaving the editor
rb.bind("F5", function()
  rb.run(function()
    local result = rb.system.exec("git status --short", { cwd = REPO, timeout = 10000 })
    if result.exit ~= 0 then
      rb.log.error(result.stderr)
    else
      rb.log.info(result.stdout)
    end
  end)
end)

The first line is the modeline: the script's name, its version, the oldest Rebind it runs on, and its permissions. It asks for exec and nothing else, so a network call from this script would be refused.

rb.bind.remap holds Escape for as long as Right Alt is down. rb.bind takes F5 and leaves every other key alone, and rb.run starts a coroutine so the command runs on a worker thread instead of holding up your input.

2The loop in four steps

  1. Install Rebind

    Download Rebind, free on Windows and macOS. The standard install puts the rebind command on your path.

  2. Give your editor the types

    In VS Code, add the Luau Language Server and point it at Rebind's definition file. Every rb call gets autocomplete, hover docs, and type checking.

  3. Run it while you edit

    rebind run checks the script, loads it, and prints its log lines. Save a change and it checks and reloads. A failing check keeps the last good version running.

  4. Poke at it

    rebind exec 'return rb.input.is_down("Shift")' runs one line inside Rebind. rebind logs streams every script's output, and rebind lint flags definite bugs such as a misspelled global.

Free on Windows and macOS. Your macros stay plain text.

Download Rebind free

3What a script can reach

JobCallNote
Remap a key or chordrb.bind.remap("Mouse4", "LCtrl+V")Holds the target while the key is held
Run code on a hotkeyrb.bind("LCtrl+M", fn)Only the keys you bind are intercepted
Per-app layersprocess= in the modelineActive only while that app has focus
Shell commandsrb.system.execNeeds exec; cmd.exe on Windows, sh on macOS
HTTP, WebSocket, UDPrb.netNeeds net
Files and JSONrb.file, rb.jsonPaths stay inside the script folder
Timersrb.timer.every, rb.sleeprb.sleep works inside rb.run

All of these work the same on Windows and macOS. Screen, window, and app calls differ by platform; the SDK reference lists every call.

4What it won't do

5Other ways to script input

6Questions

Do I need any hardware?

No. Key and button scripts run on the free app with the keyboard and mouse you have. Scripts that change mouse movement or read a controller need a Rebind Link or BYOH.

Can my scripts live in git?

Yes. A script is a text file, and a package is a folder with a rebind.toml. rebind init scaffolds one with a .gitignore.

Does it cost anything?

No. Rebind is free, and writing and running your own scripts needs no subscription.

Your next macro is a text file

Install Rebind, save a .luau file, and run it with rebind run.

Download Rebind free Opens the download page on rebind.gg.