I suspect the issue happened during the migration. According to some sources the mouse keys function can be activated when using Migration Assistant which leaves the keyboard unresponsive.
Here is a fix according Cnet
1. Open System Preferences and click on the Universal Access preference pane.
2. Click the Mouse & Trackpad settings tab.
3. Click the “Off” radio button next to Mouse Keys.
Note: You may also check/uncheck the box for “Press Option key five times to turn Mouse Keys on or off”.
Note: If you are logged on to a user where Mouse Keys is already disabled, but your keyboard is not responding properly, toggle the radio buttons for Mouse Keys “On” then “Off” to restore normal functionality.*
More Information:
When Mouse Keys is enabled with one of these keyboards, you can use the keys 7,8,9, U, I, O, J, K, L, M, and ’.’ (period) to control movement of the mouse pointer and mouse clicking, but other numbers, letters, and keys cannot be used. The following keys will continue to operate normally when Mouse Keys is enabled: Esc, Function keys, Eject, Delete, Tab, Shift, fn, Control, Option, Command, and the arrow keys.
If you would like to control the mouse pointer with the keyboard and also use the keyboard for typing, enable “Press the Option key five times to turn Mouse Keys on or off” in Universal Access preferences. Then, press the Option key five times each time you want to switch between controlling the mouse pointer and typing.”
I hope this helps! Congrats on your iMac!