KDE4 Keyboard only works with caps lock

I recently installed PC BSD 10 on a Dell E6530 laptop. All was well with KDE until keyboard appeared to stop working within KDE. I could login ok, but that's all. I couldn't work out what was wrong so switched to Lumina. I eventually removed KDE and everything else I wasn't using.

After finding Lumina not to my liking, I installed KDE and went back to it. It was fine for a while, but the keyboard's playing up again.

I have noticed that if caps lock is off, letters do not work. With caps lock on, I get uppercase, and I have to press shift to get lower case. I hadn't changed any settings other than to use Oxygen display themes. Since noticing it's related to caps lock, I've checked accessibility settings too.

There's one thread in this forum that describes this. Removing ~/.kde4 appeared to fix it. Obviously, that is not a satisfactory solution.

Any suggestions?