Using headset controls like a smart phone

Traditional stereo headphones have only three leads, while ones with a microphone and/or the "button" have four. In order for the microphone or the button to work on your machine, the headphone jack must also have four leads (which is unlikely) and the drivers you're using must also support the fourth lead.

It is unlikely that the manufacturer would provide hardware without driver support, so if you still have the manufacturer-provided OS installed, you could boot into that and test the button there. If it works there but not in Ubuntu, then it's probably a lack of driver support.