Hi, I found that there was an icon from scim in the panel and I exit from scim. After that the keyboard never stucks. I completely removed scim now. I do not know when and why I have installed scim (it was an update from squeeze).
Maybe it could be a good idea if kde can warn if programs are running which can cause problems with kde (if one knows about them). I got no response to this bug report, but would find it very nice if someone could confirm or not, or if I have provided enough information or not, or if I should do something else in the future to help to improve debian. Best regards Harald