Hi! How are we tonight? Really sorry to hear that you're having troubles. The exact cause of your keyboard and mouse randomly not functioning anymore isn't EXACTLY known for sure. I've had this issue too in a Virtual Machine of mine I use for playing it online.
So my suggestion is if that happens again, press CTRL + ALT + DEL on your keyboard and then go back into the Twisted Metal 2 window. If it still has issues, CTRL + ALT + DEL again and end the task.
Try what is shown in this video, if it doesn't work, you may be out of luck. I can personally attest that to an extent, it worked for me on the context of the keyboard and clicking of the mouse to work, it's just no matter what I did the cursor wouldn't appear so I was just randomly clicking everywhere hoping to God it would just work.
My advice, continued playing of the (unfortunately relatively unstable) PC version of Twisted Metal 2 should be done in a Virtual Machine.
What a Virtual Machine is, if you don't know, is software that basically simulates/emulates a computer, on your computer.
-UNFUNNY MEME TOMFOOLERY START-
Yo dawg, I heard you like computers, so I put a computer on your computer so you could run a computer in your computer! Computer-ception!-UNFUNNY MEME TOMFOOLERY END-
I would tell you more about it, but it's late, and I need to get going. You can add me on my Skype or a friend of mine for more information. Add either dxbigboss which is my Skype, or tuki_tuki_tuk, one of the guys I play TM2 PC online with. Fair warning, other than him, they only speak Russian, and barely know any English.