I have been using my MBP (13" mid-2009 running OSX 10.9.5) in clamshell mode with an external monitor connected via minidisplay port, Apple wireless keyboard, and magic mouse for a couple of months. Starting a few weeks ago the mouse would not recognize left clicks anymore and remain stuck on a random spot on the screen with a left click when I close the MBP and try to work in clamshell mode. It still tracks, so that when I move the mouse it highlights from where it got stuck. Also right clicks still work; but obviously they are no use without being able to left click. Also, the keyboard works without any issues.
This problem disappears when I open the lid minimally without waking the MBP monitor. This workaround was suggested here. Similar fixes that people have suggested such as removing any plugged-in USB devices do not apply because there isn't anything plugged in besides the MDP and the magsafe connector.
Additionally, I believe that it's not a hardware issue because it worked previously, i.e. an external bluetooth dongle or wrapping aluminum foil around the MDP should not be required.
Any suggestions or fixes?
Thanks!