Welcome to the forum.
See if you can get to Safe Mode by rebooting and continuously hitting the F8 key.
Once you boot into safe mode, revert to a restore point created prior to your current problem.
There are a lot of posts on keyboard issues…Avast had previous issue with driver.
I’ve attached a pic on how to use the EASE button to at least use on the on-screen keyboard with your mouse as temp way.
It is your call but I’d do a CLEAN (see my signature) un-re-install of Avast.
Also during the “install” choose CUSTOM and only check the items you want installed.
For me, I just use the FREE Avast and uncheck everything (every tool), except I leave the Avast Shields.
It is personal preference and obviously what features/functions you want but some Forum search & Googling on the feature/tools you “think” you want is worth the time…don’t just install on faith.