I need to disable my main keyboard as one letter is not working and it's out of warranty This is my current setup:




1 year warranty expired.
90 days warranty warranty expired too.
Using external keyboard on top of the internal keyboard for now.
I need to disable the built-in one, because using the external keyboard sometimes triggers keystrokes from the internal keyboard.
Alternatively, I can rebind some key to act as r


I am looking for a temporary software solution; in particular something like this, but it should lock the keyboard instead of disabling the screen.
You can disable the keyboard by unloading the kernel extension with 

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


To reload,

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


You didn't say what version of macOS you are using, I believe this syntax works as of 10.10. Some tweaking may be needed depending on your version.