Skip to content

A Python script that automatically presses a specified key (default 'r') after 10 seconds of inactivity. It detects user input to reset the timer and prevent automated key presses. Easily customizable for different keys.

License

Notifications You must be signed in to change notification settings

A-cute-blob/constant-key-presser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Auto Keyboard Presser with Inactivity Timer

This script automatically detects user input and presses a key (default: 'r') every 0.5 seconds after 10 seconds of inactivity. The key pressed upon inactivity can be easily customized.

Features

  • Inactivity Timer: A 10-second countdown begins after no user input is detected.
  • Auto Typing: Once the countdown finishes, the script will simulate pressing the 'r' key every 0.5 seconds.
  • Real-Time Input Detection: Any detected keypress will reset the inactivity timer and prevent the automated typing.

How It Works

  • keypress(): This function runs in a separate thread and monitors for inactivity. If no user input is detected for 10 seconds, it starts typing 'r' every 0.5 seconds.
  • detect_input(): This function constantly detects keyboard input and resets the inactivity timer when the user presses a key. It ensures that 'r' typed by the script is ignored during detection.

Installation

  1. Install the required keyboard library:
    pip install keyboard

About

A Python script that automatically presses a specified key (default 'r') after 10 seconds of inactivity. It detects user input to reset the timer and prevent automated key presses. Easily customizable for different keys.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages