Microsoft Sculpt Ergonomic keyboard 'h' and 'i' keys are swapped, and 'a' key doesn't work
I have been using a Microsoft Sculpt Ergonomic with my MacBook Pro for years without problems. Aside from no Karabiner support, upgrading to macOS Sierra was fine too for this keyboard. However, I used it again today and noticed some weird behavior. First of all, the Option and Command keys were not swapped in System Preferences > Keyboard > Modifier Keys. I normally have them swapped, so I changed it back to swapped. But then I noticed that the 'h' and 'i' keys are swapped, and the 'a' key doesn't work at all. I opened the onscreen Keyboard Viewer and saw that nothing is highlighted when I press the ‘a’ button. The ‘i’ button is highlighted when I press ‘h’, and vice versa. These keys function as expected when I plug the keyboard into my Windows PC. If I launch my Mac in safe mode, these problems are still there. I read somewhere that an issue like this might be caused by a stuck function key, so I pressed all of the keys on the keyboard to try to ‘unstick’ them, to no avail. The only time the keys work correctly is when I am at the login screen. My password includes the problematic characters, and entering it with the Sculpt keyboard works just fine. I guess it must be some sort of software issue, but restarting in safe mode should have fixed it.
MacBook Pro (Retina, 15-inch, Late 2013), macOS Sierra (10.12)