Jaime Ortega

keylock

Lets me set the Corne on top of the MacBook without typing everything twice.

Year
2026
Made for
macOS, Swift
State
shipped

I rest my Corne on top of the built-in keyboard. Every keypress was going through both of them.

keylock watches for that one external keyboard and disables the built-in the moment it connects, then hands it back when I unplug. The trackpad keeps working, which is the part the blunt fixes get wrong. It sits in the menu bar as a single toggle and drives Karabiner underneath.

Flip it by hand and the override holds until the next connect or disconnect, then it goes back to deciding for itself.

How to use it

The repo is private, but it is small: a Swift CLI and a menu bar app driving Karabiner underneath.

  1. It needs Karabiner-Elements installed and launched once, so its config file exists before keylock touches it.

    Terminal
    ~/.config/karabiner/karabiner.json

Point it at one external keyboard as the default. From then on it locks the built-in the moment that board connects and unlocks on disconnect, leaving the trackpad alone.