Make the button differentiate between 2x and 1x press

the point was studying the code, not using the library if you don't want to. That will give you an understanding about Finite state machines (Here is a small introduction to the topic: Yet another Finite State Machine introduction)