1
Try pressing Fn + Esc to test if that gets the keyboard working.
2
If not, open Command Prompt, then paste in this command and press Enter:
msdt.exe -id KeyboardDiagnostic
Run that Keyboard Troubleshooter to see if that can solve the problem.
3
If that does not resolve this for you
Open Device Manager
Expand the Keyboards section
Right click your keyboard and choose 'Uninstall'
Then restart your PC