Here are the common troubleshooting methods I recommend:
Unplug your laptop from the power supply and remove the battery. Hold down the power button for 10 seconds then reconnect the battery and power, and turn on. Do the symptoms persist?
You indicate that it is not a power problem; is the bottom of the laptop very warm in the time it is running? Are the fans running? It could very well be a power supply related problem (I find them to be the most typical for random shut-downs).
Try opening up the laptop and re-seating the memory modules.
If you're unable to determine the cause of the problem, reformatting is usually one of the last ways to fix a misbehaving laptop. There are devices you can get that you can connect your laptop hard drive to, then plug it into a usb on another computer to extract personal data.
Also, could you add some more information about the type of laptop you have? Dell? HP? You may be able to procure some help from the manufacturer, even if you don't have a warranty (it may cost some to have it repaired by them without warranty.)
THis is any key right? Will this happen in BIOS (if that key is the DEL or your particular laptops BIOS key)? – Logman – 2012-06-11T19:53:29.833
Seems like any key but F1 which seems not to work. I often use Ctrl or Fn. – tails9 – 2012-06-11T19:57:13.477
In the BIOS some keyboard activity is required or it will shutoff (I usually have to keep moving the selection) – tails9 – 2012-06-11T20:00:54.737
disconnect the keyboard in the laptop and try an external usb keyboard... – Logman – 2012-06-12T02:28:31.613