# Mouse Back Button

## Symptom

The mouse Back side button did not work while controlling another Mac.

## Root Cause

Electron reports side buttons as extra mouse button numbers, typically `3` for Back and `4` for Forward. `app.js` only recognized left, right, and middle, so button `3` fell through to `left`. The native CoreGraphics mouse sender also mapped anything other than right or middle back to left, so the side-button identity was lost on both the sending and receiving sides.

## Fix

`app.js` now maps button `3` to `back` and button `4` to `forward`, tracks those buttons while held, and guards the robotjs fallback if it cannot synthesize extra buttons. `native/openmouse-mousesend.m` now posts Back/Forward as `kCGEventOtherMouseDown/Up/Dragged` with button numbers `3` and `4`.

## Evidence

Verification run:

```text
node --check app.js
node --check app-ui/renderer.js
git diff --check
npm run build:keytap
```

## Status

DONE_WITH_CONCERNS: compiled and statically verified, but not live-tested with a side-button mouse in a remote control session.
