Skip to content

v0.1.4 — macOS 26 crash fix (keypress during setup)

Choose a tag to compare

@todddickerson todddickerson released this 02 Aug 15:11
· 9 commits to main since this release

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 (TSMGetInputSourcePropertyislGetInputSourceListWithAdditions) 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 listenerrdev mapped 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 raw CGEventTap on FlagsChanged, same HID-tap pattern as the Fn key: Right Option = virtual keycode 0x3D + the CGEventFlagAlternate bit. 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 injectionenigo's Key::Unicode('v') reverse-maps the char via TISGetInputSourceProperty/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)

  1. Download FunButton_0.1.4_aarch64.dmg, drag FunButton to Applications.
  2. Unsigned: sudo xattr -cr /Applications/FunButton.app
  3. Launch → grant Microphone, Accessibility, Input Monitoring (the wizard walks you through, live-heals as you grant).
  4. Hold Fn and talk. Text lands at your cursor. (Right Option is the alternate push-to-talk in Settings.)

Verified

  • cargo check + cargo build --release clean; 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.