I have (had) extra keyboard and mouse buttons for my computer.
The switches turned bad after a few years. The membrane-click-push-buttons make bad contact and can not handle the mechanical stress. Micro-switches (with and without lever) bounce too much.
I want to use a ATmega32U4 and I want to start with good buttons that can deal with dust and mechanical stress for many years. It needs some travel distance, perhaps a few millimeters. I need about 10 of them.
Do they have a specific name ? When I search for it, then I can only find the IR slotted optocoupler.
And 10 pieces for 6 euros. That is better. But I can not just add a surface/cap that I can slam. I still needs some kind of mechanical thing, like a keyboard cap that is mechanically stopped. And I want to know how much current it needs. I'm still very far from knowing how to use them with an Arduino.
That is also a good option.
However, when I search for it, then I can only find these large buttons, I need a small depth, depending on how I will make it, I'm thinking of 10 mm depth maximum.
That is a low pass filter of 159 Hz. The main problem is the switch or button itself. The ones that I used are no longer reliable after many years.
I bought a used Razer Huntsman keyboard, it should arrive in two days. Then I will have enough optical switches to test. For example how strong a single switch is.
Today I got the Razer Huntsman keyboard. The "key" is just the mechanical part. The "switch" is the opto-coupler part, and that is soldered to the pcb and not attached to the mechanical part. If I want to use it, then I would have to cut out the pcb around the key and then find the copper traces to solder wires to. That is not possible.
I will continue the look for a good switch
By the way, the Razer Huntsman keyboard is an impressive piece of engineering, but they failed at a few points. The mechanical "click" is too strong and very loud and the keycap with the keyboard acts as a amplifier for the sound instead of dampening the sound.