hotkeys.ahk — Code Audit
auditor: jellia (mrFixit) | 2026-05-05 | QB #643
Overview
hotkeys.ahk is the global hotkey script for Rocky. 86 lines of AHK v2, auto-launched from the Windows Startup folder. localMesh's AHKWatchdog monitors the process and relaunches if it crashes (30s check interval).
A companion script transparent-notes-launcher.ahk lives in the same Startup folder — it's a standalone duplicate of one of the bindings (see Gremlins).
Keybinding Registry
| Hotkey | Keys | Action | Target |
|---|---|---|---|
| #n | Win+N | Toggle Notepad++ / new tab if active | notepad++.exe |
| #m | Win+M | Paste (sends Ctrl+V) | system clipboard |
| +z,x | Shift+Z, X | Swap monitor arrangement | crossEyes batch |
| PgUp | PageUp | Toggle Transparent Notes Pro | forge5/transparent-notes-pro |
| PgDn | PageDown | New timestamped note | .notesplusplus/new_note.py |
| ^!k | Ctrl+Alt+K | Toggle/launch localMesh | HTTP POST :8801/toggle |
| Home | Home | Toggle/launch Pinger | localMesh.py |
| #j | Win+J | Toggle Obsidian | .soundings vault |
Gremlins
transparent-notes-launcher.ahk binds PageUp to the same Transparent Notes toggle. Two competing handlers. The standalone includes #SingleInstance Force that the main script doesn't.
Script uses AHK v2 syntax but doesn't declare #Requires AutoHotkey v2.0. Could be opened by wrong interpreter. Missing #SingleInstance Force means duplicates possible if watchdog relaunches while a zombie lives.
Win+M natively minimizes all windows in Windows 11. This binding overrides it to paste. No comment explains why.
PageUp and PageDown are standard scroll keys in terminals, browsers, and editors. These bindings steal them globally — scrolling breaks everywhere.
Home is a constant-use cursor key (jump to start of line). This binding steals it globally for pinger toggle. Breaks text editing in every app.
InputHook waits 400ms for the second key. Any word with capital Z gets a perceivable lag. Known trade-off with chord bindings.
The try/catch catches all WinHTTP errors and falls back to launching localMesh. Could trigger redundant launch attempts (lockfile prevents damage).
"managed by grancy3120" is a previous agent session handle. No version pragma, no AHK version requirement declared.
Summary
| # | Gremlin | Severity | Fix |
|---|---|---|---|
| 1 | Duplicate PgUp binding | Medium | Delete transparent-notes-launcher.ahk |
| 2 | Missing #Requires / #SingleInstance | Low | Add directives |
| 3 | Win+M overrides minimize-all | Low | Confirm intent or rebind |
| 4 | PgUp/PgDn steal nav keys | Low | Consider modifier combos |
| 5 | Home key stolen globally | Medium | Consider Win+Home |
| 6 | Shift+Z chord delay | Low | Known trade-off |
| 7 | Ctrl+Alt+K over-eager fallback | Low | No action needed |
| 8 | Stale header | Cosmetic | Update header |