How to disable the internal keyboard on a MacBook Pro?

13

5

My cat has a nasty habit of jumping over my MBP and causing keystrokes that mess up things (anywhere from stopping a playing video to deleting a file).

I'm looking for some utility or hack to disable completely the internal keyboard and to re-enable it either using the mouse or using some key combination.

Any ideas how to achieve this?

GJ.

Posted 2010-09-07T21:18:01.290

Reputation: 8 151

Same issue with a cat here! And he's far too cute for me to get any upset about it ^^ – Adrien Be – 2015-11-27T17:55:33.307

1I had a cat jump on my MBP once, except it got spooked and tore keys off the keyboard in the leap off the keyboard. Good question though. – Troggy – 2010-09-07T21:35:44.273

1

While not a solution to your specific problem, Karabiner (https://pqrs.org/osx/karabiner/) let me disable my internal keyboard when my external keyboard is connected. This lets me plop my external keyboard right over the internal keyboard of my Macbook.

– kas – 2018-08-25T23:37:56.967

Answers

6

Just tried this on my 2013 MBP with 10.8.5:

The external keyboard still works fine, and I was able to disable, then reenable my internal keyboard.

To disable the internal keyboard of a portable Mac:

sudo kextunload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext/ The internal keyboard is then disabled, external keyboards will still work.

To re-enable the internal keyboard of a portable Mac:

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

When I initially disable the internal keyboard, terminal notifies me that:

(kernel) Can't unload kext com.apple.driver.AppleUSBTCKeyboard; classes have instances:
(kernel)     Kext com.apple.driver.AppleUSBTCKeyboard class AppleUSBTCKeyboard has 11 instances.
Failed to unload com.apple.driver.AppleUSBTCKeyboard - (libkern/kext) kext is in use or retained (cannot unload).

Nevertheless, the command works, no ill effects.

Thanks to: macrumours

ptim

Posted 2010-09-07T21:18:01.290

Reputation: 926

Works on MBP(Mid 2014) running 10.10.3 – Samveen – 2015-06-15T12:49:44.227

doesnt work on 10.10.5 – Srneczek – 2015-11-01T21:54:56.040

Works on MBP(late 2011) running 10.9.5 – luckydonald – 2017-01-04T15:13:22.137

1Did not work on a 2015 MacBook Pro Retina running macOS High Sierra 10.13.6. – kas – 2018-08-25T23:18:02.443

confirmed this works on 2009 white macbook running 10.8.5 and I haven't noticed any side-effects. Works like a charm. awesome. – Aidan Miles – 2014-05-22T23:54:35.890

5

There are a couple 3rd party programs that do similar things.. or just get a stand that will put your MBP at an angle so the cat doesn't jump on it..

Lockey

edit: you can also try Keyboard Cleaner

Rex

Posted 2010-09-07T21:18:01.290

Reputation: 494

Lockey seems to be possibly dodgy / scam (as in not trustable in terms of your personal/payment info, scam). The website links to a different domain advertising a new version that works with mavericks and you can only pay by credit card and no trial download and the whole thing just looks dodgy. A shame as it's the only non-terminal solution I could find... – None – 2014-06-26T02:16:13.150

1Keyboard cleaner locks all keyboards not just the intenral one. – Srneczek – 2015-11-01T21:53:29.523

Just for the record to those that are down-voting my answer: This question/answer is over 5 years old and software and fixes that worked then are likely very different today. – Rex – 2015-11-16T14:45:29.693

2Keyboard cleaner is nice and simple. you have cmd-q to close it and get your keyboard back. Mouse clicks won’t register. – Martin Marconcini – 2010-09-08T01:25:39.150

Keyboard Cleaner emits the macOS System error "funk" sound upon keypresses, which could be annoying to users. – jtheletter – 2019-03-30T19:32:00.423

The link to Lockey above is dead. – jtheletter – 2019-03-30T19:32:11.857

4

Mouse keys could actually solve your problem without any apps. It's a built-in OS X accessibility option (can be turned on and off). Basically, when you press the Option key 5 times, it's enabled (or disabled in the same way) and then you can only use like 6 to 8 keys on the keyboard to control the mouse - other keys and touchpad are disabled - so if your cat doesn't hit 1 or 2 keys (left and right mouse clicks), you are fine.

It is not 100% solution but could work in 80-90% cases. I am using it when I put my ergonomic keyboard on top of the MacBook Pro keyboard. Wonder when (and if) will ergonomic keyboards come to notebooks, to be honest. Soon, there will be world fulled with blind programmers with RSI or carpal tunnels in their wrists.

My actual version is El Capitan 10.11.1, but I think it worked on 10.10.5 which I had few weeks ago.

Srneczek

Posted 2010-09-07T21:18:01.290

Reputation: 270

0

Karabiner-Elements is open source software with powerful keyboard customizations, including the ability to disable the internal keyboard when an external one is connected.

screenshot

I've got a 2018 MBP with the horrible keyboard which has started to fail in so many wonderful ways now. I have a cheapo bluetooth keyboard I just set right on top of the internal keyboard, and using Karabiner-Elements allows me to disable it so that the pressure from the keyboard above doesn't trigger unwanted key strokes.

https://github.com/pqrs-org/Karabiner-Elements

Jeff Puckett

Posted 2010-09-07T21:18:01.290

Reputation: 244

Jeff, does this also work for the login screen upon reboot? My old 2010 17" MBP has a weird issue with the keyboard where it's randomly sending the character "9", and the 9 key itself doesn't actually work. Using the built-in keyboard it's impossible to login for this reason. The login does work with the external keyboard, but as the built-in keyboard deteriorates further, I need to completely have it disabled even after a reboot when getting the login screen. Does this utility do that as well? Thanks -- Erik – Erik van der Neut – 2020-01-14T03:04:01.547

@ErikvanderNeut yes I use my external keyboard to login. I cannot use the internal keyboard to login either because the keys send duplicates sometimes and sometimes not at all. although I don't think this has anything to do with Karabiner because I believe my external keyboard works for login without it. I just need Karabiner to disable the internal keyboard. – Jeff Puckett – 2020-01-14T17:07:23.833

Jeff, yes, the external keyboard works for login by default (w/o any special tools) also for me, like I described. The problem I'm having however is that the built-in keyboard is sending out random "9" characters more and more, even when you don't touch it. Therefore, I need to be able to completely and permanently disable it, even before I am logged in, because as I am typing my login password on the external keyboard, the internal keyboard is increasingly likely to inject unwanted characters at the same time :-( Maybe I should open the Mac up and physically unplug the internal keyboard. – Erik van der Neut – 2020-01-15T22:36:49.620

0

Looks like all cats love to mess with MacBooks

This http://www.indiegogo.com/Mac-OS-X-Keyboard-Lock-Application-Lockey Should solve your problem

or try this http://jan.prima.de/~jan/plok/archives/48-Keyboard-Cleaner.html

PS: Are you the same user who asked this question over here http://discussions.apple.com/thread.jspa?threadID=1646187

subanki

Posted 2010-09-07T21:18:01.290

Reputation: 6 702

1The Indie Gogo link is dead. – jtheletter – 2019-03-30T19:23:38.017

Keyboard Cleaner emits the macOS System error "funk" sound upon keypresses, which could be annoying to users. – jtheletter – 2019-03-30T19:31:21.203

0

You could put a password on your screen saver ("Require password [time] seconds after sleep or screen saver begins" in the "General" tab of the "Security" section of System Preferences, probably best to add a hot corner for quick activation). This will require you to enter your password whenever you return to your computer - unless your cat knows it, you'll be protected from any accidental input.

Unfortunately, this means you have to be not using your computer at that point. Other than using an external monitor and so on and closing the lid, I don't know of any built in way of disabling the keyboard.

Scott

Posted 2010-09-07T21:18:01.290

Reputation: 5 323

0

Try the free software CatNip, which claims to detect cat-like typing and locks the keyboard in response.

ischeriad

Posted 2010-09-07T21:18:01.290

Reputation: 912

0

There's a excellent free app that does exactly that. It's called KeyboardCleanTool, and it's made by the same guy who made BetterSnapTool.

Unlike with Keyboard Cleaner, you can still use your computer as normal while your keyboard is disabled.

Alex Ryan

Posted 2010-09-07T21:18:01.290

Reputation: 141

1

Please don't link directly to downloads. You should instead link to the product page. Also read How do I recommend software for some tips as to how you should go about recommending software. At the very least you should provide more than just a link, for example some additional information about the software itself.

– DavidPostill – 2015-03-22T06:15:56.720

-1

http://macifier.com/ this app is free, locks keyboard, n doesn't shut off screen (you can continue to FaceTime / Skype, or watch a movie)!! Other apps blur the screen.

Sheryl Ann Franklin

Posted 2010-09-07T21:18:01.290

Reputation: 1

1This no longer seems available, and the above link leads to a suspicious page. – jtheletter – 2019-03-30T19:18:59.587