Also, your keys could just be dirty. The randomness you are seeing being based on if that little crumb from an Oreo cookie is actively interfering with a key, or sitting idly by, waiting to interact with that key in a future surprise attack when you are typing.

Turn your keyboard up on it's side and rap it against the desk a couple of times to dislodge the malicious Oreo.