My K-5 decided to go totally crazy on me today, by far the most serious glitch episode so far. At one point every button press and dial movement would trip the mirror/shutter. Removing the battery, grip and card did nothing to solve the problem. Later on, it became fine again, but the issue came back when I attempted to do a custom WB setting.
A couple of minutes later, the K-5 glitched in the usual way by doing the "double slap" but this time it was far more often than before. I also confirmed that while the K-5 was glitching, the image in the viewfinder appeared very OOF, but when it stopped glitching it became sharp again. The lens did not refocus during this time, so it definitely involves some misalignment somewhere.
Ricehigh suggested that it might be hotter temperatures that are causing such problems, and it might be possible, since Chicago just became really hot recently, and this episode today happened after I cycled in the mid-day sunlight for about 10 minutes with the camera in a black backpack.
It might be about time to send the camera to Pentax for servicing. Pity.