I have also found that Windows 7 has a minor bug with PS/2 (DIN) keyboards and there is a simple registry fix that resolved the problem. If you have a USB keyboard, plugged into a PS/2 adapter, as I do, this fixes the problem.
It has also been reported this can help with USB keyboards...