Definitely a hardware problem, from your description. I would guess that the ribbon connector to keyboard has got displaced - happens sometimes 'cos repeated heating/cooling of machine allows it to 'creep', until, at last one day it's crep' too much.
If you
can nerve yourself to undo those screws & inspect both ends of the ribbon cable, you may save yourself a few tens of quid in your local highstreet computer mangler...
...or of course, you could try SD's well-proven remedy of a hearty thump. Works a treat sometimes
And, oh yes, you probably couldn't format it anyway, 'cos you haven't got a keyboard!
Good luck
Jim