Thanks for the respons! It is a Yamaha beginner level keyboard that uses no special drives and it is connected by USB. Both when the keyboard works and not working the device manger in windows shows that it is no problem and the keyboard is connected to windows. A strange thing is that after the keyboard stops working in CW and I then disconnect the cable from the computer CW sends a message that the keyboard has been disconnected. If I then connect the keyboard to the computer CW sends a message that a keyboard has been connected and want to now if I want to use it in CW. If I then answer yes the keyboard will not start to work in CW. To get it to start working again I have restart CW. Then after a few minutes it stops working again. This problem was not with windows7.
I have tryed another USB cable but it did not help.