Sometimes simply restarting the computer or disconnecting and reconnecting the keyboard mouse help to patch up the issue.

This is helpful if either your keyboard or mouse working on safe mode or else.

All drivers will be initialized on startup now, And your keyboard and mouse start working normally.