I have tried, and look, but I find no such function.
It is so crowded that I live with my girlfriend and I am often awake at night, and she sleeps.
But, because I do not wake her, so I use my headphones, the problem is that they go out sometimes, and of the whole, when I sit and listen to music and the usual speakers begin to play. When she wakes up, which is not good, then she must sleep because she has to get up early the next morning.
I use about a laptop computer, you can not believe that these small speakers can play so high, but believe me, the decision can be.
If there would be regular speaker at a desktop computer, so it would of course go to just turn off the loudspeakers. But speakers in the laptop, have no button so that you can turn off these on your computer.
Summary: I would like to listen to headphones connected to the computer. I do not want the speaker to start playing when you pull out the headphones from your computer, even if the music is on.