AutoHotkey Not Working on Windows 11: UAC and v2

Software

AutoHotkey script window beside Windows 11 accessibility device settings

If an AutoHotkey hotkey stops controlling an app, or a script launches but its keystrokes do nothing, the most common cause is a privilege mismatch: the target app is running as administrator while the script is not. The phrase autohotkey not working windows 11 can also describe a v1 script launched with AutoHotkey v2, or input software that intercepts the device event.

Why this happens

Windows limits how a process with ordinary privileges can interact with an elevated app. AutoHotkey also changed its script syntax between major versions, so a script can fail at launch when paired with the wrong interpreter. Accessibility tools and device utilities may send input through different paths, and another application can capture or remap that input first.

  • UAC integrity levels: a non-elevated script generally cannot send input to an elevated window.
  • Version mismatch: v1 commands and expressions may not parse as v2 syntax.
  • Input interception: eye-tracker, foot-pedal, screen-reader, or vendor software may consume or transform an event before the hotkey sees it.
Likely causeTypical symptomQuick test
Privilege mismatchHotkey works on the desktop but not in one elevated appTest in Notepad, then compare app privilege levels
Wrong AutoHotkey versionScript reports a syntax error or exits on launchCheck the interpreter selected for the script
Device software intercepts inputPhysical key works, but pedal or tracker action does notTemporarily bind the device to a simple key and test

1. Confirm the script runs and identify its version

Double-click the .ahk file and look for the AutoHotkey tray icon near the clock; select the system-tray overflow arrow if it is hidden. Right-click the script and choose Open with to see which AutoHotkey interpreter is associated with it. Check the script's first line for a version directive such as #Requires AutoHotkey v2.0 or #Requires AutoHotkey v1.1. The required version should match the interpreter; a tray icon confirms a running script, but not that its hotkeys work.

2. Match the script's privilege to the target app

First test the hotkey in an ordinary app such as Notepad. If it works there but not in the target, close the script and target app, then reopen both normally. If the target must run elevated, right-click the AutoHotkey shortcut or script launcher, choose Properties > Compatibility, and select Run this program as an administrator if that option is available for the launcher. Relaunch it and test again. The fix is confirmed when the hotkey works in the elevated target. Only elevate scripts you trust, since elevation gives them broader access.

3. Check Windows UAC settings without disabling them

Open Start, search for Change User Account Control settings, and open the result. Keep UAC enabled; lowering it is not a reliable way to resolve a privilege mismatch. If a UAC prompt appears when you launch the target, that app is being elevated, so the script must run at a compatible level too. If no prompt appears, compare the target's shortcut settings or Task Manager's Details tab, where you can add the Elevated column by right-clicking a column heading.

4. Run the script with the matching v1 or v2 interpreter

Install or select the version the script was written for, then use Open with to launch it with that interpreter. Do not assume a v1 script will run unchanged under v2; syntax and function behavior differ. If the script is yours, check its directive and update syntax using the documentation for that version. A clean launch with no syntax dialog, followed by a working test hotkey, confirms the version pairing is correct.

5. Test with a minimal hotkey

Make a temporary script containing #Requires AutoHotkey v2.0 and F8::MsgBox "Hotkey received", then save and run it with v2. Press F8 while Notepad is focused. If a message appears, AutoHotkey and the keyboard hotkey are functioning, so inspect the original script's conditions or target window. If you use v1, use its matching syntax and interpreter instead; do not mix the sample syntax across versions.

6. Check the eye tracker, pedal, or accessibility software

In the device's companion software, verify that the pedal or tracker action is assigned to a keyboard key AutoHotkey can recognize. Check your model's menu for options such as keyboard output, hotkey mode, or application profiles; names vary by device and software version. Temporarily close other remapping or macro tools, then test the assigned key in Notepad. If the physical key works but the device action does not, the problem is likely in the device profile or input handoff, not the AutoHotkey hotkey.

7. Check startup and screen-reader conflicts

If the script works when started manually but not after sign-in, press Win+R, enter shell:startup, and check whether the intended shortcut is there. You can also open Settings > Apps > Startup and confirm its startup entry is enabled, if listed. For screen readers or other accessibility tools, test with each tool running separately; if the hotkey fails only when one is active, check its keyboard pass-through or command bindings. Restore tools after the test and adjust only the conflicting binding.

FAQ

Why does AutoHotkey work in Notepad but not in an administrator app?

The app is likely elevated while the script is not. Run both at the same privilege level, or elevate the trusted script when the target requires it. Retest the hotkey in the affected app.

Can AutoHotkey v2 run my v1 script?

Not reliably without changes, because the major versions use different syntax and behavior. Check the script's version directive and launch it with the matching interpreter, or update the script for the version you want to use.

Why does my foot pedal or eye tracker work outside AutoHotkey?

Its companion software may translate the action into a different key or consume it in a device-specific profile. Assign a simple keyboard key in that software and test it in Notepad, then check whether remapping utilities or accessibility bindings intercept it.

Most cases come down to matching privilege levels, script syntax, or the input device's assigned key. If nothing worked, note the AutoHotkey version, whether the script works in Notepad, and which device or app fails, then use those details to narrow the issue with the device or script maintainer.

Photo: mikael altemark from Uppsala, Sweden / CC BY 2.0 (Wikimedia Commons)

Leave a Comment