"Why is this so hard?"
It's NOT hard!
That is the point I've been trying to make for these last few years!
It's simply a matter of "humanizing" the concept!
If I press a button that controls a light and before pressing the button the light is off, then the INTENT is to turn the light on. However, if, before pressing the button the light is on, then the INTENT is to turn the light off!
So, in terms of controlling the light, it is simply a matter of KNOWING what the state of the light is WHEN/AS I press the button! THEN... after changing the state of the light based on the previous state, I have to remember that I have already pressED the button and am now HOLDING the button!
Sure... after having pressED the button I'm still pressING the button, however, after that point where the program first detected that the button was pressED, from that point on, I'm pressING (HOLDING) the button!
The KEY is that the state of the light changes only when the button is first pressED!
Once the button is pressED, and the state of the light has been changed, either ON or OFF, you NEED TO KNOW that the button WAS pressED[/ED]!
From that point on, until the button is released, the state of the light can not be changed!
After changing the state of the light based on the previous state... the state of the light no longer changes as long as the button WAS pressed.
The button must be released, thus negating "WAS", in order to be able to change the state of the light again!