Hi, when you pull on a lever the white piece of plastic shown here juts out further. I would like to be able to detect the lever press.

The closest I can figure is to place a 5mm button like this

On top of a U shaped piece PVC 'bracket' and tape it over the lever piece to try to get the button to be pressed when ever the lever is depressed. However I've run into numerous difficulties including finding a plastic bracket which is the right size, not to little and not too big because space is limited, it never seeming to fit properly, (the pseudo curved dome shape means that a slight shift in placement means a bracket cut to a certain size no longer works) as well as the overall fragility of the setup. Any ideas on how I can make this easier? Thanks

Before and after and a ruler in the picture would not hurt. the actual distance would help too. If I understand correctly, you may be able to use an optical interrupter (miniature electric eye) so to speak.