Use mouse draw line in the 2D,how to do?

I am also having some trouble figuring out how to stop drawing once i start. Any suggestions?