Yeah, I'd already tried the Q-tip and rubbing alcohol and it didn't appear to make a difference.
The problem is still happening, so I just went to Best Buy and purchased a new type cover, since they didn't have any already opened that I could test out. I connected it and it's worked every time so far.
The type cover I'm having problems with is about 3 years old in another month. I'm wondering if maybe a wire or connector inside it is becoming worn, and if that could be causing the problem.
I'm going to test it out and keep comparing the two for the next few days, and see if the new one continues to work more reliably than the old one. If it keeps working, and I swap the old one back onto it and keep having problems, then it'll be pretty clear
that the old keyboard has something physically wrong with it.