An implantable medical device (IMD) includes a tap sensor configured to detect an impact event occurring on the surface of the patient's body. The tap sensor is configured to determine whether the impact event (which may be, for example, a tap of a finger or hand upon a surface of the body) likely is a communication directed at the tap sensor. In response to determining that the impact event likely is a communication directed at the tap sensor, the IMD is configured to transition from a first state to a second state.