Skip to main content
This page follows one event from capture to output, then shows where software mode and hardware mode differ along the way. Your scripts run on your computer in both modes; the mode decides where input is captured and how the result is sent.

Capture, script, output

  1. Capture. Rebind reads each key press, button, scroll, and mouse move.
  2. Script. The event runs your handlers: rb.on handlers, rb.bind bindings, and the tick loop. A handler can swallow the event and send something else with rb.hid.
  3. Output. What gets through, plus what scripts send, reaches your computer as ordinary input.
You write and run scripts in the Rebind app; see the quickstart.

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 move handler or mouse_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 nil for the device, and a per-device rb.bind never fires.
  • Game controllers need hardware mode and a Rebind Link whose USB profile includes a joypad or the Xbox controller. That covers the Pad button names, axis handlers, rb.input.axis and rb.hid.axis, which need min_sdk=3.11.0, and rb.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 nil for its device, and Caps Lock, Fn and the media keys stay with macOS.
Horizontal scrolling, from a tilt wheel or a horizontal wheel, never reaches scripts and arrives at your computer unchanged. In hardware mode that needs Rebind 3.12.0 and Link firmware 4.0.3; earlier versions drop it. On macOS in software mode, a diagonal trackpad scroll is one event: when a script blocks its vertical scroll, the horizontal part is blocked with it.

Safety

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