> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rebind.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Key reference

> The names scripts use for every key, mouse button, and controller button and axis.

Handlers receive keys by the names in the **Name** column, and binds and
`rb.input` match those names. Names a script passes to `rb` ignore case:
`rb.bind("f1", fn)` binds F1. The **Also accepted** names work for `rb.hid`
output; a bind on an alias such as `"Return"` never fires.

## Letters and digits

`A` to `Z`, `0` to `9`.

## Function keys

`F1` to `F24`.

## Mouse buttons

| Button | Name |
| - | - |
| Left | `Mouse1` |
| Right | `Mouse2` |
| Middle | `Mouse3` |
| Back | `Mouse4` |
| Forward | `Mouse5` |

`WheelUp` and `WheelDown` name one step of the wheel as a [bind](https://docs.rebind.gg/reference/sdk/bind.md) trigger
only; send the wheel with `rb.hid.scroll`.

## Controllers

**Needs:** `min_sdk=3.11.0`.

Rebind captures game controllers in hardware mode when the Link's
[USB profile](https://docs.rebind.gg/getting-started/hardware-setup.md#change-the-usb-identity) includes
a joypad or the Xbox controller, and passes them through to that output, so a
controller keeps working with no script running. Otherwise the controller stays
with the computer and scripts do not see it.
Scripts see its buttons as keys: `down` and `up` events, `rb.bind`,
`rb.bind.remap`, `rb.input.is_down` and `rb.hid.down` all take these names.
Buttons are named by position with Xbox letters, so `PadA` is the bottom face
button on any controller, whatever is printed on it. Every script's `down` and
`up` handlers receive them, so a handler that blocks every key also blocks the
controller's buttons.

| Button | Name | Joypad button |
| - | - | - |
| Bottom, right, left, top face button | `PadA`, `PadB`, `PadX`, `PadY` | 1 to 4 |
| Left and right bumper | `PadLB`, `PadRB` | 5, 6 |
| Left and right trigger, pressed | `PadLT`, `PadRT` | 7, 8 |
| View (Back, Share) and Menu (Start, Options) | `PadView`, `PadMenu` | 9, 10 |
| Left and right stick click | `PadLS`, `PadRS` | 11, 12 |
| Home (Xbox, PS) | `PadHome` | 13 |
| Paddles | `PadP1` to `PadP4` | 14 to 17 |
| D-pad | `PadUp`, `PadDown`, `PadLeft`, `PadRight` | the hat |

`Joy1` to `Joy32` are accepted wherever the Pad names are. Sent with `rb.hid`,
`JoyN` presses joypad button N, so `Joy1` and `PadA` are the same output. An `rb.ui.keybind` field
captures a controller button in hardware mode.

Rebind knows the button positions of wired and dongle Xbox controllers,
DualShock 3, DualShock 4, DualSense and Switch controllers, and of controllers
that present as one of them. Any other controller's buttons are named `Joy1` to
`Joy32` in the order it reports them.

| Axis | Name | Range | Joypad |
| - | - | - | - |
| Left stick | `LeftX`, `LeftY` | -1 to 1, up and left negative | `x`, `y` |
| Right stick | `RightX`, `RightY` | -1 to 1 | `z`, `rz` |
| Left and right trigger | `LT`, `RT` | 0 to 1 | `slider`, `dial` |

A stick within 2% of center, or within the controller's own dead zone when that
is larger, reads 0. Several controllers share the one joypad the way two
keyboards share keys: a button stays down while any controller holds it, and an
axis follows whichever controller moved it last. A controller that leaves
releases what it alone held and returns its axes to rest.

Limits: Rebind Link's joypad is a standard HID gamepad, so games that read only
XInput do not see it. On Windows, put the Xbox controller in the Link's USB
profile instead (firmware 4.1.0 or later); XInput games see that one. The
Xbox controller output works on Windows only, and the paddles `PadP1` to
`PadP4` have no Xbox control. Rumble, motion sensors and touch position are not
passed through (a DualShock 4 or DualSense touchpad click
arrives as `Mouse1`), and the macro recorder does not record controllers. A
macro action can press a controller button by `code`; such a macro plays on the
host.

## Modifiers

| Key | Name | Also accepted |
| - | - | - |
| Left Ctrl | `LCtrl` | `Ctrl`, `Control` |
| Right Ctrl | `RCtrl` | |
| Left Shift | `LShift` | `Shift` |
| Right Shift | `RShift` | |
| Left Alt, Option | `LAlt` | `Alt`, `Opt`, `Option` |
| Right Alt | `RAlt` | |
| Left Windows, Command | `LWin` | `Win`, `Windows`, `GUI`, `Meta`, `LMeta`, `Command`, `Cmd` |
| Right Windows, Command | `RWin` | `RGui`, `RMeta` |

In bind chords, `Ctrl`, `Shift`, `Alt` and `Win` match either side and the
side names such as `LCtrl` match one side. A bind refuses the other modifier
aliases, such as `Cmd+C`.

## Editing and navigation

| Key | Name | Also accepted |
| - | - | - |
| Enter | `Enter` | `Return` |
| Escape | `Escape` | `Esc` |
| Backspace | `Backspace` | |
| Tab | `Tab` | |
| Space | `Space` | |
| Caps Lock | `CapsLock` | |
| Insert | `Insert` | |
| Delete | `Delete` | `Del` |
| Home | `Home` | |
| End | `End` | |
| Page Up | `PageUp` | `PgUp` |
| Page Down | `PageDown` | `PgDn` |
| Arrows | `Up`, `Down`, `Left`, `Right` | |

## System

| Key | Name | Also accepted |
| - | - | - |
| Print Screen | `PrintScreen` | `Print`, `PrtSc`, `PrintScr` |
| Scroll Lock | `ScrollLock` | |
| Pause | `Pause` | `Break` |
| Menu | `Menu` | `App`, `ContextMenu` |
| Num Lock | `NumLock` | |

## Punctuation

The physical key, whatever the shift state.

| Key | Name | Also accepted |
| - | - | - |
| `-` | `Minus` | |
| `=` | `Equal` | `Equals` |
| `[` | `LeftBrace` | `LeftBracket`, `LBracket` |
| `]` | `RightBrace` | `RightBracket`, `RBracket` |
| `\` | `Backslash` | |
| `;` | `Semicolon` | |
| `'` | `Apostrophe` | `Quote` |
| `` ` `` | `Grave` | `Backtick`, `Tilde` |
| `,` | `Comma` | |
| `.` | `Period` | `Dot` |
| `/` | `Slash` | |
| The extra key beside Left Shift on ISO keyboards | `IntlBackslash` | input only |

## Numpad

| Key | Name | Also accepted |
| - | - | - |
| `/` | `KpDivide` | `NpDivide` |
| `*` | `KpMultiply` | `NpMultiply`, `KpAsterisk` |
| `-` | `KpMinus` | `NpSubtract` |
| `+` | `KpPlus` | `NpAdd` |
| Enter | `KpEnter` | `NpEnter` |
| `.` | `KpDot` | `NpDecimal`, `NpDot` |
| 0 to 9 | `Kp0` to `Kp9` | `NP0` to `NP9`, `Numpad0` to `Numpad9` |

## Media keys

| Key | Name | Also accepted |
| - | - | - |
| Next track | `MediaNext` | `MediaNextTrack` |
| Previous track | `MediaPrev` | `MediaPrevTrack` |
| Stop | `MediaStop` | |
| Play or pause | `MediaPlay` | `MediaPlayPause` |
| Volume up | `VolumeUp` | `VolUp` |
| Volume down | `VolumeDown` | `VolDown` |
| Mute | `VolumeMute` | `Mute` |

Media keys cannot be sent as `usage:N` or played by `rb.macro.stream`.

## Transport key support

Key names are USB HID usages, not characters; the active keyboard layout decides
which character a usage produces.

* In software mode, `rb.hid.type` hands text to the operating system's
  output.
* On Rebind Link, the Link types each ASCII character as the key and
  modifiers a US layout uses for it, and skips characters that map has no key
  for. A computer set to another layout turns those keys into its own
  characters.

For arbitrary Unicode use
[`rb.system.type_text`](https://docs.rebind.gg/reference/sdk/system#rb-system-type_text), or
`rb.clipboard.set` and the paste chord. Test layout-sensitive scripts on each
target layout and output.

## Delivered keys

Software mode delivers letters, digits, F1 to F12, modifiers, editing,
navigation, punctuation and numpad keys. F13 to F24, `Menu`, `IntlBackslash`,
and media and volume keys arrive only in hardware mode. Every name on this page
except `IntlBackslash` can be sent with `rb.hid`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.