v0.1.4 — macOS 26 crash fix (keypress during setup)
Fix: macOS 26 crash on keypress during setup
Replaced rdev keycode mapping (which triggered a HIToolbox main-thread assertion on macOS 26) with a raw CGEventTap. No layout APIs on listener threads. Also: listener crash isolation.
Details. On macOS 26, HIToolbox's Text Services input-source APIs (TSMGetInputSourceProperty → islGetInputSourceListWithAdditions) now hard-enforce dispatch_assert_queue(main) and trap (EXC_BREAKPOINT / SIGTRAP) when called off the main thread. macOS 15 silently allowed the same call, so it never reproduced there. Two paths hit it:
- Right Option listener —
rdevmapped keycodes→chars via TIS/TSM inside the event-tap callback on our spawned listener thread → crash the instant the first key event arrived (~15s into onboarding on M4 / macOS 26.6). Now a rawCGEventTaponFlagsChanged, same HID-tap pattern as the Fn key: Right Option = virtual keycode0x3D+ theCGEventFlagAlternatebit. No layout/input-source APIs on the listener thread. Left Option is ignored; DOWN doesn't re-fire when other modifiers change, UP fires even while other modifiers are held. - Paste injection —
enigo'sKey::Unicode('v')reverse-maps the char viaTISGetInputSourceProperty/UCKeyTranslate, and paste runs on a worker thread, so it would have trapped on macOS 26 on the first dictation. Switched to a raw V keycode (0x09) — no layout API. - Crash isolation — each listener thread body is wrapped in
catch_unwind, so a future listener panic logs loudly and dies alone instead of taking the app down.
rdev is fully removed (dependency + its legacy transitive tree).
Install (Apple Silicon)
- Download
FunButton_0.1.4_aarch64.dmg, drag FunButton to Applications. - Unsigned:
sudo xattr -cr /Applications/FunButton.app - Launch → grant Microphone, Accessibility, Input Monitoring (the wizard walks you through, live-heals as you grant).
- Hold Fn and talk. Text lands at your cursor. (Right Option is the alternate push-to-talk in Settings.)
Verified
cargo check+cargo build --releaseclean;rdev/TSM/TIS/UCKeyTranslate gone from the hotkey path.- On macOS 15.6.1 (M3 Ultra): the new raw Right Option tap installs under Input Monitoring, whisper + llama-server load, and the app runs 90s+ with zero panics/traps.
- The macOS 26 fix removes both off-main-thread input-source calls that produced the reported trap.
arm64 only. GPLv3.