First, I also have an Apple Extended keyboard, Model A1243, EMC N0. 2171, that I use with my Mac Mini, and everything is fine. I am using the latest version of Sierra, OS 10.12.5. Are you using that same version?
Also, how exactly did you upgrade the Mac OS? That is, did you just do an upgrade "in place", ie, having Sierra overwrite what Mac OS was already there? Myself, for the last four Mac OS upgrades, I did a clean, fresh, "virgin" installation of the newer Mac OS. For example, when I went from the last version of El Capitan to the second version of Sierra, OS 10.12.1 (two of my applications were not upgraded when the initial release of Sierra came out), being that I had a backup (you are making backups to an external device, correct?), I launched each of my Macs from their respective SuperDuper! backups, used Disk Utility there to Erase and Format my internal drive (SSDs in my case), proceeded with a clean, fresh installation of OS 10.12.1, and then used Migration Assistant to "migrate"/copy needed "stuff" from the backup. All of that worked like a charm.
One other thing: if you have any third party applications, did you insure that they are compatible with Sierra? In some cases, one might need to get updates from the third party's company. I know that is what I needed to do for 6 critical third party apps I use.