Hmm, seems a complete shut down and unplugging the AC for 10 seconds solved the problem.
This is weird. I used my MP5,1 two days ago and all was fine. Woke it from sleep just now and my keyboard was not responding. I unplugged it from the rear port and tried another rear port but no luck. Connected it to the front port and it worked just fine. So, restarted the MP with the keyboard in the rear port but it does not work. I have to plug into the front ports. Any idea what my be going on? Mojave is the OS.