My Keyboard Ctrl and Shift keys randomly fail

Here’s the symptoms: When pressing Shift or Ctrl as a modifier, they sometimes don’t work. Like I’ll try and capitalize a letter and it will be lowercase, or I’ll press Ctrl+v and instead of the pasted text, it’ll just paste ‘v’. Additionally, sometimes it will stop working while I’m holding it down. Like I’m going to right now hold down shift and press a character, and this is what I get: ‘IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIiiiiiiiiiiiii’. It just stopped working. Didn’t move my finger or change pressure or anything.

I assumed this was the fault of my keyboard and so I bought a new one. And now it’s happening here too. Sticky keys is not on. Keyboard filters are not on. Windows troubleshooter found nothing. Problem exists with both bluetooth and wired connections. Any clues or troubleshooting tips?

Speculation: This may be the fault of VSCode and/or WSL2 being open – only suggesting that because that’s what I was working on when it began happening. It happens in all programs, but VSCode does see to be more of the culprit. This week I was working with regular Visual Studio without being in WSL, and I didn’t notice the problem at all. But this weekend, I’m working in WSL with VS Code and it’s driving me crazy.

Note: It happens with both left and right Ctrl and Shift keys.