2

I'm looking to disable my MacBook Pro (2016)'s internal keyboard. I'm running macOS Monterey 12.6.3. My left shift key is broken and always pressed, and while I have a Bluetooth keyboard that helps when I'm typing, other computer functionality acts as if the shift key is pressed (e.g. opening new pages creates new windows, clicking text highlights sections, etc.).

I have tried every solution I've come across: I took the keycap off and cleaned the key; I used a keyboard cleaner software to lock up my keyboard; I used Karabiner-Elements to disable my built-in while my external keyboard was active; I ran a keyboard-disabling kext in Terminal. None of these things have worked for even a second.

I can't help but feel that maybe because these solutions are all a few years old, they're out of date and no longer work on Apple's OS, so if anyone has any other solutions I could try, please let me know! I'm also not ruling out that I've messed up somewhere in trying these solutions, but I've tried so many different things, I'd think one would work.

agarza
  • 2,274
Spo
  • 23
  • 1
    Which specific command did you run to disable kext in Terminal, which specific Karabiner rules did you use? Details may matter, so without knowing them you may just get the same answers again. – nohillside Mar 12 '23 at 09:36
  • I specifically used the Karabiner rule that disables the internal keyboard when an external keyboard is connected (from the section devices>advanced). The kext I used was actually the same one that Thinkr posted below. – Spo Mar 13 '23 at 22:29
  • So I rebooted my computer and Karabiner Elements started working. I need to reset Karabiner every so often to get it to kick in, but my internal keyboard is now disabled (most of the time)! Thanks everyone for your help. – Spo Mar 16 '23 at 23:23

1 Answers1

1

You can use Terminal: Open Terminal and enter:

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

You will need to enter your Mac password and then it will disable the internal keyboard of your Mac.

PS: You may need to reboot to make it work.

nohillside
  • 100,768
Thinkr
  • 3,357
  • 1
    Your command doesn‘t use AppleScript. – nohillside Mar 12 '23 at 09:59
  • Terminal runs a shell (usually bash or zsh), the shell runs binaries. In this case you run sudo which then runs kextunload. See man sudo and man kextunload for details (and read some introductory shell texts). – nohillside Mar 12 '23 at 10:25
  • Basically, both shell scripting and AppleScript are examples of scripting languages. AppleScript works on a totally different level, it interacts with macOS directly (kind of). – nohillside Mar 12 '23 at 10:37
  • 1
    For further studies: https://developer.apple.com/library/archive/documentation/OpenSource/Conceptual/ShellScripting/Introduction/Introduction.html, https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/index.html. – nohillside Mar 12 '23 at 11:32