You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Corner failsafe is not checked during a Hold (up to 60 seconds) #82
The README promises the corner failsafe works "before every click" on every monitor. With the Hold action (#78) a single "click" can last up to 60 seconds, and during that time the corner failsafe is not checked at all. A user who slams the mouse into a corner mid-hold sees nothing happen until the hold ends, which is exactly when an escape hatch matters most.
Evidence
autoclicker/core/click_engine.py:710-716 (_hold): presses the button, then blocks in self._stop_event.wait(timeout=self._hold_ms / 1000).
The multi-monitor corner check (_cursor_in_failsafe_corner, click_engine.py:734) only runs at the start of _perform_click, so it is skipped for the whole hold.
PyAutoGUI's own failsafe only checks the primary monitor, and only when mouseUp is called at the end.
MAX_HOLD_MS = 60_000 (settings_manager.py:89).
The emergency hotkey and Stop still work during a hold (they set _stop_event); only the corner gesture is dead.
Suggested approach
Replace the single wait with a short loop, e.g. every 50 ms: if _stop_event is set, return; if _cursor_in_failsafe_corner(...), release the button and raise SafetyError. Keep the existing finally release.
Add tests: a long hold ends with STOP_SAFETY and exactly one mouseUp when cursor_position reports a corner partway through.
Done when
Slamming into any monitor corner during a hold releases the button and stops the run within about 50 ms, with the usual "Failsafe" status and one session-log stop line.
Activity