DEV Community

Filipe Mesquita
Filipe Mesquita

Posted on • Edited on

How use a Magic keyboard on top of a Macbook

Install Karabiner and disable built-in keyboard when a bluetooth keyboard is connected.

https://apple.stackexchange.com/questions/67133/how-to-disable-the-built-in-macbook-keyboard

Prevent Touch ID button to trigger:
1) screen lock: defaults write com.apple.loginwindow DisableScreenLockImmediate -bool yes
2) Accessibility shortcut (triple press): Apple menu  > System Settings (or System Preferences), click Accessibility, then click Shortcut. Then just uncheck every shortcut option and the menu no longer comes up.

Top comments (1)

Collapse
 
dmytro_d_87ad3dc4fd2891a9 profile image
Dmytro D • Edited

Nice, Karabiner is the right tool here. Worth noting the same kind of macOS gap exists on the mouse side too: the built-in "ignore trackpad when a mouse is present" toggle silently fails with some Bluetooth mice that enumerate as a keyboard (e.g. Logitech G309) — macOS just doesn't treat them as a mouse, so the trackpad stays live.
I ended up writing a tiny free utility for that case — it spins up a hidden virtual mouse (built on the same Karabiner DriverKit driver) and macOS then disables the trackpad through its own native mechanism. Automatic, signed and notarized. It's at dimix.net/BLE-dimix if anyone hits the trackpad version of this.
Kind of a shame Apple has left both of these broken for years, but at least Karabiner makes them fixable.