Using 3.5mm input to register a button press (a switch)

What, exactly, is your question? Do want help with the physical connections you should make, i.e. where to solder wires? Or do you want help with the code, in which case you need to show what you have already?