How to Use a Windows PC Keyboard on Mac by Remapping Command & Option Keys
Macs can use nearly all keyboards built for Windows PC, whether they are USB or Bluetooth, but you may notice that the layout of some of the modifier keys are different on a Mac keyboard from the layout of a Windows keyboard. Specifically, the WINDOWS and ALT key of a Windows keyboard are switched compared to the Mac keyboard layout of OPTION/ALT and COMMAND keys. This can lead to erroneous keyboard shortcuts or other unexpected key press behavior when using a PC keyboard with a Mac.
A simple solution to this problem is to remap the Windows and ALT key and the command and option/alt keys on the Windows PC keyboard connected to the Mac, so that the keyboard layouts will mimic expectations based on the standard Apple modifier key layout, rather than what it says on the PC keyboard. For most Mac users who connect a PC keyboard to their Mac, this will dramatically improve their typing experience when using a PC keyboard.