When I upgraded to the latest version of macOS, a few of the keys on my external mechanical keyboards stopped working. Specifically, the ‘h’ and ‘i’ keys were reversed. In other words, pressing i registered an h and pressing h registered an i. In addition, the ‘a’ key didn’t register any key press.
Fortunately, the fix only takes a minute. First, open your System Preferences then choose Keyboard. Next, click the “Modifier Keys…” button:
Finally, with your external keyboard selected, click “Restore Defaults”: