Skip to content

Hold mode and keyboard key repeat on the same engine #78

Closed

Description

@TMHSDigital

Why it matters

Two adjacent capabilities come up constantly with autoclicker users and would broaden who the app serves without changing its character:

  • Hold mode: press and hold a mouse button for a set duration (or until stopped), for apps that react to long presses, drag-to-charge mechanics, or keeping a button pressed for testing.
  • Key repeat: repeat a keyboard key or short combo on the same interval/burst/limit engine (refresh with F5, press Space every N seconds, keep a session alive).

Rationale

  • The engine's timing, limits, runaway guard and stop paths are input-agnostic; only _perform_click is mouse-specific.
  • PyAutoGUI already provides mouseDown/mouseUp and press/hotkey.
  • Safety detail that must be designed in: every stop path must release a held button or key (mouseUp/keyUp in the loop's finally), including emergency stop and failsafe.

Suggested approach

  1. Introduce an "action" setting: click (today), hold (duration ms), key (key string, validated like hotkeys, refusing the app's own hotkeys).
  2. Implement each as a small strategy used by _perform_burst, keeping one RunOutcome per run.
  3. UI: an "Action" row in Click Settings; hide irrelevant fields per action.
  4. Tests: held input is always released on every stop reason.

Done when

  • A user can hold the left button for 2 s every 5 s, or press F5 every 30 s, with all existing stop paths and limits working, and no button or key left pressed after any stop.

Activity

  1. added
    enhancement
    priority: low
    feature
    on Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementfeaturepriority: low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions