how to disable built in keyboard on laptop mac code example
Example: macbook disable input from built in keyboard
To disable the built-in keyboard:
sudo kextunload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext
to enable it again:
sudo kextload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext
it will throw some errors but does actually disable the keyboard