Start with a thorough internal examination and cleanout.  It could be just the keyboard -- or it could be a damaged charge circuit on the system board.  The former is inexpensive to replace.  If the mainboard is damaged however, the system is likely a total loss.  Service manual here: [URL]  
I have a 2012 XPS 15 that i think got rained on through an open window. When I got to it the lid was up and it was sitting at the BIOS screen. After several attempts to get passed the BIOS screen it booted into Windows but warned of very low battery. The charger was plugged in but not charging and the keyboard was adding extra characters when typing but it was usable. Then the battery dies and it will now not power on. I am going to try and find the spare charger in the hope that it is the charging pack that has died. What do others think it might be? Could it be fixed my removing the battery and reinstalling it? How do i diagnose which is the failed part? Thanks   Pat        
Resurecting a rained on XPS