Another user reported random effects with a keypad library recently. It sounded like a floating pin problem. I send him a test sketch to get it working. Maybe it helps here also: Picking up stray voltage when handling 4+4 matrix keypad. What could be wrong? - #17 by 6v6gt