Skip to content
Merged
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
8 changes: 8 additions & 0 deletions docs/point-scan.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,11 @@ Select opens a scanned Home menu, centred on the display under the pointer, when
Home offers Point, Mouse, Keyboard, Apps and windows, Editing, Browser, Media, Switchify and Close menu. Every Home action works without a chosen point, so Home ignores which window is in front: Apps and windows can bring another app forward with switches, and nobody needs to focus an app before scanning. A command chosen in Home, or in a page opened from it, returns to Home. The keyboard opened from Home returns there when closed. Switchify shows the settings window and ends the scan. A point chosen after leaving Home keeps the usual foreground check. Home is also a tile in the Point action menu and Mouse Actions.

Every scanning-menu page ends with a navigation row containing Close menu. Subpages retain Back, the main page retains New point, drag confirmation retains Cancel drag, and Home, which has nothing to go back to, ends with Close menu. Close menu ends the current scan and clears its points, pending selection and parent-page history without issuing desktop input. Select starts a fresh scan afterward. Pages use up to three columns and four rows; native layout scales the entire menu to fit the display. Pause/resume and emergency-stop behavior are unchanged.

## Radar

Radar sits in the middle of the mouse panel's arrows. It hides the panel and sweeps a dotted beam clockwise from straight up, around the pointer where it is now. Select fixes the direction. The beam then grows out from the pointer in that direction towards the edge of the display, and Select moves the pointer to its tip. The panel comes back and carries on as it does after any other mouse action. A drag in progress stays held, so Radar can also drop at a distance.

The beam turns as fast as a point 300 logical pixels out moves at the point speed, and the beam grows at the point speed. Manual mode steps 5 degrees, then 20 logical pixels. Reverse direction turns anticlockwise and starts the beam at full length, shrinking towards the pointer. Automatic mode, direction, pass limit and thickness come from the mouse panel's settings. The beam is drawn in the cursor overlay's colour, so it matches the pointer. Each automatic pass lasts at least one mouse panel interval, so a short beam near an edge is not used up at once. When the pass limit is reached without a choice, when Open Mouse is pressed, or when the display under the pointer changes, the panel comes back without moving the pointer. Escape, Stop, a mobile connection and shutdown end the radar like any other scan.

The beam is up to 32 small squares drawn with the same click-through, nonactivating strips as point scanning, so no full-screen bitmap is drawn. The origin is held in memory only. The pointer moves only with the final absolute move, through the existing input adapter. Automated tests use fake input.
1 change: 1 addition & 0 deletions src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ mod scan_menu;
mod scan_mouse;
mod scan_panel;
mod scan_preferences;
mod scan_radar;
mod scan_tile;
mod scan_tree;
mod scanning;
Expand Down
11 changes: 11 additions & 0 deletions src-tauri/src/overlay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1470,6 +1470,17 @@ mod tests {
}
}

#[test]
fn scanner_colours_match_the_cursor_overlay_colours() {
for name in ["red", "green", "blue", "yellow", "white", "purple"] {
assert_eq!(
crate::scanning::ScannerColor::from_cursor_overlay(name).rgb(),
color_for(name),
"{name}"
);
}
}

#[test]
fn dwell_progress_fills_the_native_countdown_ring() {
let early = render_marker(
Expand Down
3 changes: 3 additions & 0 deletions src-tauri/src/point_scan_runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,9 @@ impl Adapter for PointScan {
settings.scroll_repeat_interval_ms,
settings.mouse_repeat_enabled,
);
technique.set_cursor_color(crate::scanning::ScannerColor::from_cursor_overlay(
&settings.cursor_overlay_color,
));
} else if technique.follows_foreground() {
environment.foreground = crate::scan_host::foreground().ok();
environment.panel = false;
Expand Down
Loading
Loading