Capture, script, output
- Capture. Rebind reads each key press, button, scroll, and mouse move.
- Script. The event runs your handlers:
rb.onhandlers,rb.bindbindings, and thetickloop. A handler can swallow the event and send something else withrb.hid. - Output. What gets through, plus what scripts send, reaches your computer as ordinary input.
Software vs hardware
Rebind is free. Software mode needs no extra hardware. Rebind captures input through operating system hooks and sends output through the operating system’s input APIs:SendInput on Windows and CGEvent on macOS.
Hardware mode sends output from a Rebind Link
as real USB HID, so your computer sees an ordinary keyboard and mouse. The
keyboards, mice, and game controllers you attach in Peripherals are forwarded
into an isolated capture environment, a small virtual machine, before their
events reach your scripts. Switching to hardware mode needs a signed-in account
and an activated Link; see Hardware Setup.
Scripts use the same runtime in both modes. These things depend on the mode:
- Transforming mouse movement, with a
movehandler ormouse_block=true, needs hardware mode; Rebind refuses to start such a script in software mode. Key, button, and scroll blocking work in both. - Software mode cannot tell devices apart: input handlers receive
nilfor the device, and a per-devicerb.bindnever fires. - Game controllers need hardware mode and a Rebind Link whose USB profile
includes a joypad or the Xbox controller. That covers the
Padbutton names,axishandlers,rb.input.axisandrb.hid.axis, which needmin_sdk=3.11.0, andrb.hid.joypad. In software mode no controller input arrives, and joypad output raises. See Controllers. - In hardware mode, on Windows and macOS, only the devices you attach in
Peripherals reach scripts. A laptop’s built-in keyboard and trackpad do not.
On macOS, Built-in keyboard in Settings adds the Mac’s own keyboard: its
keys then go out through the Link, so a modifier held on it applies to what
scripts send. Input handlers receive
nilfor its device, and Caps Lock, Fn and the media keys stay with macOS.
Safety
PressLeft Ctrl + Left Alt + K (Left Control + Left Option + K on macOS)
to stop every script and release every held key and button. In hardware mode,
press it on a keyboard you attached in Peripherals, or on the Mac’s own
keyboard when Built-in keyboard is on. See the
kill switch.
Scripts from the marketplace or a share run only within what you allowed. See
Permissions.
Next, check Platforms for what your operating system
supports, then read the Scripting Guide.