# Desktop controls

The companion receives phone input and passes it to a platform input helper. The helper is a separate process with a narrow message format. The network service does not need to run as an administrator or root.

## Native gamepads

- **macOS:** the CoreHID helper compiles, but the unsigned local test could not create a virtual device. An ad-hoc build requesting the restricted entitlement was also denied. Valid signing/provisioning remains required before claiming native gamepad support.
- **Linux:** the helper uses `/dev/uinput` and compiles as a Linux executable. Device access must be granted through an appropriate local permission rule. Linux runtime behavior has not yet been verified in this workspace.
- **Windows:** each phone appears as an Xbox 360 controller through the ViGEmBus driver, which the app installs in one click (the signed official installer is bundled). Games can rumble the phone. If ViGEmBus is missing, an installed vJoy driver is used instead.

The computer's test lights verify that phone input reaches the companion. **Native gamepad created** is a separate result. A game must still support the resulting device or input mapping.

## Mouse, keyboard and media

A paired phone cannot automatically control the desktop. The owner enables that phone from the companion. Match its controller identity and code with the phone before granting access.

Approval applies to the current connection. Disconnecting, resuming from a different socket or removing the phone clears it. Turning access off releases held controls. Only the locally authenticated owner can grant access.

The current interfaces provide pointer movement, clicks, selected keys and media controls. macOS requires Accessibility permission. Windows input is subject to the operating system's privilege boundaries. The Linux helper currently supports named keys; arbitrary Unicode typing is not implemented and must not be presented as working.

Encrypted native pairing is being completed before production remote system control is enabled. The current local build is not a public internet remote-desktop service.

## Remapping

The companion stores a validated per-seat button map, axis settings and deadzone. It releases the previous state before changing a profile. The SDK has separate action-level mapping for games that integrate it directly.
