This began happening to me as well.
A few months ago I lost the ability to use the Shift Key as well as Ctrl and Alt in all the different types of console windows. I'm running ESXi 7 and my VMs are mainly Ubuntu clients.
Funny thing is, I'll start the console session of the Ubuntu client and logon into the OS using the Shift key during the logon. Once logged on and inside the OS, if I try and type within a terminal window or a text file etc, those special keys, Shift, Alt, Ctrl no longer work.
Desperate, I even tried rebuilding the ESXi host completely and copying my VMs back into the host. I created new VMs and it is still doing the same thing. It's like a curse.