Without using any third-party software, Apple says you need to have an external keyboard, mouse, or trackpad (USB or bluetooth) to prevent the computer from going to sleep (Lion), or to awaken it from sleep (Snow Leopard and earlier), after the lid is closed.
It turns out that you can apparently connect any external USB device to wake it back up from sleep. I do this with a MacBook Pro that I use with Synergy so that I can use the keyboard and mouse on my Linux workstation to control my MacBook Pro with an external monitor and the lid closed. I just plug in my USB flash drive after I close the lid to wake the MacBook Pro and then I can start using it in clamshell mode with no external keyboard or mouse connected to the MacBook Pro.
macbook, or something likelaptop.) – Jonik Sep 19 '10 at 17:53pmsetor google it – Hawken Apr 23 '12 at 21:54