Skip to content

hammerspoon: launch apps after modifiers release#4

Open
mfkd wants to merge 1 commit into
mainfrom
hammerspoon-release-app-launchers
Open

hammerspoon: launch apps after modifiers release#4
mfkd wants to merge 1 commit into
mainfrom
hammerspoon-release-app-launchers

Conversation

@mfkd
Copy link
Copy Markdown
Owner

@mfkd mfkd commented May 16, 2026

Summary

  • keep the existing Caps Lock Hyper chord as Control+Option+Command+Shift
  • run app launcher actions after startup modifiers are released
  • preserve app toggle behavior while preventing held modifiers from leaking into launched apps

Why

Holding the Hyper chord while launching apps can leak startup modifiers into the target app. That matters for apps like Music and Photos, where macOS documents modifier-driven startup behavior. This PR was the first attempt to stop that leakage.

Tradeoff

This approach waits for the physical modifiers to be released before launching or focusing the app, so it avoids the modifier leak but adds perceived latency. PR #5 supersedes this with an immediate approach.

Test

  • luac -p .hammerspoon/init.lua

@mfkd mfkd force-pushed the hammerspoon-release-app-launchers branch from 89436f3 to ab4c764 Compare May 16, 2026 11:09
@mfkd
Copy link
Copy Markdown
Owner Author

mfkd commented May 16, 2026

Note: this implementation waits for the physical modifier keys to be released before launching/focusing apps. That avoids Shift/Option leaking into app startup, but it adds perceived latency because the app opens only after key release. I am superseding this with a separate PR based on main that launches immediately after posting synthetic modifier key-up events.

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.

1 participant