Force keyboard re-identification in Catalina MacOS I switched from a Logitech keyboard to a Mac external keyboard on my macbook pro with Catalina MacOS. Every time I hit capitol M it types MZ. It could be the case that the keyboard is malfunctioning, but before I replace it I thought of trying to re-identify the keyboard and see if it helps.

MacOS user guide says this:


On your Mac, choose Apple menu  > System Preferences, then click
Keyboard.
Click Change Keyboard Type, then follow the onscreen
instructions.


However I could not find Change Keyboard Type in that interface - see screenshot below. I also tried this sudo command but it didn't work.

How I could force a keyboard re-identification?
I had the issue where I could not find Change Keyboard Type in that interface after migrating to new Mac with Big Sur and wanted to force keyboard re-identification.
Deleting /Library/Preferences/com.apple.keyboardtype.plist (as suggested above by JMY1000) and rebooting solved it. After the reboot the system ran the keyboard setup again and I could set the correct type.