In a switch you get on/off, but a button returns to the original setting.

  • BaconIsAVeg@lemmy.ml
    link
    fedilink
    English
    arrow-up
    3
    ·
    3 days ago

    Like you mention, button’s have one state while switches have two. Keys have a KEYPRESS_DOWN and KEYPRESS_UP state, the latter firing when you release the key.

    A button only has a down state.