Rebind sits between your keyboard and mouse and your operating system. Input passes through the Rebind Engine on your PC, where your scripts decide what gets through, what gets blocked, and what gets transformed. With Rebind Link attached, the resulting output reaches your PC from dedicated hardware as standard USB HID.
This guide covers setup through your first working script. It follows the Rebind Link path on Windows; Rebind also runs without hardware in software mode.
What you need
- Windows 10 or 11 (64-bit)
- The free Rebind download
- A Rebind account
- Your existing USB mouse and keyboard
- A Rebind Link (optional; this guide uses one)
Installation
- Download the installer from rebind.gg
- Run it. It sets up all required components.
- Plug in your Rebind Link
- Launch Rebind from the Start Menu or desktop shortcut
On first launch, Rebind asks you to sign in to your Rebind account, then opens the Rebind UI.
Attaching your devices
Rebind captures your physical mouse and keyboard so their input reaches your scripts before it reaches applications.
With the Link plugged in, Rebind detects it and asks for the activation code printed on the welcome card in the box. Enter it and press Activate. Then:
- Go to the Peripherals tab
- Your keyboard and mouse are detected and listed automatically
- Click Attach on each device you want routed through Rebind
Once attached, your input flows through Rebind. Press Left Ctrl + Left Alt + K at any time to stop all scripts and release all held keys. This is your kill switch.
Your first script
Scripts are written in Luau, a fast, typed variant of Lua developed by Roblox. If you have used Lua, you already know it. If not, it is one of the shortest languages to learn.
- Go to the Scripts tab in the Rebind UI
- Click New and choose New script
- Paste the following:
-- rebind: min_sdk=3.0.0
-- rebind: name=Hello World
function OnStart()
Log.Info("Hello from Rebind!")
end
function OnDown(key)
Log.Info("Pressed: " .. key)
return true
end
function OnUp(key, duration)
Log.Info("Released: " .. key .. " (held " .. duration .. "ms)")
return true
end
- Click Save, then Run
- Open the Logs tab. Every key you press and release appears there in real time.
How it works
The three functions above are hooks. The Rebind Engine calls them when events arrive from your captured devices.
OnStart(): runs once when the script loadsOnDown(key): fires when a key or mouse button is pressedOnUp(key, duration): fires when it is released, with how long it was held in millisecondsreturn true: pass the input through unchangedreturn false: swallow the input; the OS never receives it
That last point is the core of everything. Block the original input, send different input via HID, and you have a remap. The script examples open with the classic, CapsLock remapped to Escape, as a complete script.
Sending output with HID
The HID namespace sends keyboard and mouse output. With Rebind Link, that output ships through the device as standard USB HID:
HID.Down("W") -- hold W down
HID.Up("W") -- release W
HID.Type("Hello!") -- type a string
HID.Move(10, -5) -- move mouse 10px right, 5px up
HID.Scroll(3) -- scroll up 3 notches
Run(function()
HID.Press("Space") -- tap Space
HID.Press("LCtrl+C") -- Ctrl+C
HID.Press("LCtrl+LShift+T") -- Ctrl+Shift+T
end)
HID.Down, HID.Up, HID.Type, HID.Move and HID.Scroll are instant. Call them anywhere, including directly inside a hook.
HID.Press is a tap, so it holds the key for a moment and then releases it. That wait needs a coroutine. HID.Press and HID.Typewriter error if you call them straight from a hook. Wrap them in Run().
Sequences with Run and Sleep
Anything that needs to happen over time goes inside Run(). Sleep() pauses the coroutine without blocking other input:
-- rebind: min_sdk=3.0.0
-- rebind: name=Sequence Demo
Bind("F9", function()
Run(function()
HID.Press("LCtrl+A") -- select all
Sleep(200)
HID.Press("LCtrl+C") -- copy
Sleep(200)
HID.Press("End") -- move to end
Sleep(100)
HID.Press("LCtrl+V") -- paste
end)
end)
Run() launches a coroutine that executes alongside everything else. You can start several at once and they run in parallel.
Targeting specific apps
Add -- rebind: process= to restrict a script to a specific application. The script activates when that process is focused and goes dormant otherwise:
-- rebind: min_sdk=3.0.0
-- rebind: name=Browser Tabs
-- rebind: process=chrome.exe
-- rebind: process=firefox.exe
-- rebind: process=msedge.exe
function OnDown(key)
if key == "Mouse4" then
Run(function()
HID.Press("LCtrl+PageUp") -- previous tab
end)
return false
end
if key == "Mouse5" then
Run(function()
HID.Press("LCtrl+PageDown") -- next tab
end)
return false
end
return true
end
Run() returns immediately, so the hook still returns false and blocks the original button.
You can keep dozens of targeted scripts loaded at once, one for Photoshop, one for your browser, one for each game. Only the script matching the focused window runs.
Next steps
- Browse the in-app marketplace for ready-made scripts, each with a generated settings panel you can adjust without writing code
- Read the Documentation for every available function
- Check the examples for complete scripts from beginner to advanced
- Use RebindGPT to write scripts from a plain-English description