Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to completely disable the built-in keyboard on a MacBook? No input should be possible from that keyboard when I connect an external keyboard. This is sort of possible with the trackpad and the mouse, is there an option (or indeed a hack!) to do the same with the built-in hardware?

share|improve this question
How about some of the solutions suggested in this similar superuser question? – binarybob Oct 14 '12 at 18:40
I started down the path of turning this into an applescript that would automatically toggle the internal keyboard on and off: sudo kextfind /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeybo‌​ard.kext/ 2> /tmp/keyboard-kext-out; if [ -s /tmp/keyboard-kext-out ]; then; echo "Kext is NOT loaded"; else; echo "Kext is loaded"; fi But I couldn't quite get it to work. Here's hoping that someone else with more motivation that me can pull that off. – timmfin Feb 6 '13 at 18:19

From Googling around, I found this page. It suggests that you unload a AppleUSBTCKeyboard.kext to disable keyboard:

sudo kextunload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext

This will prompt you for your password and then give some errors, but it does disable the built in keyboard (tested on my ML 10.8.2)

To re-enable the builtin keyboard, load the kext file again:

sudo kextload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext

BTW, I noticed that this immediately prints all that was typed on the builtin keyboard, so be ready for this (in Terminal this should probably just output some text).

share|improve this answer
Does this still work for you on OS X Mavericks 10.9.1? It used to work for me before, but now I'm getting: (kernel) Can't unload kext; classes have instances: (kernel) Kext class AppleUSBTCKeyboard has 1 instance. Failed to unload - (libkern/kext) kext is in use or retained (cannot unload). – john2x Dec 20 '13 at 2:15
I’m getting the same error as @john2x but it does seem to be working despite the warning. – Leo May 16 '14 at 17:34
Yes working for me too on 10.9.4 despite the warning. – this.lau_ Aug 5 '14 at 18:02
Just a quick note that this also works under Yosemite, despite the warnings. – snipe Oct 24 '14 at 3:54
This seems to cause a kernel panic on El Capitan Public Beta. – Gabriele Cirulli Jul 11 '15 at 16:41

There is a little utility called Keyboard Cleaner and it seems to work fine for me on 10.10.5. You run the program and only cmd + k stay functional to then quit it.

share|improve this answer

Reddit Source

share|improve this answer

protected by Community Sep 5 '14 at 3:43

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.