Skip to content

A simple Node.js script that prevents your system from sleeping by simulating periodic Shift key presses.

License

Notifications You must be signed in to change notification settings

MEZ901/StayAwake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

StayAwake

StayAwake is a simple Node.js utility that simulates a Shift key press at regular intervals.

It can be useful in scenarios where you want to prevent your system from going idle during long-running tasks like:

  • Local builds or scripts
  • Long downloads or backups
  • Monitoring dashboards
  • Hardware testing setups

πŸ”§ Features

  • βœ… Simple CLI interface
  • ⌨️ Simulates Shift key press every X seconds or minutes
  • ⏱️ Accepts flexible input like 30s, 2m, or defaults to 60s

πŸš€ Getting Started

1. Install dependencies

npm install

2. Run the script

node index.js

You’ll be prompted to enter how often the Shift key should be pressed.

Example inputs:

  • 30 β†’ 30 seconds
  • 45s β†’ 45 seconds
  • 2m β†’ 2 minutes

If no input is provided, it defaults to 60 seconds.


🧠 Why Shift?

The Shift key is used because it’s a safe and non-destructive key β€” it doesn't alter system state or interfere with ongoing work.


πŸ“¦ Requirements

  • Node.js v12+
  • Basic system permissions to simulate keyboard input

πŸ“„ License

MIT


πŸ™‹β€β™‚οΈ Author

Made with simplicity in mind by MEZ901

About

A simple Node.js script that prevents your system from sleeping by simulating periodic Shift key presses.

Resources

License

Stars

Watchers

Forks

Packages

No packages published