Simple Hotkey Daemon for Macos, Ported to Zig
Posted3 months agoActive3 months ago
github.comTechstory
supportivepositive
Debate
20/100
Zig Programming LanguageMacos UtilitiesHotkey Management
Key topics
Zig Programming Language
Macos Utilities
Hotkey Management
A user shared a Zig port of the Simple Hotkey Daemon for macOS, sparking interest and discussion about its functionality and potential improvements.
Snapshot generated from the HN discussion
Discussion Activity
Moderate engagementFirst comment
2h
Peak period
6
0-6h
Avg / period
2
Key moments
- 01Story posted
Oct 3, 2025 at 1:18 PM EDT
3 months ago
Step 01 - 02First comment
Oct 3, 2025 at 3:04 PM EDT
2h after posting
Step 02 - 03Peak activity
6 comments in 0-6h
Hottest window of the conversation
Step 03 - 04Latest activity
Oct 7, 2025 at 9:41 AM EDT
3 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 45465276Type: storyLast synced: 11/20/2025, 2:52:47 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
The one thing I really can't stand about macOS is "Secure Input". It won't let you use something like TE or KM to input a password. You're forced to copy and paste.
As far as I understand, you can't disable that feature either... because securiteh! :/
It actually will. The problem is that when secure input is enabled, you can’t trigger a macro from the keyboard, because the daemon isn’t allowed to intercept keystrokes. But if you can trigger the macro some other way, like through a mouse button or a MIDI message, keystrokes can be sent just fine, even into a password field.
Edit: upon reflection, not much actually: https://github.com/kbd/setup/blob/2eaeaecf76c22be3ecef5c8563...
But anyway, I just wanted to see if you were aware of it.
I'm going to peek at yours now and see if there's anything I should crib.
I wrote two articles on using global hotkeys with hammerspoon:
https://ohdoylerules.com/tricks/hammerspoon-hyper-key/ https://ohdoylerules.com/tricks/hammerspoon-number-pad-short...
One think you can even do is detect which devices are being used and handle shortcuts differently. You can write a full on workflow that can be triggered with a keyboard shortcut if you’re using hammerspoon.
I recently switched from a homecooked keyboard "expansion" plugin to using Espanso but it can do that as well!
Edit: Found this answer from the author of the non-zig version, though it doesn't actually explain much https://github.com/koekeishiya/skhd/issues/151