Elegant way to animate a binary value? Lately, I've been doing a lot of animation with binary values: things such as changing the visibility of an object, changing the value of a constraint from 0 to 1, etc. The way I'm doing this currently is by, on one frame, keyframing it, then on the next frame, changing the value and adding a new keyframe. But, since there aren't actually any frames in between the keyframes, this seems like a weird way to do it. Is there any better way? Or is this how it's done? Are there any add-ons that make this more elegant?
When keyframing binary values there is no need to include a "holding" keyframe as you have described before each change.  Blender knows to only switch the value at the keyframe since there is no way to interpolate a boolean.



In the above example I have visibility keyframes at frames 1, 15, 30, and 40.  Notice that I don't need keyframes at frames 14, 29, and 39 to make sure that it stays constant up until those frames.