Do you have a USB keyboard that you can try with? If so, then you may have a bad onboard keyboard.
I had a laptop act very oddly with a faulty onboard keyboard. When the keyboard was disconnected and a USB one attached the system ran normally. I replaced the keyboard and it worked fine after.