Skip to content

[Issue-202] fix(hotkeys): restore mouse click-through during window hole - #203

Merged
CYoJkoY merged 1 commit into
mainfrom
fix/window-hole-mouse-click-through
Nov 8, 2026
Merged

CYoJkoY merged 1 commit into
mainfrom
fix/window-hole-mouse-click-through

Conversation

@CYoJkoY

@CYoJkoY CYoJkoY commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Linked Issue

Closes #202: Restore mouse click-through while the Window Hole is active, so clicks reach the revealed layer instead of being consumed by the window opacity hotkeys.

  • Stacked Branch Dependencies: None (Directly branched from main)

Change summary

Staged breakdown of all diffs against main by commit:

  • 97eb35d: Restores the !WindowHole.IsActive() guard on the shared CapsLockShortcutGroupAvailable("window") #HotIf block in Hotkeys/HotkeyBindings.ahk, which covers LButton, RButton and MButton; rewrites the block comment to explain why the pause is required; documents the behaviour in README.md (Window Hole bullets and the mouse-button shortcut line); adds CheckWindowHoleMousePassthrough to scripts/HotkeyRegression.ahk, which requires the combined guard, asserts all three mouse bindings sit inside it, and rejects duplicated mouse bindings.
  • Behavioral Guarantees: AdjustOpacity, the ghost-mode toggle, the window-group keyboard shortcuts and every Core/WindowHole.ahk region, hit-test, top-most and DWM path are untouched. The keyboard blocks that open and close the hole use their own #HotIf conditions, so closing a hole in hold or toggle mode is unaffected. No configuration keys, defaults, public entry points or dependencies change; outside an active hole the mouse-button opacity shortcuts behave exactly as before.

Verification & Dependencies

  • Status of Assertions:
    • Command-line checks: scripts\ci\Check-DllPaths.ps1 -RepoRoot <repo> (PASS, 82 .ahk files scanned), scripts\ci\Invoke-Ahk.ps1 .\CapsLock-.ahk -Validate (PASS, exit 0, no load-time warnings), scripts\HotkeyRegression.ahk (PASS, 247 checks run, 0 failed), scripts\HistoryGuiPaging.ahk (PASS), git diff --check (clean), GitHub Actions AutoHotkey Syntax Check (pass, 17s).
    • Runtime & Visual assertions: The regression check was mutation-tested: removing && !WindowHole.IsActive() from the guard on a copy of the branch made it fail with two named failures (window mouse bindings are disabled while Window Hole is active, left, right, and middle mouse bindings share the Window Hole guard), and the untouched branch passes with 247 checks and 0 failures. Validation used AutoHotkey 2.0.31 x64 locally while CI pins 2.0.28.
    • Unverified external facts: Live pointer behaviour during an active hole (select, double-click and middle-click on desktop icons, opacity unchanged, shortcut recovery after release, toggle mode) was not exercised on a desktop in this session; it requires manual CapsLock+X interaction with AutoHotkey running.
  • Dependency Pinning: No dependency, toolchain or version changes. Existing AutoHotkey pin in CI is untouched; nothing new floats.

Review conclusion

Evaluation across the four engineering dimensions:

  • Correctness & Regression: PASS (Guard restored on the block that owns all three mouse bindings, so clicks are no longer intercepted during a hole; the new static check fails if the guard is removed or a binding escapes the block).
  • Performance Gain: PASS (No added work per click: the guard is only evaluated when the mouse-button hotkeys are considered, and the hole check is an existing boolean read).
  • Compatibility & Architecture: PASS (Hotkey-layer-only change; native Win32 Window Hole implementation and the ImageMagick tooling remain untouched; no new modules or frameworks).
  • Readability & Commit Completeness: PASS (Single atomic commit, Conventional Commit subject with issue reference, comment explains intent, documentation matches behaviour, ASCII-only text).

Overall Verdict: PASS

Permission Notice

AI has completed staged development and review loops. Merging is an exclusive user privilege. Awaiting manual merge.

The opacity mouse bindings intercepted LButton, RButton and MButton while a Window Hole was active, so clicks never reached the revealed layer. Restore the !WindowHole.IsActive() guard for the shared window #HotIf block and document the pause in README. Add a regression check that requires the guard and asserts each mouse binding is declared once inside it.
@CYoJkoY
CYoJkoY merged commit aa9b7b1 into main Nov 8, 2026
1 check passed
@CYoJkoY
CYoJkoY deleted the fix/window-hole-mouse-click-through branch November 8, 2026 15:57
CYoJkoY added a commit that referenced this pull request Nov 8, 2026
… backgrounds (#205)

## Linked Issue
Closes #204: The image tools panel cannot accept dropped files, cannot
name its output, lacks horizontal and grid merges, and offers no merge
background colour with independent transparency.
- **Stacked Branch Dependencies**: None (Directly branched from main)

## Change summary
Staged breakdown of all diffs against main by commit:
- `8a6e8e4`: Adds `merge_horizontal` and `merge_grid` plus an optional
options object to `Core/ImageTools.ahk`. `Execute` accepts `Name`,
`Background` and `GridColumns`, builds rows through `GridGroups` and
`GridRowSizes`, sanitizes typed names through `SanitizeOutputName`,
normalizes `#RRGGBB` and `#RRGGBBAA` through `NormalizeBackground`, and
drops alpha for JPEG output. Named batch runs gain `_1`, `_2` suffixes;
name collisions keep the existing unique-name suffix.
- `6eea02f`: Extends `UI/ImageToolsGui.ahk` with `WS_EX_ACCEPTFILES` and
a `DropFiles` handler, output name and grid column fields, a background
swatch, a native `ChooseColorW` picker and an alpha slider. Merge
controls are enabled only for merge operations, and `_ComposeBackground`
converts the slider percentage to the exact alpha byte.
- `8f6f149`: Adds `CheckImageToolsExtended` to
`scripts/HotkeyRegression.ahk`, covering the new operation names, name
sanitizing, background validation, grid row sizing, background placement
before the append operators, JPEG flattening, and the drop, name, picker
and alpha wiring in the panel.
- `989e719`: Adds the 13 language columns for the new labels in
`lang.csv` and rewrites the README ImageMagick row and section to
describe dropped files, the optional output name, the three merge modes
and the background colour with opacity.
- `d4d82cf`: Merge commit that brings `main` (the Window Hole mouse
passthrough fix from #203) into the branch; the only conflict was in
`scripts/HotkeyRegression.ahk`, where both suites were appended at the
same spot, so both checks are kept and both are invoked.
- **Behavioral Guarantees**: Calling `Execute` without an options object
keeps the previous signature and behaviour, so compress, vertical merge
and convert outputs are unchanged. Existing operation names, default
output naming, output folder autofill, configuration keys and default
values are untouched. The panel keeps its original control order, and
the merge background and opacity survive a close while the operation,
output name and grid count reset.

## Verification & Dependencies
- **Status of Assertions**:
- `Command-line checks`: `scripts/ci/Check-DllPaths.ps1` (PASS, 82 files
scanned, every DLL name uses a single backslash). `Invoke-Ahk.ps1
.\CapsLock-.ahk -Validate` (PASS, exit code 0). `Invoke-Ahk.ps1
.\scripts\HotkeyRegression.ahk` (PASS, 271 run, 0 failed).
`Invoke-Ahk.ps1 .\scripts\HistoryGuiPaging.ahk` (PASS). `git diff
--check` (PASS, no whitespace errors). `lang.csv` (PASS, new keys carry
all 13 columns and the removed colour title key has no remaining
reference).
- `Runtime & Visual assertions`: The panel probe confirmed the output
name, grid columns, background swatch, colour button, alpha slider,
alpha label and operation controls exist with the expected enabled
states. Slider values produce `#00FFFF80` at 50 percent, `#00FFFF00` at
0 and `#00FFFFFF` at 100. The native color dialog accepted RGB 255/128/0
and returned #FF8000; the swatch updated to #FF8000 and the panel
remained open. Geometry at 100 percent scaling: grid edit 84x24 at
16,431, swatch 96x26 at 116,431, slider 180x33 at 368,431, alpha label
44x16 at 556,439, output name 590x24 at 16,492, client 778x904.
ImageMagick runs produced horizontal 300x60, vertical 100x120 and grid
200x180 output with translucent padding, full transparency at alpha 0,
three-channel JPEG output, named single and batch files, a `_2`
collision suffix, a timestamped fallback name and rejection of a zero
column count.
- `Unverified external facts`: A physical drag gesture from Explorer
onto the window was not replayed (the `DropFiles` wiring and the shared
add path were verified separately).
- **Dependency Pinning**:
- No dependency, toolchain or version change. The project keeps
AutoHotkey v2 with no floating tags, and `lang.csv` remains the single
localization source with 13 fixed language columns.

## Review conclusion
Evaluation across the four engineering dimensions:
- **Correctness & Regression**: PASS (Operation dispatch guards every
new mode, grid columns reject values outside 1 to 20, background input
fails loudly on malformed values, and the extended regression checks
confirm the original three operations still resolve to their previous
names and defaults.)
- **Performance Gain**: PASS (Merge and grid runs issue a single
ImageMagick command; the panel adds no timers, no polling and a fixed
number of controls.)
- **Compatibility & Architecture**: PASS (Native AutoHotkey v2 and Win32
calls only, with no new dependency, and the core keeps its previous
signature through an optional options object.)
- **Readability & Commit Completeness**: PASS (Four atomic Conventional
Commits, each matching its diff, all text pure ASCII.)

**Overall Verdict**: PASS

## Permission Notice
AI has completed staged development and review loops. Merging is an
exclusive user privilege. Awaiting manual merge.
CYoJkoY added a commit that referenced this pull request Nov 8, 2026
…ole (#206)

## Linked Issue
Follow-up to #202 and merged #203: stop mouse opacity gestures while
physical X is held or Window Hole is active. The reported hole-first
click failure remains unverified with physical input.
- **Stacked Branch Dependencies**: None (Directly branched from main)

## Change summary
Staged breakdown of all diffs against main by commit:
- b8b0478: Share the active-hole and physical-X predicate across left,
right, and middle mouse opacity bindings; stop left/right repeating
adjustments when the predicate becomes false; extend regression checks
and document recovery conditions.
- **Behavioral Guarantees**: Existing configuration keys, defaults,
APIs, opacity increments, ghost mode behavior outside the guard, and
keyboard window shortcuts are preserved. No changes to window regions,
hit testing, DWM, or responsive DOM layouts.

## Verification & Dependencies
- **Status of Assertions**:
- Command-line checks: DLL path scan (82 AHK files), AHK 2.0.31 syntax
validation, HotkeyRegression (274 checks, 0 failures), HistoryGuiPaging,
and git diff --check all PASS.
- Runtime & Visual assertions: Boundary-stubbed AHK probes execute
extracted handlers. Baseline permits X and continues both repeat loops
after X/hole transitions; changed handlers deny X/hole before profile
evaluation, stop both loops at the next iteration, and permit gestures
after restoration. These are state simulations, not physical mouse
integration tests.
- Unverified external facts: Physical hold/toggle single-click,
double-click, right-click, middle-click passthrough, existing-opacity
preservation, outside-hole clicks, gesture-first cancellation, and
post-hole shortcut recovery remain unverified. Synthetic input did not
reliably register physical key state. The original hole-first symptom
was not reproduced reliably.
- **Dependency Pinning**:
- No dependency or toolchain changes. Local validation used exact
AutoHotkey 2.0.31.

## Review conclusion
Evaluation across the four engineering dimensions:
- **Correctness & Regression**: FAIL (Static checks and state simulation
pass; physical input acceptance remains outstanding.)
- **Performance Gain**: Pending verification (Short-circuit checks avoid
application profile evaluation while X/hole blocks gestures; no measured
runtime performance claim.)
- **Compatibility & Architecture**: PASS (Native AHK only; shared hotkey
predicate; no configuration or core window-hole changes.)
- **Readability & Commit Completeness**: PASS (One scoped Conventional
Commit, ASCII metadata, implementation, documentation, and regression
checks.)

**Overall Verdict**: FAIL
Blocking issues:
1. Complete physical mouse input acceptance in hold and toggle modes
before claiming the reported behavior is fixed.
Active iteration: Round 1 of 5

## Permission Notice
AI has completed staged development and review loops. Merging is an
exclusive user privilege. Awaiting manual merge.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Window Hole swallows mouse clicks while CapsLock + X is held

1 participant