Button and Switch Basics
Momentary Switches
Momentary switches are switches which only remain in their on state as long as they’re being actuated (pressed, held, magnetized, etc.). Most often momentary switches are best used for intermittent user-input cases; stuff like reset or keypad buttons.
Examples of Momentary Switches
Push-button
Push-button switches are the classic momentary switch. Typically these switches have a really nice, tactile, “clicky” feedback when you press them. They come in all sorts of flavors: big, small, colorful, illuminated (when an LED shines up through the button). They might be terminated as through-hole, surface-mount, or even panel-mount.
Button Matrices
Large arrays of momentary buttons, like your keyboard or even smaller groupings like a keypad, usually arrange all of their switches into a big matrix. Every button on the pad is assigned a row and column . This requires some extra button-press-processing on the microcontroller end, but frees up a big chunk of I/O pins.
Etc.
Momentary switches don’t always have to be actuated by a pushdown. It could be push-sideways, like the movement action in a handful of joysticks.
On the other end of the spectrum, reed switches open or close when exposed to the presence of a magnetic field. These are great for making a non-contact switch.