I just helped Cdt_Diggz fix this issue by disabling Origin In-Game overlay.
His keyboard keys would intermittently stop responding and he would have terrible mouse input lag randomly.
He upgraded to Windows 11 recently and that's when the trouble started.
Navigate to where ever the main Origin folder is. For me is it C:\Program Files (x86)\Origin
Find a file named 'igo64.dll' and rename it to igo64.dll.old or igo64.old
This way Origin will not be able to recognize the file and not enable the In-Game overlay.
Figured I'd post this here to, hopefully, solve this for anyone else making the Windows 11 upgrade.