I have a standing lamp in my lounge that has a normal inline switch, which kept on breaking down, and is inconvenient to use on the floor. I looked at the available foot operated switches, and besides the expense, couldn't find one I liked.
So being a maker, I designed one. The print is relatively straightforward, and I printed mine on my mini kossel clone at 200 Micron layer height, with a 0.4mm nozzle in white ABS (Which in hindsight should probably have been black lol) I also acetone vapour treated the top to make it more durable.
The switch used is a common microswitch that is used for end stops, similar to this one http://www.communica.co.za/Cat...
There are two holes in the top for spring and a small ball bearing (Steel BB pellets work well) although in mine I found that the friction from the two M3 screws worked fine to keep it on one side or another. The hole that is offset from center is in case you don't need a toggle switch, but want it to only go on when pressed, like for a sewing machine or such.
The screws used are M3 x 20 Caphead Stainless with M3 nuts inserted into the bottom recesses as per the photos.