Skip to content

feat: CGEventTap fallback for macOS Tahoe protected SPI devices#12

Open
jborkowski wants to merge 1 commit into
psych3r:mainfrom
jborkowski:main
Open

feat: CGEventTap fallback for macOS Tahoe protected SPI devices#12
jborkowski wants to merge 1 commit into
psych3r:mainfrom
jborkowski:main

Conversation

@jborkowski

@jborkowski jborkowski commented Feb 21, 2026

Copy link
Copy Markdown
Contributor

macOS 26.4 beta blocks IOHIDDeviceOpen for SPI-connected Apple Internal Keyboard via com.apple.iohid.protectedDeviceAccess. When any registered device fails to open, the CGEventTap fallback activates automatically.

Key changes:

  • CGEventTap intercepts keyboard events at kCGHIDEventTap level
  • Output via CGEventPost with magic marker (0x4B4E5441) to prevent feedback loop (VirtualHIDDevice output would be re-intercepted)
  • Auto-repeat filtering to preserve tap-hold timing
  • Explicit modifier flag tracking for home row mods
  • Updated VirtualHIDDevice submodule to v6.10.0
  • Link CoreGraphics framework in build.rs

@psych3r I wouldn't expect you to merge this. Right now I show you my workaround/fix for the latest macOS beta. Maybe someone will encounter the same problem after updating to the beta, so perhaps this will temporarily solve their issue.

macOS 26.4 beta blocks IOHIDDeviceOpen for SPI-connected Apple Internal
Keyboard via com.apple.iohid.protectedDeviceAccess. When any registered
device fails to open, the CGEventTap fallback activates automatically.

Key changes:
- CGEventTap intercepts keyboard events at kCGHIDEventTap level
- Output via CGEventPost with magic marker (0x4B4E5441) to prevent
  feedback loop (VirtualHIDDevice output would be re-intercepted)
- Auto-repeat filtering to preserve tap-hold timing
- Explicit modifier flag tracking for home row mods
- Updated VirtualHIDDevice submodule to v6.10.0
- Link CoreGraphics framework in build.rs
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