You can specify the way you want to receive presses by sending a parameter to button. If I recall correctly, they are... 0 - for held down buttons. 1 - for pressed buttons with repeat. 2 - for pressed buttons without repeat. 3 - for buttons that were just released. In this case BUTTON(2) will return the buttons that were just pressed.