Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion docs/BUTTON_MAPPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,29 @@ sequential after G1).
The D-pad reports as a hat switch (`ABS_HAT0X` / `ABS_HAT0Y`), not as four
buttons - diagram callout "D".

Indices 12 to 20 are gaps in the HID descriptor (unused).
## RS H-Shifter (046d:c26b)

### Connected to the Wheel Base

When connected to the wheel base accessory port (sub-device 03), gears 1 to 7 and Reverse report on DirectInput button indices 12 to 19 (hardware-verified 2026-10-29). Index 20 is unused.

| Index | Button / Gear | evdev Code | Wire bitmask (Report 0x08) |
|---|---|---|---|
| 12 | RS H-Shifter: Gear 1 | `0x12c` (`BTN_BASE`) | Byte 2 bit 0 (`0x01`) |
| 13 | RS H-Shifter: Gear 2 | `0x12d` (`BTN_BASE2`) | Byte 2 bit 1 (`0x02`) |
| 14 | RS H-Shifter: Gear 3 | `0x12e` (`BTN_BASE3`) | Byte 2 bit 2 (`0x04`) |
| 15 | RS H-Shifter: Gear 4 | `0x12f` (`BTN_BASE4`) | Byte 2 bit 3 (`0x08`) |
| 16 | RS H-Shifter: Gear 5 | `0x2c0` (`BTN_TRIGGER_HAPPY1`) | Byte 2 bit 4 (`0x10`) |
| 17 | RS H-Shifter: Gear 6 | `0x2c1` (`BTN_TRIGGER_HAPPY2`) | Byte 2 bit 5 (`0x20`) |
| 18 | RS H-Shifter: Gear 7 | `0x2c2` (`BTN_TRIGGER_HAPPY3`) | Byte 2 bit 6 (`0x40`) |
| 19 | RS H-Shifter: Reverse | `0x2c3` (`BTN_TRIGGER_HAPPY4`) | Byte 3 bit 0 (`0x01`) |
| 20 | Unused | `0x2c4` (`BTN_TRIGGER_HAPPY5`) | - |

### Connected Directly to PC via USB

When connected directly to the PC via USB (`046d:c26b Logitech RS H-Shifter`), it enumerates as an independent joystick reporting 8 digital buttons:
- Buttons 0 to 6 (`0x120`..`0x126`): 1st through 7th gear
- Button 7 (`0x127`): Reverse (R)

## G923

Expand Down
15 changes: 14 additions & 1 deletion docs/PROTOCOL_SPECIFICATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ The RS50 presents **3 HID interfaces** to the host:
Offset Size Type Description
------ ---- ---- -----------
0-1 2 uint16 Button bitmask, buttons 0-15 (little-endian)
2-3 2 - Button bitmask high bytes (byte 3 bit 7 = G button; otherwise 0)
2-3 2 - Button bitmask high bytes (Byte 2: RS H-Shifter Gears 1-7; Byte 3 bit 0: Reverse, bit 7: G button)
4-5 2 uint16 Wheel position (little-endian)
6-7 2 uint16 Accelerator pedal (little-endian)
8-9 2 uint16 Brake pedal (little-endian)
Expand Down Expand Up @@ -108,9 +108,22 @@ Button state is encoded in bytes 0-3 of the input report.
| 6 | `0x40` | **LB** (Left Bumper) |
| 7 | `0x80` | **RB** (Right Bumper) |

**Byte 2 (RS H-Shifter, Sub-Device 03):**
| Bit | Mask | Button |
|-----|--------|--------|
| 0 | `0x01` | **Gear 1** |
| 1 | `0x02` | **Gear 2** |
| 2 | `0x04` | **Gear 3** |
| 3 | `0x08` | **Gear 4** |
| 4 | `0x10` | **Gear 5** |
| 5 | `0x20` | **Gear 6** |
| 6 | `0x40` | **Gear 7** |
| 7 | `0x80` | Unused |

**Byte 3:**
| Bit | Mask | Button |
|-----|--------|--------|
| 0 | `0x01` | **Reverse (RS H-Shifter)** |
| 7 | `0x80` | **G Button** (Logitech logo) |

### D-pad Encoding (Byte 0 low nibble, bits 0-3) - standard HID hat
Expand Down
20 changes: 14 additions & 6 deletions docs/SYSFS_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -992,12 +992,20 @@ Include this output in bug reports - firmware-dependent behaviour
**Access**: Read-only
**Values**: accessory device name, or `none`

Presence signal for the **RS Shifter & Handbrake**, an optional accessory
that plugs into the base's USB-A port. Reports the accessory's own HID++
device name when one is discovered at probe time, or `none` when absent.
Unlike the pedal/handbrake attributes below, this never returns an error:
it exists precisely so apps can check for the accessory without inferring
presence from another attribute's error code.
Presence signal for the base's optional accessories: the **RS Shifter &
Handbrake** and the **RS H-Shifter**, which plug into the base's USB-A
ports. Reports the RS Shifter & Handbrake's own HID++ device name, or
`RS H-Shifter`, or `none` when neither is attached. With both attached it
names the RS Shifter & Handbrake. Unlike the pedal/handbrake attributes
below, this never returns an error: it exists precisely so apps can check
for an accessory without inferring presence from another attribute's error
code.

Both accessories are found at probe time and re-checked on demand: a read
queues a presence re-check in the background, so an accessory plugged in or
pulled after the module loaded shows up within a few reads. An RS H-Shifter
that arrives this way in desktop mode gets its gate routing enabled at the
same time, as it would have at probe.

```bash
cat wheel_accessory
Expand Down
Loading
Loading