So at any given moment you will not know which button was hit and will have to scan again.

But even so, a flag for each button pressed is needed to keep it from regarding it as new press.

Ioannis