Quick suggestion on approaching this problem

its the old new vs old ...

psudo-code

byte oldbutton;

read(button)
if (button != oldbutton)
{
    do stuff
    oldbutton = button
}