Simple LEDButton used as a toggle instead of a momentary switch?

And if you implemented those as an SvgSwitch, the setting in question would be false, because you would use two frames, one for OFF and one for ON, not two frames for mouse pressed/released states. Therefore, your article is evidence that “toggle” should not be the term to describe the setting in question.

Interesting question!

I think there’s a big problem with using “latch” for this (very useful) kind of button: a normal SvgSwitch (moving through param values, with correspondingly different displays) is already latching. The most common example of a latching switch in the sources I looked at was a light switch. From what I can tell, latching is typically used as a synonym for “alternate” or “maintained,” simply meaning the opposite of momentary.

The best real-world term I’ve found for the switch type I think you’re describing is “non-locking” (versus “locking” or “self-locking”). This seems to be more common outside the U.S., for some reason, but I think it consistently indicates whether a switch resets to its original state after being actuated.

So momentary switches are (almost?) always non-locking (otherwise they would be physically confusing), but some latching switches are non-locking and some latching switches are locking.

A latching, self-locking, two-state push-button switch would have an “out” frame and an “in” frame that corresponded to the two internal states–just like a light switch, but a button that’s locked in or out instead of a switch that’s locked up or down.

A latching, non-locking, two-state push-button switch would be like a cheap guitar pedal stomp switch; each press changes the internal state, but it returns to the same physical position no matter what the press is (because it doesn’t lock in the down state on every other press). And this would generalize perfectly to more than two states.

Put formally, I think we’re talking about this (with OFF and ON being the states and out and in being the frames):

  • OFF|out; click => ON|in; release => OFF|out (momentary, which implies two-state and non-locking)
  • OFF|out; click => ON|in; release => ON|in; click => OFF|out; release => OFF|out (latching, two-state, locking)
  • OFF|out; click => ON|in; release => ON|out; click => OFF|in; release => OFF|out (latching, two-state, non-locking)

edit: a more physical interaction pattern for the latching, two-state, locking switch would probably have the second click go to OFF|in, but I suspect that’s less typical in software.