Skip to content

fix: treat IOHIDManagerOpen failure as non-fatal so the remote is detected on desktop Macs - #3

Open
greghughespdx wants to merge 1 commit into
machinarii:mainfrom
greghughespdx:fix/hid-manager-open-nonfatal
Open

fix: treat IOHIDManagerOpen failure as non-fatal so the remote is detected on desktop Macs#3
greghughespdx wants to merge 1 commit into
machinarii:mainfrom
greghughespdx:fix/hid-manager-open-nonfatal

Conversation

@greghughespdx

@greghughespdx greghughespdx commented Jul 19, 2026

Copy link
Copy Markdown

Summary

Makes Siri Remote detection work on desktop Macs that have other Apple input devices attached, by treating a failed manager-wide IOHIDManagerOpen as non-fatal.

Problem

On a Mac with a Magic Keyboard or Magic Trackpad attached, HyperVibe never detects the Siri Remote at all — no error dialog, no menu bar status, just silent failure.

The sequence:

  1. The vendor matching dictionaries match every Apple HID interface, including the keyboard/trackpad interfaces the system itself holds open
  2. IOHIDManagerOpen returns an error (Unsupported, ExclusiveAccess, or NotPermitted depending on TCC state) because of those system-held interfaces
  3. startDetection() treats the error as fatal and returns before scheduling the run loop
  4. The Siri Remote — which was never the problem — is never enumerated

Solution

Log the failure and continue. The manager-wide open result doesn't matter for this app's actual access path: device matching callbacks still fire, and the per-device IOHIDDeviceOpen that RemoteInputHandler already performs (with seize) does not depend on a successful manager-wide open.

Testing

  • Reproduced on a Mac Studio (macOS 26) with Siri Remote (product 0x0266) plus Magic Keyboard and Magic Trackpad attached: before the change, detection dead-ends at the open error
  • After the change: all remote interfaces enumerate, per-device open and seize succeed, and buttons/touch work normally
  • Failure path still logged (with the IOReturn code) for diagnostics

…o hit Apple's internally-held keyboard/trackpad interfaces, so manager-wide open reports Unsupported/ExclusiveAccess/NotPermitted while per-device open of the remote succeeds; log and continue
@greghughespdx greghughespdx changed the title Fix: treat IOHIDManagerOpen failure as non-fatal fix: treat IOHIDManagerOpen failure as non-fatal so the remote is detected on desktop Macs Jul 19, 2026
JamesZwq added a commit to JamesZwq/hypervibe that referenced this pull request Jul 20, 2026
- ConfigStore.save now REFUSES to overwrite an on-disk config that doesn't parse (a hand-edit typo
  the app is running the fallback for), and backs up config.jsonc→.bak before any overwrite — so a
  UI gesture can no longer erase all bindings by writing fallback-derived content (fable machinarii#1).
- Layer 'used' marking moved above the Spaces/repeatKey early-returns and wired into the select /
  swipe / two-finger paths, so hold-layer + repeat-key/click/gesture is momentary, not a false
  sticky toggle (fable machinarii#2).
- Track the sticky-activator button so re-tapping toggles OFF even when the .layer binding isn't
  visible from inside the layer's own inherits chain (fable machinarii#3).
- Hot-reload clears a sticky layer whose mode was deleted/renamed (else all keys resolve nil with
  no way to pop) (fable machinarii#4). Disconnect now KEEPS the sticky layer (BLE idle-disconnect shouldn't
  drop it) and only unwinds the momentary hold (fable machinarii#8). Pending double-tap singles are cancelled
  on disconnect (fable machinarii#6, partial).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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