After some testing, it seems that with the modification Darrel suggested, it needs to touch very quickly to get a 'pressed=1' flag.

If you approach relatively slow the touch pad it won't get triggered. I may have to play with the constants in the CSM and average too.

But it made a very reliable system now.

Thanks for the tips.

PIC16f1827 with the internal CSM module makes it very easy to make a touch keyboard. Only a couple of registers to setup and you are ready.

Ioannis