How can I safely wire a momentary switch to a floor lamp?
To safely do the job, you need to either need to mount the switch in an enclosure or use a switch specifically made for the purpose, ie, it’s terminals are enclosed by its design. An example of a similar (although not a momentary switch) would be a roller switch, often found on table lamps and other consumer lighting accessories If you’re new to electrical, I’d recommend asking someone at a local hardware store if they have a switch that can be used for your application. Many are consumer friendly.