For all my corporate slackers on Teams - an AHK script to keep your status from going away.
A lightweight AutoHotkey script that simulates subtle mouse movements to prevent your computer from going idle. Perfect for keeping your Teams status active while away from your desk.
- Simple toggle with F12 key
- Subtle, randomized mouse movements (±5 pixels)
- Minimal CPU usage
- System tray notifications on enable/disable
- No dependencies beyond AutoHotkey
- AutoHotkey v2.0 or later (Download here)
- Download or clone this repository
- Ensure AutoHotkey v2.0 is installed on your system
- Double-click mouse_jiggler.ahk to run the script (or create a shortcut for convenience)
- The script will appear in your system tray
Press F12 to enable or disable the mouse jiggler. You'll see a notification in your system tray confirming the status.
Once enabled, the script:
- Captures your current mouse position every 500ms
- Moves the cursor by a random offset (±5 pixels)
- Immediately returns it to the original position
- The movement is subtle enough to prevent idling without interfering with your work
By default, the script uses F12. To use a different key, replace the hotkey at line 9:
F12::
Use any of these valid keys:
- Function keys: F1, F2, F3, etc.
- Letter keys: A, B, C, etc. (or with modifiers: Ctrl+A, Alt+F)
- Number keys: 1, 2, 3, etc.
- Other keys: Delete, Insert, Home, End, etc.
Examples:
F1:: ; Use F1 instead
Ctrl+J:: ; Use Ctrl+J
Delete:: ; Use Delete key
The script moves the mouse every 500 milliseconds by default. To adjust this:
SetTimer(jigglerTimer, 500) ; Change 500 to your preferred interval (milliseconds)
- Lower values = more frequent movements (e.g., 300ms)
- Higher values = less frequent movements (e.g., 1000ms)
The script moves the cursor by ±5 pixels by default. To increase or decrease the movement amplitude:
randomX := Random(-5, 5) ; Change 5 to your preferred range (in pixels)
randomY := Random(-5, 5) ; Both should match for consistent behavior
- The script runs with #SingleInstance Force, so only one instance can run at a time
- Your mouse position is fully restored after each jiggle
- Works on Windows only (AutoHotkey v2.0 limitation)