Key spamming when switching desktops

I’m not sure if this is the correct place to post, maybe a GNOME-specific forum would be better?

I’m experiencing an issue when switching between workspaces. Occasionally, some keys are being spammed on the keyboard whenever I switch using either a three-finger swipe left/right gesture or keyboard shortcuts.

I can temporarily stop it by pressing one of the arrow keys, but the problem persists for about 10 minutes each time I switch. Below is a video demonstrating the issue; you’ll notice a “[C” character being printed when I stop the spamming by pressing an arrow key:
https://imgur.com/BoW2LSm

The problem seems to occur regardless of the apps running, although it’s easier to visualize with a VS Code terminal command active. With other applications, symptoms might include a stuck cursor or scrollbar.

This is extremely frustrating—any help would be greatly appreciated! :pray: