Mismatch is taken care in the ISR (5th command in the IOC2 routine) and the then interrupt flag bit is reset.

My problem is that it does interrupt continuously as the user keeps pressing the button.

But since it is a matrix scanned keyboard, I want to check for key release and then take action, not on key press.

Ioannis