I need to disable my main keyboard as one letter is not working and it's out of warranty
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.