You need to isolate whether this is a hardware/electronics issue or whether its just bad software. Format your computer to re install your system, and if it still shuts down quickly/randomly then your hardware/electronics is faulty. If its a software issue, reset your PC to factory settings. If its a hardware issue check every part of your computer. Here is a link of our excellent guides that can help you. https://www.ifixit.com/Team/3286/USFT-BROWN-F14S3G2
The problem could be related with your power adapter or your battery. On your power adapter, The first component to check is the 2 cords one that connects to the wall and adapter to computer. If the computer doesn't start whit the battery on, the battery is faulty. Please follow our troubleshooting page. It can help you to check what is causing you problems. Toshiba Satellite 1415-S105 Troubleshooting Also, you can check our guide to see how to replace your battery. Toshiba Satellite 1415-S105 Battery Replacement
If your keyboard keys are not responding you should initially blow off the keyboard by tilting to one side and spray with a can of compressed air starting at the top of the tilt and working your way down. Our troubleshooting page could help you to check what to do with your device. Toshiba Satellite 1415-S105 Troubleshooting Also, if your keyboard doesn't respond and you want to replace it, we have an amazing guide that you can follow. Toshiba Satellite 1415-S105 Keyboard Replacement