{name}
+{summary(binding)}
+diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000..3014e3b1
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,4 @@
+# Tauri regenerates these on every dev build; pin them to LF so a Windows
+# checkout with core.autocrlf does not report them as modified.
+src-tauri/permissions/autogenerated/*.toml text eol=lf
+src-tauri/gen/** text eol=lf
diff --git a/docs/point-scan.md b/docs/point-scan.md
index 1d54dead..7a0ea5fe 100644
--- a/docs/point-scan.md
+++ b/docs/point-scan.md
@@ -2,9 +2,9 @@
Point scan ports the Android line-only and grid-then-line techniques to Switchify PC. The reference source is `switchifyapp/switchify-android` commit `856720d8747e2f3d1724a572bf754ffae05df299`, especially `PointScanLineManager`, `PointScanBlockManager`, and `ContinuousLineSpeedUtils`.
-Open **Settings → Scanning**, choose automatic or manual scanning, and enable it. Local keyboard-emulating switch interfaces can use Space to select, Enter to step forward, Backspace to step backward, and F8 to pause or resume. The four keys can be changed. Escape always disables scanning and releases the reserved keys. Scanning is off at every application startup.
+Open **Settings → Switches** to add named keyboard switches and assign normal and hold actions. Then enable scanning in **Settings → Scanning**. Fresh installs have no assignments; old point-scan keys migrate once. See [switch assignments](switches.md). Scanning stays off at startup.
-Focus the intended application and press Select to start. Line mode chooses X, then Y, and clicks once. Grid mode chooses a row, then a cell, before the same line sequence. Selecting happens on switch release; holding Select freezes the position and repeat keydowns do not select again. The scan resets after a click and waits for the next Select. Movement wraps at the selected region's edges. Android's five speeds are 45, 75, 120, 180, and 270 logical units per second, with delayed ticks capped at 250 ms.
+Focus the intended application and press Select to start. Line mode chooses X, then Y, and clicks once. Grid mode chooses a row, then a cell, before the same line sequence. Selecting happens on switch release; holding any switch freezes the position and repeat keydowns do not select again. The scan resets after a click and waits for the next Select. Movement wraps at the selected region's edges. Automatic movement stops after three full passes of the current phase without a selection; the scan resets and waits for the next Select. Manual steps never trigger this limit, and each Select starts a fresh count for the next phase. Android's five speeds are 45, 75, 120, 180, and 270 logical units per second, with delayed ticks capped at 250 ms.
The scan uses the monitor under the pointer when it starts. Windows uses native physical coordinates and display scaling; macOS uses Core Graphics display units and converts overlay rectangles to AppKit coordinates. A monitor geometry change cancels scanning. Native overlay strips are topmost, click-through, and nonactivating. The pointer moves only for the final click.
@@ -12,15 +12,15 @@ This first port uses switches attached to the computer. Android must be disconne
Changes save automatically, including when you leave Settings. Enabling waits for pending saves; a failed save keeps your edits and offers Retry save. Configuration is locked while scanning is enabled. Navigating away does not stop scanning.
-The engine is independent of OS input. Activation uses the existing `InputInjector` adapter. Automated tests use a fake adapter and never move the real pointer. The Tauri global-shortcut plugin supplies global press/release events on both platforms; the existing dependencies did not include a switch-key listener. Only the main window can configure scanning through IPC.
+The engine is independent of OS input. Activation uses the existing `InputInjector` adapter. Automated tests use a fake adapter and never move the real pointer. Switchify's local `switch_input` adapter supplies press/release events on both platforms. See `switches.md` for Windows capture limitations. Only the main window can configure scanning through IPC.
Manual validation should cover both modes, every speed, manual movement, holding and releasing switches, Escape, focus retention, display changes, mixed scaling, a Bluetooth connection during scanning, and application exit. Run macOS input checks through `npm run macos:run` to retain the stable Accessibility identity. No physical switch or real desktop input is exercised by automated tests.
## Reusing scanning in Switchify PC
-`scanning.rs` is the pure shared core. `Session
+ On Windows, use switch keys without Shift, Ctrl, Alt or Windows held. + Key releases can still reach other applications. +
{state?.enabled
@@ -109,7 +102,7 @@ export function ScanningSection({
Assign switch actions in the Switches tab. All actions run on release. Holding a switch freezes movement. After clicking, or after three passes without a selection, use Select to start again.
- Select takes effect on release. Holding Select freezes scanning.
- Forward and Backward step once and set direction. After clicking,
- press Select to start again.
-
+ Learning the key for {name}. Nothing else responds until a key is
+ learned. Press Escape to cancel, or click Cancel capture with the
+ mouse.
+
+ {pending
+ ? "Saving switches..."
+ : unsaved
+ ? "Switch assignments have unsaved changes."
+ : locked
+ ? "Disable scanning to change switches."
+ : "Changes save automatically."}
+
+ Automatic scanning needs a Select switch. Manual scanning also
+ needs Next and Previous.
+ {summary(binding)}
+ {draft.key
+ ? "Name it and choose its actions, then save."
+ : "Learn its key first."}
+
+ The first action appears after one interval and the next after
+ each further interval. The last action stays offered. Holding any
+ switch for {seconds(escapeMs)} disables switch control.
+ Press and release your switch
+ No switches yet
+ {name}
+ New switch
+