Following polyzargone's post, I was also able to get the keyboard working again. Here what I did:
Disable SIP (System Integrity Protection). I searched on Google and followed a step-by-step tutorial.
Make sure you backup /System/Library/HIDPlugins/IOHIDKeyboardFilter.plugin
Make sure you have a earlier version of the same file. In my case I asked a friend to send to me (from the final non-beta Sierra 10.12.0)
Delete /System/Library/HIDPlugins/IOHIDKeyboardFilter.plugin by doing sudo rm -fr /System/Library/HIDPlugins/IOHIDKeyboardFilter.plugin
(you will need to type a admin password (and I hope there is no "a" in yours...))
Move the earler version to the System's folder. Mine was in Desktop, so I did: sudo mv Desktop/IOHIDKeyboardFilter.plugin /System/Library/HIDPlugins
Enabled SIP again.