If it's just an issue with Sims 4 and the keyboard, a couple/few tips that I have seen that might help are:
1. Quit fully out of game, and restart the game. Or Quit out of game and restart the computer to refresh it. -- This helps with the Number Keypad Hotkey not working issue.
2. Deactivate Origin in Game -- Open Origin, Select Origin > Application Settings > Origin In Game tab and click the on/off switch to disable Origin In Game. - This deactivates Origin In-Game, as it has been known to cause problems with games.
3. Repair Game:
In Origin > Games Library, right-click on Sims 4 and select Repair. - Do note this repairs the game's install files for the actual game. It does not make any changes to the saved game files. Meaning that your saved games are safe, they won't be deleted. If you'd like you can copy the Sims 4 folder to a USB key.
4. If you have mods or custom content installed, move the mods folder to the desktop. Clear game cache and delete the localthumbcache.package from inside the Sims 4 folder and try again. This helps troubleshoot game and mod/cc issues. - Load the game and see if the issues are still there.
-- Even if you don't play with mods or custom content installed, it's a good idea to clear game cache and the localthumbcache.package from the Sims 4 folder.
Delete Game Cache Files (What and How-To)
http://www.carls-sims-4-guide.com/forum/index.php?topic=29288.msg401662#msg4016625. It has been reported that screen capture/recorders, instant messengers/video chat or VOIP programs, like Discord may cause issues with Sims 4 and may need to be turned off or uninstalled if issues are severe. Also turn off any overlay those programs may cause issues as well. This is to be sure the program and it's overlay isn't interfering with the game.
6. Disable Game DVR and Game Bar. These are known to cause issues with some games.
How to Disable Windows 10’s Game DVR and Game Bar
https://www.howtogeek.com/273180/how-to-disable-windows-10s-game-dvr-and-game-bar/7. Switch from live mode to build/buy mode and back.
- Press F1 key for Live mode or the F2 key for Build/Buy mode
8. Press the Esc key or the Enter key, or M key to travel somewhere has been reported to help.
9. Try a factory reset - Sims 4 Factory reset Howto
http://www.carls-sims-4-guide.com/forum/index.php?topic=29292.msg401669#msg40166910. Turn off "Display Pointer Trails" in the mouse control panel option.
Control Panel > Hardware and Sound > Select Mouse > Pointer Options. Under Visibility, un-check the Display pointer trails.
11. If the keyboard and mouse are lagging, try lowering the in-game graphics to see if that helps. It may be that your computer is having a hard time keeping up with what's going on in-game. Lowering the graphics may help with that.
This has been reported as a bug, but there doesn't seem to be a definite "fix" for it, only troubleshooting tips to try.
----------
Reference Link:
Keyboard not working in the Sims 4
http://answers.ea.com/t5/The-Sims-4/keyboard-not-working-the-sims-4/td-p/4221339Mouse Scroll Wheel Won't Zoom/Mouse Issues In-Game
http://www.carls-sims-4-guide.com/forum/index.php?topic=26933.msg448514#msg448514