Skip to content

foosmith/HoldLeftMouseButton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hold Left Mouse Button 🖱️

A small, free Windows utility that keeps the left mouse button pressed without sustained physical effort. Built as an accessibility helper — for limited grip, hand fatigue, tremor, or one-handed use — but it's equally handy for single-player games and UI testing.

Tap a key to hold the button down; tap again to let go. The button is always released automatically when the app closes, so it can never get stuck.


⚙️ Prerequisite — AutoHotkey v2 (required)

This tool is an AutoHotkey v2 script, so AutoHotkey v2 must be installed once before it can run. It's free, open-source, and lightweight.

Install it one of two ways:

  • Easiest: download from https://www.autohotkey.com/Download v2.0 → run the installer and accept the defaults.
  • Command line (Windows Package Manager):
    winget install --id AutoHotkey.AutoHotkey -e

Once AutoHotkey v2 is installed, Windows knows how to run .ahk files and you can simply double-click the script.

Without AutoHotkey installed, double-clicking HoldLeftMouse.ahk will show "no application associated with this file type." That just means the prerequisite above hasn't been installed yet.


🚀 Getting started

  1. Install AutoHotkey v2 (see prerequisite above).
  2. Download this repository (green Code button → Download ZIP, then unzip) — or clone it.
  3. Double-click HoldLeftMouse.ahk.
  4. A short tooltip appears and a green H icon shows up in your system tray (bottom-right, near the clock). It's now running.

🎮 Controls

Key (default) Mode What it does
F8 Toggle Tap once to hold the left button down; tap again to release.
F7 Momentary Left button is held only while you keep this key pressed.
F9 Panic Instantly releases the button — a safety key.

A small on-screen note and the tray icon tooltip always show whether it's HOLDING or idle.

To stop the app: right-click the green H tray icon → Exit. The mouse button is released automatically on exit.


🔧 Changing the keys

Open HoldLeftMouse.ahk in any text editor and edit the three lines near the top:

ToggleKey    := "F8"
MomentaryKey := "F7"
PanicKey     := "F9"

You can map them to almost any key — or even a mouse side-button — for example "CapsLock", "ScrollLock", or "XButton1". Full list of key names: https://www.autohotkey.com/docs/v2/KeyList.htm

Save the file, then right-click the tray icon → Reload Script.


🏁 Run it automatically at login (optional)

  1. Press Win + R, type shell:startup, and press Enter.
  2. Drop a shortcut to HoldLeftMouse.ahk (or a compiled .exe) into the folder that opens.

It will now start each time you sign in.


📦 Make a standalone .exe (optional)

You can compile the script into a single .exe that runs on any Windows PC without AutoHotkey installed: right-click HoldLeftMouse.ahkCompile Script (or use Ahk2Exe, included with AutoHotkey).


❓ Notes & troubleshooting

  • "No application associated with this file type" → AutoHotkey v2 isn't installed yet. See the prerequisite section.
  • Opens in Notepad instead of running → right-click the file → Open withAutoHotkey Launcher.
  • Works in normal Windows apps and most single-player games. A few games read input at a very low level and may ignore synthetic clicks.
  • Intended for single-player / offline / accessibility use. Automating input in online games with anti-cheat can result in account bans.

📄 License

Released under the MIT License. Free to use, modify, and share.

About

Accessibility helper for Windows: hold the left mouse button without sustained effort (AutoHotkey v2)

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors