Mechanical Keyboard Switch to Toggle a 120V LED Lamp

Thread Starter

Ballgraff

Joined Dec 6, 2026
2
I’m currently designing a small desktop lamp and would love to incorporate a mechanical keyboard switch (MX-style) as the on/off button because of its satisfying tactile feedback.

I’m relatively inexperienced with electronics and am having trouble figuring out how to use a momentary keyboard switch to control a standard 120V AC, non dimmable LED bulb. Ideally, pressing the switch once would turn the lamp on, and pressing it again would turn it off.

Ideally, I’m looking for a compact solution that can be powered directly from the existing lamp cord, without requiring a separate external power supply or programming, while keeping the keyboard switch electrically isolated from the mains voltage.

Does anyone have any suggestions on how to achieve this or recommendations for specific components?

Any help would be greatly appreciated!
 
Sorry if this sounds a bit harsh, but if you have to ask I’d suggest you don’t know enough about electronics and electricity to be messing around with 120V AC. There are mains push button switches available but I recommend a mains voltage rocker switch as the safest and most tactile solution

Maybe consider a low voltage LED solution powered by a 12V supply?
 

ronsimpson

Joined Oct 7, 2019
4,932
Both complicated and simple.
I think this is the type of switch you have.
I think you need a different type of switch. 1796574110482.png

It most likely was never designed for 120Vac.
Here is a push on/off switch for power line. You can get them round or square. This one bolts in a box, but they also come snap in and many other versions.
You are looking for a SPST switch. Single Pole Single Terminal. (has two posts) Most simple type.

1796574218744.png
I see that different companies have different ways of saying this type of switch. "Push"
Under push is see Push for on release for off. (and the reverse for that) not what you want.
I see Push on-off, off-on I think this is it, but some companies call it push on/off. Don't get "momentary (mom)"
 

Thread Starter

Ballgraff

Joined Dec 6, 2026
2
Sorry if this sounds a bit harsh, but if you have to ask I’d suggest you don’t know enough about electronics and electricity to be messing around with 120V AC. There are mains push button switches available but I recommend a mains voltage rocker switch as the safest and most tactile solution

Maybe consider a low voltage LED solution powered by a 12V supply?
I appreciate the concern, but if people never bothered to learn about things they weren’t familiar with, nothing would ever get done. That’s precisely why I’m here asking questions.

I’ve already considered push button switches rated for mains voltage, but most either lack the tactile feedback I’m looking for or require considerably more actuation force than a mechanical keyboard switch.

I've also looked into a low voltage LED powered solutions by a 12V supply. However, I'd prefer to stick with 120V due to the wider availability of bulbs and the cleaner appearance of a traditional lamp cord without a bulky wall adapter.

I’m simply trying to explore alternative solutions and learn how this could be achieved safely before moving forward with the design.
 
Top