This kind of explanation of "when I do this, so-and-so should happen, but actually such-and-such happens" hurts my brain.

You should perhaps look at drawing a very simple state diagram like Figure 1 here (kis: doesn't have to make your brain hurt) which will make things a lot clearer. Easy to see what causes it get from one state to the next, and to what stimuli it may and must respond to in each state.
